Remove default_from_api for google_bigquery_dataset.default_collation for new major version 8.0.0 - #18585
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, 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. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 267471d: Diff reportYour PR generated the following diffs in downstream repositories:
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @wj-chen, @slevenick, @sachinpro VCR tests complete for 267471d! |
267471d to
2bf3909
Compare
|
I think the TGC issue needs a fix in the template. Let's hold off until I can confirm |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 2bf3909: Diff reportYour PR generated the following diffs in downstream repositories:
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @wj-chen, @slevenick, @sachinpro VCR tests complete for 2bf3909! |
#18588 should address this |
|
/gcbrun |
This comment was marked as outdated.
This comment was marked as outdated.
Thanks, I also made some edits here earlier to try to get around that, let me revert that and test again. |
2bf3909 to
10a2d5f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
… for new major version 8.0.0
10a2d5f to
33d2bfd
Compare
This comment was marked as outdated.
This comment was marked as outdated.
@c2thorn I updated the PR with a new merge from the upstream feature branch but looks like the test is still failing for the same error. Should I bring back my |
…-major-release-8.0.0
|
/gcbrun |
@wj-chen I ran locally just now to verify, and it passed for me with the prior fix. Maybe something happened with the previous run or my local somehow is different. Either way, it is an error on the TGC side, not with your change. We care about the TPG behavior, which looks correct here. As soon as the build resolves with the git conflict resolution I just pushed, we should be good to merge. And if TGC is still failing, I'll address it separately. |
This comment was marked as outdated.
This comment was marked as outdated.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 0201add: Diff reportYour PR generated the following diffs in downstream repositories:
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 🟢 All tests passed in Replaying mode! No Recording was needed. View the replaying VCR build log @wj-chen, @slevenick, @sachinpro VCR tests complete for 0201add! |
|
docs-examples failing test seems to be a transient issue |
b40e0af
into
GoogleCloudPlatform:FEATURE-BRANCH-major-release-8.0.0
Fixes hashicorp/terraform-provider-google#27384.
This is a copy of #18140 by @BBBmau , but opened against the 8.0.0 feature branch. Below is the original PR description:
Fixes a chronic nightly test failure in
TestAccBigQueryDataset_collationUpdate(failing ~83% of recent runs on the Google Beta nightly-test branch — 49 failures / 10 passes over the last ~60 days, failing essentially every nightly for weeks).Test history
TeamCity test history: https://hashicorp.teamcity.com/test/8347509247226202175?currentProjectId=TerraformProviders_GoogleCloud_GOOGLE_BETA_NIGHTLYTESTS&tab=testDetails
Validation build (TeamCity, Upstream MM Testing)
Triggered on
refs/heads/auto-pr-18140(scoped toTestAccBigQueryDataset_collationUpdate):https://hashicorp.teamcity.com/buildConfiguration/TerraformProviders_GoogleCloud_GOOGLE_BETA_MMUPSTREAMTESTS_GOOGLEBETA_PACKAGE_BIGQUERY/696388
Root cause
The test creates a dataset with
default_collation = "und:ci", then updatesdefault_collationback to""and asserts the value is cleared. It always failed withexpected "", got "und:ci".TeamCity debug logs show no update PUT is ever sent in the clearing step.
default_collationwasOptional + Computed(viadefault_from_api: true), and the legacy Terraform Plugin SDK reinterprets an empty-string value on a Computed attribute as "unset":So even though
customCollationDiffcalledSetNew("default_collation", ""), the SDK turned it into an unknown/computed value, no diff was produced, no PUT was sent, and the post-apply read returned the unchangedund:ci.Verified directly against the BigQuery API:
defaultCollationreturns it absent (no server-assigned default).PUTwith"defaultCollation": ""clears the value and an immediate read-back returns""(the API is consistent here — there was no eventual-consistency problem).Fix
Remove
default_from_api: truefromdefault_collationso the field isOptional(notComputed). The SDK no longer reinterprets the empty string as "unset", a normal diff is produced, and (withsend_empty_value: true) the clearingPUTis sent and reflected in state. Because the API returns nodefaultCollationwhen a dataset is created without one, droppingdefault_from_apidoes not introduce a permadiff for users who never set the field.Also remove the now-unnecessary
customCollationDiffcustom diff: it existed only to force the clearing diff, relies onSetNew(valid only on computed keys), and errors once the field is no longer computed.Verified by running
TestAccBigQueryDataset_collationUpdateagainst a real project (PASS).Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.