Skip to content

Add data clean rooms support #11067

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

Merged
merged 9 commits into from
Aug 23, 2024

Conversation

obada-ab
Copy link
Contributor

@obada-ab obada-ab commented Jun 27, 2024

API:

Guide: https://cloud.google.com/bigquery/docs/data-clean-rooms

Reference: b/347844459

Release Note Template for Downstream PRs (will be copied)

bigqueryanalyticshub: added `sharing_environment_config` to `google_bigquery_analytics_hub_data_exchange`
bigqueryanalyticshub: added `selected_resources`, and `restrict_direct_table_access` to `google_bigquery_analytics_hub_listing`
bigqueryanalyticshub: made `bigquery_dataset` immutable in `google_bigquery_analytics_hub_listing`. Now modifying the field will recreate the resource rather than causing Terraform to report it would attempt an invalid update.

@github-actions github-actions bot requested a review from shuyama1 June 27, 2024 12:44
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 ( 6 files changed, 473 insertions(+))
google-beta provider: Diff ( 6 files changed, 473 insertions(+))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 10
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • bigqueryanalyticshub

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
  • TestAccBigqueryAnalyticsHubDataExchange_bigqueryAnalyticshubDataExchangeDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingDcrExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@obada-ab obada-ab marked this pull request as draft June 28, 2024 10:44
@obada-ab obada-ab marked this pull request as ready for review July 1, 2024 10:05
@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 ( 6 files changed, 474 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 474 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

1 similar comment
@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 ( 6 files changed, 474 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 474 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 9
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • bigqueryanalyticshub

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBigqueryAnalyticsHubDataExchange_bigqueryAnalyticshubDataExchangeDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingUpdate

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 9
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • bigqueryanalyticshub

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBigqueryAnalyticsHubDataExchange_bigqueryAnalyticshubDataExchangeDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

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

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


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

$\textcolor{red}{\textsf{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

github-actions bot commented Jul 2, 2024

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

@obada-ab obada-ab marked this pull request as draft July 2, 2024 14:17
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.

Hey @obada-ab, I assume the PR is still WIP, so I added the disable-review-reminders label to avoid generating noise to this PR. Please feel free to let me know if you have any questions regarding the change in this PR/ when the PR is ready for review. Thanks!

@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 ( 6 files changed, 474 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 474 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 10
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • bigqueryanalyticshub

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
  • TestAccBigqueryAnalyticsHubDataExchange_bigqueryAnalyticshubDataExchangeDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingDcrExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@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 ( 6 files changed, 474 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 474 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@github-actions github-actions bot requested a review from shuyama1 August 1, 2024 09:33
@@ -151,6 +164,7 @@ properties:
name: bigqueryDataset
description: Shared dataset i.e. BigQuery dataset source.
required: true
immutable: true
Copy link
Member

Choose a reason for hiding this comment

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

Do you happen to know what's current behavior if a user is trying to update this field? Will it error out?

Making the field immutable may break users depends on how the update of the field is handled currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried updating the field before making this change and got an error:

Error: Error updating Listing "projects/X/locations/US/dataExchanges/Y/listings/Z": googleapi: Error 400: The field 'bigquery_dataset' cannot be updated on this listing.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for confirming! Then, it should be safe to make this change in a minor release as update is not currently supported for this field and will run into API errors in all cases, according to https://googlecloudplatform.github.io/magic-modules/develop/breaking-changes/make-a-breaking-change/#in-minor-releases

@shuyama1 shuyama1 self-requested a review August 9, 2024 07:29
@shuyama1
Copy link
Member

shuyama1 commented Aug 9, 2024

/gcbrun

@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 ( 6 files changed, 474 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 474 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 12
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • bigqueryanalyticshub

$\textcolor{green}{\textsf{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.

Mostly LGTM. got one question though - Do any of these fields updatable? I notice some immutable flags are on the parent fields but not on the subfields, so I just want to confirm. If any of these are updatable, would you mind following https://googlecloudplatform.github.io/magic-modules/develop/test/test/#add-an-update-test to either add a new test or modify an existing one to cover these cases?Thanks!

@obada-ab
Copy link
Contributor Author

@shuyama1

Do any of these fields updatable? I notice some immutable flags are on the parent fields but not on the subfields, so I just want to confirm.

All the added fields are either immutable or output only. I believe it's enough to have the immutable flag on the parent fields, because all subfields will also be immutable (reference)

@github-actions github-actions bot requested a review from shuyama1 August 14, 2024 10:32
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.

All the added fields are either immutable or output only. I believe it's enough to have the immutable flag on the parent fields, because all subfields will also be immutable (reference)

Thanks for confirm that all the fields are immutable. I just had a discussion with my team and we agree that the documentation needs to be updated - Each immutable subfield must have the immutable attribute explicitly added, even if the parent field is already marked as immutable.

Would you mind adding immutable:true to all the immutable subfields as well? Apologize for the confusion in the doc and thanks for working on this.

@github-actions github-actions bot requested a review from shuyama1 August 21, 2024 14:53
@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 ( 6 files changed, 479 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 479 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@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 ( 6 files changed, 479 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 479 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 12
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • bigqueryanalyticshub

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 12
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • bigqueryanalyticshub

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

@shuyama1
Copy link
Member

/gcbrun

@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 ( 6 files changed, 479 insertions(+), 10 deletions(-))
google-beta provider: Diff ( 6 files changed, 479 insertions(+), 10 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 106 insertions(+))
Open in Cloud Shell: Diff ( 8 files changed, 271 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 12
Passed tests: 10
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • bigqueryanalyticshub

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
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingDcrExample
  • TestAccBigqueryAnalyticsHubListing_bigqueryAnalyticshubListingUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

@shuyama1
Copy link
Member

terraform-google-conversion-build-and-unit-tests failure is not related to the change in this PR. Please ignore it and sorry for the noise.

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.

Thank you!

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.

4 participants