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

Fix VmwareengineExternalAddress and VmwareengineExternalAccessRule sweepers, refactor VmwareengineCluster sweeper to use shared function #11069

Merged

Conversation

SarahFrench
Copy link
Contributor

@SarahFrench SarahFrench commented Jun 27, 2024

Fixes hashicorp/terraform-provider-google#18574

Lots of generated VMware Engine sweepers don't work, and this impacts contributions related to VMware Engine.

Release Note Template for Downstream PRs (will be copied)


… identify parental resources to look for sweepable resources under
@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 ( 3 files changed, 148 insertions(+), 134 deletions(-))
google-beta provider: Diff ( 3 files changed, 148 insertions(+), 134 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3828
Passed tests: 3448
Skipped tests: 378
Affected tests: 2

Click here to see the affected service packages

All service packages are affected

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
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]

$\textcolor{red}{\textsf{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 ( 3 files changed, 148 insertions(+), 134 deletions(-))
google-beta provider: Diff ( 3 files changed, 148 insertions(+), 134 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3829
Passed tests: 3449
Skipped tests: 378
Affected tests: 2

Click here to see the affected service packages

All service packages are affected

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
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]

$\textcolor{red}{\textsf{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 ( 3 files changed, 148 insertions(+), 134 deletions(-))
google-beta provider: Diff ( 3 files changed, 148 insertions(+), 134 deletions(-))

@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 ( 3 files changed, 148 insertions(+), 134 deletions(-))
google-beta provider: Diff ( 3 files changed, 148 insertions(+), 134 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3831
Passed tests: 3446
Skipped tests: 378
Affected tests: 7

Click here to see the affected service packages

All service packages are affected

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
  • TestAccWorkstationsWorkstationConfigIamBindingGenerated
  • TestAccWorkstationsWorkstationConfigIamMemberGenerated
  • TestAccWorkstationsWorkstationConfigIamPolicyGenerated
  • TestAccWorkstationsWorkstationConfig_update
  • TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamBindingGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamMemberGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamPolicyGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_update[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample[Error message] [Debug log]

$\textcolor{red}{\textsf{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 analytics

Total tests: 3831
Passed tests: 3446
Skipped tests: 378
Affected tests: 7

Click here to see the affected service packages

All service packages are affected

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
  • TestAccWorkstationsWorkstationConfigIamBindingGenerated
  • TestAccWorkstationsWorkstationConfigIamMemberGenerated
  • TestAccWorkstationsWorkstationConfigIamPolicyGenerated
  • TestAccWorkstationsWorkstationConfig_update
  • TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamBindingGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamMemberGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamPolicyGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_update[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample[Error message] [Debug log]

$\textcolor{red}{\textsf{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 ( 4 files changed, 253 insertions(+), 225 deletions(-))
google-beta provider: Diff ( 4 files changed, 253 insertions(+), 225 deletions(-))

@SarahFrench SarahFrench changed the title Fix VmwareengineExternalAddress sweeper, refactor VmwareengineCluster sweeper to use shared function Fix VmwareengineExternalAddress and VmwareengineExternalAddress sweepers, refactor VmwareengineCluster sweeper to use shared function Jul 1, 2024
@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 ( 4 files changed, 253 insertions(+), 225 deletions(-))
google-beta provider: Diff ( 4 files changed, 253 insertions(+), 225 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3837
Passed tests: 3451
Skipped tests: 378
Affected tests: 8

Click here to see the affected service packages

All service packages are affected

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
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
  • TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy
  • TestAccWorkstationsWorkstationConfigIamBindingGenerated
  • TestAccWorkstationsWorkstationConfigIamMemberGenerated
  • TestAccWorkstationsWorkstationConfigIamPolicyGenerated
  • TestAccWorkstationsWorkstationConfig_update
  • TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3837
Passed tests: 3452
Skipped tests: 378
Affected tests: 7

Click here to see the affected service packages

All service packages are affected

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAppEngineFlexibleAppVersion_update
  • TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy
  • TestAccWorkstationsWorkstationConfigIamBindingGenerated
  • TestAccWorkstationsWorkstationConfigIamMemberGenerated
  • TestAccWorkstationsWorkstationConfigIamPolicyGenerated
  • TestAccWorkstationsWorkstationConfig_update
  • TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeRegionPerInstanceConfig_removeInstanceOnDestroy[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamBindingGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamMemberGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamPolicyGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_update[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample[Error message] [Debug log]

$\textcolor{red}{\textsf{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

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAppEngineFlexibleAppVersion_update[Error message] [Debug log]
TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamBindingGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamMemberGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfigIamPolicyGenerated[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_update[Error message] [Debug log]
TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

This comment was marked as outdated.

This comment was marked as outdated.

@SarahFrench SarahFrench changed the title Fix VmwareengineExternalAddress and VmwareengineExternalAddress sweepers, refactor VmwareengineCluster sweeper to use shared function Fix VmwareengineExternalAddress and VmwareengineExternalAccessRule sweepers, refactor VmwareengineCluster sweeper to use shared function Jul 10, 2024
@SarahFrench SarahFrench requested review from BBBmau and removed request for melinath July 11, 2024 12:01
@SarahFrench SarahFrench requested review from melinath and removed request for BBBmau July 12, 2024 16:49

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

If I recall correctly, the issue here is that the parent resources can't be deleted unless all child resources are already deleted; is that correct?

LGTM

@melinath
Copy link
Member

Were you able to test these manually?

@SarahFrench
Copy link
Contributor Author

Yeah - here are some examples

VmwareengineCluster - this example finds a parent private cloud resource and lists 1 cluster found within it. However the cluster is a management cluster and cannot be deleted.

VmwareengineExternalAddress - this finds an instance of the parent private cloud resource, but when listing external addresses it finds none

VmwareengineExternalAccessRule - this finds an instance of the parent network policy resource, but when listing external access rules it finds none

@SarahFrench
Copy link
Contributor Author

If I recall correctly, the issue here is that the parent resources can't be deleted unless all child resources are already deleted; is that correct?

Yes, when the parent resource contains child resources it is in use and cannot be deleted, and there was no method of deleting those child resources prior to this PR.

Thanks for the review!

@SarahFrench SarahFrench merged commit 7cebdc2 into GoogleCloudPlatform:main Jul 29, 2024
12 of 13 checks passed
Charlesleonius pushed a commit to Charlesleonius/magic-modules that referenced this pull request Aug 1, 2024
…` sweepers, refactor `VmwareengineCluster` sweeper to use shared function (GoogleCloudPlatform#11069)
rainshen49 pushed a commit to rainshen49/magic-modules that referenced this pull request Aug 12, 2024
…` sweepers, refactor `VmwareengineCluster` sweeper to use shared function (GoogleCloudPlatform#11069)
BBBmau pushed a commit to bschaatsbergen/magic-modules that referenced this pull request Aug 21, 2024
…` sweepers, refactor `VmwareengineCluster` sweeper to use shared function (GoogleCloudPlatform#11069)
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.

Sweeper VmwareengineExternalAddress doesn't work due to needing parental resource to create URLs
3 participants