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

Force-send min_ready_sec #5402

Merged

Conversation

rileykarson
Copy link
Member

@rileykarson rileykarson commented Oct 29, 2021

Followup to #5262, min_ready_sec needs to be force-sent to the API in PATCH to set it to zero. That's different than most GCP APIs which only check patch on the top level.

No changelog needed, this falls under the previous change.

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).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • 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).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

compute: fixed the `google_compute_instance_group_manager.update_policy.0.min_ready_sec` field so that updating it to `0` works
compute: fixed the `google_compute_region_instance_group_manager.update_policy.0.min_ready_sec` field so that updating it to `0` works

@rileykarson
Copy link
Member Author

$ make testacc TEST=./google-beta TESTARGS='-run=TestAccInstanceGroupManager_'
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta -v -run=TestAccInstanceGroupManager_ -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN   TestAccInstanceGroupManager_basic
=== PAUSE TestAccInstanceGroupManager_basic
=== RUN   TestAccInstanceGroupManager_targetSizeZero
=== PAUSE TestAccInstanceGroupManager_targetSizeZero
=== RUN   TestAccInstanceGroupManager_update
=== PAUSE TestAccInstanceGroupManager_update
=== RUN   TestAccInstanceGroupManager_updateLifecycle
=== PAUSE TestAccInstanceGroupManager_updateLifecycle
=== RUN   TestAccInstanceGroupManager_updatePolicy
=== PAUSE TestAccInstanceGroupManager_updatePolicy
=== RUN   TestAccInstanceGroupManager_separateRegions
=== PAUSE TestAccInstanceGroupManager_separateRegions
=== RUN   TestAccInstanceGroupManager_versions
=== PAUSE TestAccInstanceGroupManager_versions
=== RUN   TestAccInstanceGroupManager_autoHealingPolicies
=== PAUSE TestAccInstanceGroupManager_autoHealingPolicies
=== RUN   TestAccInstanceGroupManager_stateful
=== PAUSE TestAccInstanceGroupManager_stateful
=== RUN   TestAccInstanceGroupManager_waitForStatus
=== PAUSE TestAccInstanceGroupManager_waitForStatus
=== CONT  TestAccInstanceGroupManager_basic
=== CONT  TestAccInstanceGroupManager_versions
=== CONT  TestAccInstanceGroupManager_updateLifecycle
=== CONT  TestAccInstanceGroupManager_separateRegions
--- PASS: TestAccInstanceGroupManager_basic (111.55s)
=== CONT  TestAccInstanceGroupManager_waitForStatus
--- PASS: TestAccInstanceGroupManager_versions (117.54s)
=== CONT  TestAccInstanceGroupManager_stateful
--- PASS: TestAccInstanceGroupManager_updateLifecycle (150.12s)
=== CONT  TestAccInstanceGroupManager_autoHealingPolicies
--- PASS: TestAccInstanceGroupManager_separateRegions (180.29s)
=== CONT  TestAccInstanceGroupManager_update
--- PASS: TestAccInstanceGroupManager_stateful (136.25s)
=== CONT  TestAccInstanceGroupManager_targetSizeZero
--- PASS: TestAccInstanceGroupManager_autoHealingPolicies (124.01s)
=== CONT  TestAccInstanceGroupManager_updatePolicy
--- PASS: TestAccInstanceGroupManager_waitForStatus (170.32s)
--- PASS: TestAccInstanceGroupManager_targetSizeZero (73.82s)
--- PASS: TestAccInstanceGroupManager_update (189.34s)
--- PASS: TestAccInstanceGroupManager_updatePolicy (203.23s)
PASS
ok  	github.com/hashicorp/terraform-provider-google-beta/google-beta	478.682s

running rigm now

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

How did this work previously? It doesn't seem like we ever force sent this field

@rileykarson
Copy link
Member Author

rileykarson commented Oct 29, 2021

