Skip to content

Added sweeper.wait_for_delete for debugging purposes - #18973

Merged
melinath merged 1 commit into
GoogleCloudPlatform:mainfrom
melinath:sweeper-wait-for-delete
Sep 11, 2026
Merged

melinath merged 1 commit into
GoogleCloudPlatform:mainfrom
melinath:sweeper-wait-for-delete

Conversation

@melinath

@melinath melinath commented Sep 11, 2026

Copy link
Copy Markdown
Member

This is useful to have as a flag - I used it to debug why some networks / subnetworks couldn't be deleted.

Also, added sweeper regions for networkattachment

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@modular-magician

modular-magician commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 6 insertions(+), 6 deletions(-)
google-beta provider View Diff 1 file changed, 6 insertions(+), 6 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
1559 1456 95 8
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 8 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeInstanceFromMachineImage_diffProject
  • TestAccComputeInstanceTemplate_gracefulShutdown
  • TestAccComputeInstance_GracefulShutdownWithResetUpdate
  • TestAccComputeInstance_GracefulShutdownWithoutResetUpdate
  • TestAccComputeInstance_resourceManagerTags
  • TestAccComputeRegionInstanceTemplate_gracefulShutdown
  • TestAccComputeSecurityPolicy_withPreconfiguredWafConfig
  • TestAccComputeTargetInstance_withSecurityPolicy

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeInstance_resourceManagerTags
❌ Error · Log - TestAccComputeInstanceFromMachineImage_diffProject
❌ Error · Log - TestAccComputeInstanceTemplate_gracefulShutdown
❌ Error · Log - TestAccComputeInstance_GracefulShutdownWithResetUpdate
❌ Error · Log - TestAccComputeInstance_GracefulShutdownWithoutResetUpdate
❌ Error · Log - TestAccComputeRegionInstanceTemplate_gracefulShutdown
❌ Error · Log - TestAccComputeSecurityPolicy_withPreconfiguredWafConfig
❌ Error · Log - TestAccComputeTargetInstance_withSecurityPolicy

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@melinath VCR tests complete for b562c6e!

Merged via the queue into GoogleCloudPlatform:main with commit fbb0309 Sep 11, 2026
32 of 34 checks passed
@melinath
melinath deleted the sweeper-wait-for-delete branch September 11, 2026 22:26
}
{{- if $.Sweeper.WaitForDelete }}
err = {{ $.ClientNamePascal }}OperationWaitTime(
config, res, config.Project, "Deleting Network", config.UserAgent,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you generalize the code? This will generate confusing logs as-is.

I'd recommend noting that this will generate invalid code for LROs on the flag, and adding a prefix to the setting so it's easy to spot as invalid if committed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that I accidentally left "Network" in there - that's an easy fix.

I assume that by "invalid" you just mean that we don't want to have someone accidentally turn this on and have sweepers suddenly take forever. That seems like a reasonable concern - even if it's rare for someone off our team to modify this field, it could happen and would be easy to miss - & it's an easy fix. Did you have a particular prefix in mind? I could've sworn we had a precedent for this but I'm not finding it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry, invalid code for resources without LROs

Don't recall a precedent offhand

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think we had something related to TGC or the Go Rewrite where we didn't want people off our team to ever use it, so it had some kind of warning prefix. But that's not really relevant since that's not what you meant.

I'll make it more clear that this only works for operation-based resources.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

opened #18975 to clean this up.

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