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

Add foreign type info and definition to google_bigquery_table beta #12659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wj-chen
Copy link
Member

@wj-chen wj-chen commented Dec 27, 2024

Add foreign type info and definition to google_bigquery_table beta.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

bigquery: added `schema_foreign_type_info` field and related schema handling to `google_bigquery_table` resource (beta)

@github-actions github-actions bot requested a review from shuyama1 December 27, 2024 21:26
Copy link

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

@shuyama1, 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, 13 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 4 files changed, 144 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 129
Passed tests: 118
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
  • TestAccBigQueryTable_foreignTypeInfo

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccBigQueryTable_foreignTypeInfo [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link

github-actions bot commented Jan 1, 2025

@shuyama1 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

github-actions bot commented Jan 3, 2025

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

@wj-chen wj-chen force-pushed the pangea-foreign-type-info branch from 503dd0e to 7eee044 Compare January 7, 2025 18:12
@github-actions github-actions bot requested a review from shuyama1 January 7, 2025 18:13
@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, 13 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 4 files changed, 144 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 129
Passed tests: 119
Skipped tests: 10
Affected tests: 0

Click here to see the affected service packages
  • bigquery

🟢 All tests passed!

View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

I wanted to confirm if this feature is already released. Could you share the API doc? I couldn't find it on https://cloud.google.com/bigquery/docs/reference/rest/v2/tables. Also for the bigquery service, we use https://bigquery.googleapis.com/bigquery/v2/ for both GA and beta providers. Is there a specific reason this feature is limited to beta?

@@ -992,6 +1009,25 @@ func ResourceBigQueryTable() *schema.Resource {
DiffSuppressFunc: bigQueryTableSchemaDiffSuppress,
Description: `A JSON schema for the table.`,
},
{{- if ne $.TargetVersionName "ga" }}
// SchemaForeignTypeInfo: [Optional] Specifies metadata of the foreign data type definition in field schema.
"schema_foreign_type_info": {
Copy link
Member

Choose a reason for hiding this comment

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

Does this field support updates? If so, could we add an update step in the test?

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't and API will throw an error. The behavior might change between Public Preview and GA or post-GA, so we are also not making it force-new right now.

// TypeSystem: [Optional] Specifies the system which defines the foreign data type.
"type_system": {
Type: schema.TypeString,
Optional: true,
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this field required, given this is currently the only subfield?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching this, it should be required.

@wj-chen wj-chen force-pushed the pangea-foreign-type-info branch from 7eee044 to 85188e8 Compare January 8, 2025 23:01
@github-actions github-actions bot requested a review from shuyama1 January 8, 2025 23:02
@wj-chen
Copy link
Member Author

wj-chen commented Jan 8, 2025

I wanted to confirm if this feature is already released. Could you share the API doc? I couldn't find it on https://cloud.google.com/bigquery/docs/reference/rest/v2/tables. Also for the bigquery service, we use https://bigquery.googleapis.com/bigquery/v2/ for both GA and beta providers. Is there a specific reason this feature is limited to beta?

This is scheduled for a Public Preview launch in January, hence beta-provider-only until GA. I will check with the API team to see when the public reference doc is expected to update. In the meantime you can find the corresponding definitions in internal search.

@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, 13 insertions(+), 5 deletions(-))
google-beta provider: Diff ( 4 files changed, 144 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 129
Passed tests: 119
Skipped tests: 10
Affected tests: 0

Click here to see the affected service packages
  • bigquery

🟢 All tests passed!

View the build log

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