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

migrate lifecyclePolicy.updateOnRepair to GA #8412

Merged
merged 8 commits into from
Jul 27, 2023

Conversation

askubis
Copy link
Member

@askubis askubis commented Jul 21, 2023

Fixes hashicorp/terraform-provider-google#15244

Add support for forcing update on repair in instance lifecycle policy in compute_instance_group_manager and compute_region_instance_group_manager resources (GA).

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • While running the tests one of them fails (TestAccInstanceGroupManager_waitForStatus), but it does not use the new field and it simply times out.
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

compute: added field `instance_lifecycle_policy` to `google_compute_instance_group_manager` and `google_compute_region_instance_group_manager` (ga)

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:
*

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a community contributor. @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 modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Jul 21, 2023
@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.

Terraform GA: Diff ( 4 files changed, 91 insertions(+))

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.

Looks like a rebase is needed -- there appears to be a problem with the GA so hopefully it resolves with that.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:
*

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 24, 2023
@askubis
Copy link
Member Author

askubis commented Jul 24, 2023

Sorry, but this error is present on HEAD too (I pulled into my repository, run the same tests and got same result).
It has nothing to do with this PR (the test doesn't include the field that is being modified here.

I fixed the release notes too.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 24, 2023
@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.

Terraform GA: Diff ( 4 files changed, 91 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2874
Passed tests 2573
Skipped tests: 299
Affected tests: 2

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
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
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.

I'm not referring to the red test but the following error on build:

sh -c "'/Users/nickelliot/go/src/github.com/hashicorp/terraform-provider-google/scripts/gofmtcheck.sh'"
==> Checking that code complies with gofmt requirements...
go vet
go: downloading golang.org/x/oauth2 v0.9.0
go: downloading google.golang.org/api v0.130.0
go: downloading google.golang.org/grpc v1.56.1
go: downloading golang.org/x/net v0.12.0
go: downloading cloud.google.com/go/bigtable v1.19.0
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529
go: downloading google.golang.org/protobuf v1.31.0
go: downloading golang.org/x/sys v0.10.0
go: downloading github.com/googleapis/gax-go/v2 v2.11.0
go: downloading cloud.google.com/go v0.110.2
go: downloading cloud.google.com/go/iam v1.1.0
go: downloading cloud.google.com/go/longrunning v0.5.0
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.5
go: downloading github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f
go: downloading golang.org/x/crypto v0.11.0
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4
go: downloading github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe
go: downloading github.com/envoyproxy/protoc-gen-validate v0.10.1
go: downloading github.com/census-instrumentation/opencensus-proto v0.4.1
# github.com/hashicorp/terraform-provider-google/google/services/compute
google/services/compute/resource_compute_instance_group_manager.go:481:3: unknown field InstanceLifecyclePolicy in struct literal of type "google.golang.org/api/compute/v1".InstanceGroupManager
google/services/compute/resource_compute_instance_group_manager.go:693:85: manager.InstanceLifecyclePolicy undefined (type *"google.golang.org/api/compute/v1".InstanceGroupManager has no field or method InstanceLifecyclePolicy)
google/services/compute/resource_compute_instance_group_manager.go:762:18: updatedManager.InstanceLifecyclePolicy undefined (type *"google.golang.org/api/compute/v1".InstanceGroupManager has no field or method InstanceLifecyclePolicy)
google/services/compute/resource_compute_instance_group_manager.go:1033:71: undefined: compute.InstanceGroupManagerInstanceLifecyclePolicy
google/services/compute/resource_compute_instance_group_manager.go:1034:38: undefined: compute.InstanceGroupManagerInstanceLifecyclePolicy
google/services/compute/resource_compute_instance_group_manager.go:1147:70: undefined: compute.InstanceGroupManagerInstanceLifecyclePolicy
google/services/compute/resource_compute_region_instance_group_manager.go:455:3: unknown field InstanceLifecyclePolicy in struct literal of type "google.golang.org/api/compute/v1".InstanceGroupManager
google/services/compute/resource_compute_region_instance_group_manager.go:639:85: manager.InstanceLifecyclePolicy undefined (type *"google.golang.org/api/compute/v1".InstanceGroupManager has no field or method InstanceLifecyclePolicy)
google/services/compute/resource_compute_region_instance_group_manager.go:704:18: updatedManager.InstanceLifecyclePolicy undefined (type *"google.golang.org/api/compute/v1".InstanceGroupManager has no field or method InstanceLifecyclePolicy)
make: *** [vet] Error 1

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 25, 2023
@askubis
Copy link
Member Author

askubis commented Jul 25, 2023

Oh, thanks!
I pulled and it seems resolved now.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 25, 2023
@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.

Terraform GA: Diff ( 4 files changed, 91 insertions(+))

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.

Could you share the log of it building successfully on your machine? It is still failing in both CI and for me locally and want to see if there is some unexpected difference happening here.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2882
Passed tests 2580
Skipped tests: 301
Affected tests: 1

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
TestAccContainerAwsNodePool_BetaBasicHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Jul 26, 2023
@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.

Terraform GA: Diff ( 6 files changed, 94 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 2 files changed, 3 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

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! Will approve to merge once this one accidental line of whitespace that got added is removed.

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Jul 27, 2023
@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.

Terraform GA: Diff ( 6 files changed, 93 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 2 files changed, 2 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

promote (Regional)InstanceGroupManager.lifecyclePolicy.updateOnRepair to GA
3 participants