Skip to content
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

CodeRepositoryIndex cascade deletion #12601

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

JumiDeluxe
Copy link
Member

@JumiDeluxe JumiDeluxe commented Dec 18, 2024

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

gemini: added `force_destroy` field to resource `google_code_repository_index`, enabling deletion of the resource even when it has dependent RepositoryGroups

@github-actions github-actions bot requested a review from NickElliot December 18, 2024 16:59
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@NickElliot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google-beta provider: Diff ( 2 files changed, 1 insertion(+), 143 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3
Passed tests: 3
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • gemini

🔴 Errors occurred during REPLAYING mode. Please fix them to complete your PR.

View the build log

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google-beta provider: Diff ( 2 files changed, 2 insertions(+), 143 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 6
Passed tests: 4
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • gemini

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGeminiCodeRepositoryIndex_update
  • TestAccGeminiRepositoryGroup_noBootstrap

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGeminiCodeRepositoryIndex_update [Debug log]
TestAccGeminiRepositoryGroup_noBootstrap [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, code LGTM but could you clarify what the "cascade deletion" is doing here so I could make sure the release note wording is what we want to convey for Terraform users? thanks!

@JumiDeluxe
Copy link
Member Author

"Cascade deletion" means that we automatically remove children resources (Repository Groups) upon CRIs deletion.

@github-actions github-actions bot requested a review from NickElliot December 23, 2024 21:46
Copy link

@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, could you add a test case for this functionality?

@github-actions github-actions bot requested a review from NickElliot January 8, 2025 17:08
@JumiDeluxe
Copy link
Member Author

Got it, could you add a test case for this functionality?

Added to CRI tests, the new test tries to remove CRI without removing RG directly in Terraform.
All children resources should be deleted, so we're expecting a new plan.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google-beta provider: Diff ( 3 files changed, 128 insertions(+), 143 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 6
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • gemini

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGeminiCodeRepositoryIndex_delete

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGeminiCodeRepositoryIndex_delete [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the test! I wanted to make a suggestion though to fly by:

due to that test working the way it did, I realized we could make users make accidental changes to their states when currently they have a protective guard. Would it be preferable to add a virtual field "force_delete" that serves as a flag for sending the obj["force"] = true body during DELETE?

If you have an opinion as the service team member that it shouldn't be an issue, let me know

@github-actions github-actions bot requested a review from NickElliot January 9, 2025 19:36
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 4 files changed, 157 insertions(+), 143 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • gemini

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGeminiCodeRepositoryIndex_delete
  • TestAccGeminiCodeRepositoryIndex_update
  • TestAccGeminiRepositoryGroup_noBootstrap

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 4 files changed, 157 insertions(+), 143 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 4
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • gemini

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGeminiCodeRepositoryIndex_delete
  • TestAccGeminiCodeRepositoryIndex_update
  • TestAccGeminiRepositoryGroup_noBootstrap

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGeminiCodeRepositoryIndex_update [Debug log]
TestAccGeminiRepositoryGroup_noBootstrap [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccGeminiCodeRepositoryIndex_delete [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGeminiRepositoryGroup_noBootstrap [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccGeminiCodeRepositoryIndex_delete [Error message] [Debug log]
TestAccGeminiCodeRepositoryIndex_update [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 1 insertion(+))
google-beta provider: Diff ( 4 files changed, 155 insertions(+), 143 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 7
Passed tests: 6
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • gemini

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGeminiCodeRepositoryIndex_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGeminiCodeRepositoryIndex_update [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@github-actions github-actions bot requested a review from NickElliot January 10, 2025 21:29
Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@NickElliot NickElliot merged commit 22008e5 into GoogleCloudPlatform:main Jan 10, 2025
9 checks passed
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR hasn't generated any diffs, but I'll let you know if a future commit does.

bcreddy-gcp pushed a commit to bcreddy-gcp/magic-modules that referenced this pull request Jan 13, 2025
bcreddy-gcp pushed a commit to bcreddy-gcp/magic-modules that referenced this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants