-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: update dataplex aspecttypes integration tests #2193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @sahaajaaa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue in Dataplex integration tests where Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a cleanup step in the Dataplex integration tests to delete existing AspectType resources before each test run, addressing a quota exhaustion issue. The implementation is sound, but I've identified a critical bug that could cause a panic due to a nil pointer dereference during error handling. I've also suggested a more robust alternative to using time.Sleep for waiting on resource deletion to prevent test flakiness. Addressing these points will make the test suite more reliable.
23d9225 to
449ad85
Compare
d4c8c1a to
aa6fda2
Compare
averikitsch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this solution works if there are multiple tests running at the same time, but it does cover if the tests end early.
|
/gcbrun |
aa6fda2 to
94211bc
Compare
You're right, thanks for spotting the concurrency issue. I've updated the code to only delete AspectTypes older than 2 hours at the start, making it safe for parallel runs while still cleaning up leaks from tests that ended early. |
c858eba to
9e40c63
Compare
9e40c63 to
94005b3
Compare
Improved the cleanup strategy for Dataplex AspectTypes in tests. Before creating a new AspectType for a test, all existing AspectTypes(which are not deffered in previous runs) in the target project and location are now listed and deleted.
|
/gcbrun |
|
/gcbrun |
|
/gcbrun |
fbc9459 to
b8e2baf
Compare
Improved the cleanup strategy for Dataplex AspectTypes in tests. Before creating a new AspectType for a test, all existing AspectTypes(which are not deffered in previous runs) in the target project and location are now listed and deleted.
b8e2baf to
b59d443
Compare
|
/gcbrun |
|
/gcbrun |
…pis#2193) ## Description Addresses an issue where Dataplex AspectTypes created during integration tests were not consistently deleted. This accumulation led to exceeding the AspectType quota. To prevent this, the test setup now includes a step to list and delete all existing AspectTypes within the test project and location *before* attempting to create any new ones. This ensures a clean state for each test run and avoids hitting the quota. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2057 Co-authored-by: Averi Kitsch <[email protected]> d69792d
## Description Addresses an issue where Dataplex AspectTypes created during integration tests were not consistently deleted. This accumulation led to exceeding the AspectType quota. To prevent this, the test setup now includes a step to list and delete all existing AspectTypes within the test project and location *before* attempting to create any new ones. This ensures a clean state for each test run and avoids hitting the quota. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2057 Co-authored-by: Averi Kitsch <[email protected]>
## Description Addresses an issue where Dataplex AspectTypes created during integration tests were not consistently deleted. This accumulation led to exceeding the AspectType quota. To prevent this, the test setup now includes a step to list and delete all existing AspectTypes within the test project and location *before* attempting to create any new ones. This ensures a clean state for each test run and avoids hitting the quota. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes googleapis#2057 Co-authored-by: Averi Kitsch <[email protected]>
Description
Addresses an issue where Dataplex AspectTypes created during integration tests were not consistently deleted. This accumulation led to exceeding the AspectType quota.
To prevent this, the test setup now includes a step to list and delete all existing AspectTypes within the test project and location before attempting to create any new ones. This ensures a clean state for each test run and avoids hitting the quota.
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #2057