Skip to content

Fix cross-project listing subscriptions #13362

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

Conversation

c2thorn
Copy link
Member

@c2thorn c2thorn commented Mar 14, 2025

fixes hashicorp/terraform-provider-google#21402

google_bigquery_analytics_hub_listing_subscription is unfortunately unique in that the create_url and self_link differ completely. What was missed in the original implementation was a cross-project setup that would cause one project needed for the create_url, but a separate one for the self_link.

This fix rectifies the issue by inserting pre_read and pre_delete code to overwrite the template URL to use the correct destination dataset project instead of the project field.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

bigqueryanalyticshub: fixed a bug in `google_bigquery_analytics_hub_listing_subscription` where a subscription using a different project than the dataset would not work

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

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 14
Passed tests: 13
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • bigqueryanalyticshub

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
  • TestAccBigqueryAnalyticsHubListingSubscription_differentProject

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccBigqueryAnalyticsHubListingSubscription_differentProject [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

@sachinpro
Copy link
Contributor

Is this WIP? TestAccBigqueryAnalyticsHubListingSubscription_differentProject is failing.

@c2thorn
Copy link
Member Author

c2thorn commented Mar 18, 2025

Is this WIP? TestAccBigqueryAnalyticsHubListingSubscription_differentProject is failing.

It is failing on the import step which I still need to fix. Working on that now

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

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 14
Passed tests: 13
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • bigqueryanalyticshub

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
  • TestAccBigqueryAnalyticsHubListingSubscription_differentProject

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccBigqueryAnalyticsHubListingSubscription_differentProject [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

@c2thorn c2thorn requested a review from hao-nan-li March 20, 2025 16:22
Copy link
Member Author

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

All existing TestAccBigqueryAnalyticsHub tests passed in a manual Teamcity build

@c2thorn c2thorn added this pull request to the merge queue Mar 20, 2025
Merged via the queue into GoogleCloudPlatform:main with commit a8699fd Mar 20, 2025
24 checks passed
JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 25, 2025
JaylonmcShan03 pushed a commit to JaylonmcShan03/magic-modules-jmcshan that referenced this pull request Mar 30, 2025
Dawid212 pushed a commit to Dawid212/magic-modules that referenced this pull request Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants