magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Fix `VmwareengineExternalAddress` and `VmwareengineExternalAddress` sweepers, refactor `VmwareengineCluster` sweeper to use shared function

Open SarahFrench opened this issue 1 year ago • 18 comments

Fixes https://github.com/hashicorp/terraform-provider-google/issues/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)


SarahFrench avatar Jun 27 '24 14:06 SarahFrench

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 avatar Jun 27 '24 15:06 modular-magician

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 avatar Jun 27 '24 16:06 modular-magician

$\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 avatar Jun 27 '24 16:06 modular-magician

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 avatar Jun 27 '24 19:06 modular-magician

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 avatar Jun 27 '24 20:06 modular-magician

$\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 avatar Jun 27 '24 21:06 modular-magician

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 avatar Jun 27 '24 21:06 modular-magician

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 avatar Jun 27 '24 22:06 modular-magician

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 avatar Jun 27 '24 22:06 modular-magician

$\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 avatar Jun 27 '24 23:06 modular-magician

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 avatar Jun 27 '24 23:06 modular-magician

$\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 avatar Jun 27 '24 23:06 modular-magician

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 avatar Jul 01 '24 10:07 modular-magician

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 avatar Jul 01 '24 11:07 modular-magician

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 avatar Jul 01 '24 11:07 modular-magician

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 avatar Jul 01 '24 12:07 modular-magician

$\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 avatar Jul 01 '24 12:07 modular-magician

$\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 avatar Jul 01 '24 12:07 modular-magician

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

github-actions[bot] avatar Jul 04 '24 09:07 github-actions[bot]

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

github-actions[bot] avatar Jul 08 '24 09:07 github-actions[bot]

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

github-actions[bot] avatar Jul 17 '24 09:07 github-actions[bot]

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

github-actions[bot] avatar Jul 19 '24 09:07 github-actions[bot]

Were you able to test these manually?

melinath avatar Jul 24 '24 23:07 melinath

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 avatar Jul 29 '24 18:07 SarahFrench

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 avatar Jul 29 '24 18:07 SarahFrench