这是indexloc提供的服务,不要输入任何密码
Skip to content

Remove the default value of view.use_legacy_sql in google_bigquery_table #14575

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

Open
wants to merge 1 commit into
base: FEATURE-BRANCH-major-release-7.0.0
Choose a base branch
from

Conversation

wj-chen
Copy link
Member

@wj-chen wj-chen commented Jul 18, 2025

Context of the breaking change: #12390 (comment)
Documentation update in main: #14574

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

bigquery: removed the default value of `view.use_legacy_sql` in `google_bigquery_table`

Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

Googlers: For automatic test runs see go/terraform-auto-test-runs.

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field view.use_legacy_sql default value changed from true to <nil> on google_bigquery_table - reference

If you believe this detection to be incorrect please raise the concern with your reviewer.
If you intend to make this change you will need to wait for a major release window.
An override-breaking-change label can be added to allow merging.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 111
Passed tests: 100
Skipped tests: 10
Affected tests: 1

Click here to see the affected service packages
  • bigquery
#### 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
  • TestAccBigQueryExternalDataTable_CSV_WithSchemaAndConnectionIDAndHivePartitioning

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccBigQueryExternalDataTable_CSV_WithSchemaAndConnectionIDAndHivePartitioning [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

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

Copy link

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


### `view.use_legacy_sql` no longer has a default value of `True`

If `view.use_legacy_sql` is not specified in the configuration, no value is sent to the API.
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure I understand this- the API will only accept null (no value) or true, and will reject false. By removing the default here we're sending null when unset (or false, I think, w/ how we serialize empty values) and users can enable the setting with an explicit true.

A user who configured a resource without setting the field today had the default set to true; they'll get a diff from true-> what appears to be false in Terraform, but is actually null, prompting an update to set the API value to null.

(You haven't done anything to make the null and false thing a specific issue, to be clear! The values are collapsed into each other by several layers by default- in Terraform schema, in json serialization, etc. I'm being very explicit about where values are false/null because that's how they're displayed in user prompts/logs at those points)

Copy link
Member Author

Choose a reason for hiding this comment

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

The API accepts three values: null, true, false, and treats null and false as separate values. I tested in TF before to confirm they are different since the input of not setting vs setting to false comes back from the API response as null vs false.

For a user without it in their config, after upgrading to this version, they will see true -> (none).

This change is required for an upcoming feature where this field can't be set, so TF users of that feature need to leave it out in their config, and also there can't be a TF default value when they leave it unset.

Hope this helps. Let me know if you have suggestions on how to make the release note more clear.

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.

3 participants