Ah- it didn't work previously is the answer, we never tested unsetting it. I removed most of the times we set it from our tests when removing it from GA. Adding the appropriate changelog entries.

@rileykarson
Copy link
Member Author

RIGM passes, waiting on linters to merge.

$ make testacc TEST=./google-beta TESTARGS='-run=TestAccRegionInstanceGroupManager_'
==> Checking source code against gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google-beta -v -run=TestAccRegionInstanceGroupManager_ -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google-beta/version.ProviderVersion=acc"
=== RUN   TestAccRegionInstanceGroupManager_basic
=== PAUSE TestAccRegionInstanceGroupManager_basic
=== RUN   TestAccRegionInstanceGroupManager_targetSizeZero
=== PAUSE TestAccRegionInstanceGroupManager_targetSizeZero
=== RUN   TestAccRegionInstanceGroupManager_update
=== PAUSE TestAccRegionInstanceGroupManager_update
=== RUN   TestAccRegionInstanceGroupManager_updateLifecycle
=== PAUSE TestAccRegionInstanceGroupManager_updateLifecycle
=== RUN   TestAccRegionInstanceGroupManager_rollingUpdatePolicy
=== PAUSE TestAccRegionInstanceGroupManager_rollingUpdatePolicy
=== RUN   TestAccRegionInstanceGroupManager_separateRegions
=== PAUSE TestAccRegionInstanceGroupManager_separateRegions
=== RUN   TestAccRegionInstanceGroupManager_versions
=== PAUSE TestAccRegionInstanceGroupManager_versions
=== RUN   TestAccRegionInstanceGroupManager_autoHealingPolicies
=== PAUSE TestAccRegionInstanceGroupManager_autoHealingPolicies
=== RUN   TestAccRegionInstanceGroupManager_distributionPolicy
=== PAUSE TestAccRegionInstanceGroupManager_distributionPolicy
=== RUN   TestAccRegionInstanceGroupManager_stateful
=== PAUSE TestAccRegionInstanceGroupManager_stateful
=== CONT  TestAccRegionInstanceGroupManager_basic
=== CONT  TestAccRegionInstanceGroupManager_versions
=== CONT  TestAccRegionInstanceGroupManager_updateLifecycle
=== CONT  TestAccRegionInstanceGroupManager_stateful
--- PASS: TestAccRegionInstanceGroupManager_versions (144.68s)
=== CONT  TestAccRegionInstanceGroupManager_separateRegions
--- PASS: TestAccRegionInstanceGroupManager_basic (146.77s)
=== CONT  TestAccRegionInstanceGroupManager_rollingUpdatePolicy
--- PASS: TestAccRegionInstanceGroupManager_stateful (165.08s)
=== CONT  TestAccRegionInstanceGroupManager_distributionPolicy
=== CONT  TestAccRegionInstanceGroupManager_update
--- PASS: TestAccRegionInstanceGroupManager_updateLifecycle (197.22s)
--- PASS: TestAccRegionInstanceGroupManager_distributionPolicy (125.19s)
=== CONT  TestAccRegionInstanceGroupManager_autoHealingPolicies
--- PASS: TestAccRegionInstanceGroupManager_separateRegions (199.00s)
=== CONT  TestAccRegionInstanceGroupManager_targetSizeZero
--- PASS: TestAccRegionInstanceGroupManager_rollingUpdatePolicy (264.83s)
--- PASS: TestAccRegionInstanceGroupManager_update (228.50s)
--- PASS: TestAccRegionInstanceGroupManager_targetSizeZero (94.40s)
--- PASS: TestAccRegionInstanceGroupManager_autoHealingPolicies (176.29s)
PASS
ok  	github.com/hashicorp/terraform-provider-google-beta/google-beta	469.134s

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 2 deletions(-))
Terraform Beta: Diff ( 2 files changed, 4 insertions(+), 8 deletions(-))

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

Successfully merging this pull request may close these issues.

3 participants