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

pubsub: additional test permissions fixes #12311

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Nov 12, 2024

Remove duplicated permissions, and work around terraform depends_on with some additional logic.

Rename terraform resources bigquery_foo_xxx instead of just editor / viewer, to avoid confusion with project viewer / editor roles.

Followup to #12095

I am pretty sure this will fix the last item; left the other two marked as "part of" in case this doesn't resolve those, but since those the two generated tests have test_vars_overrides for bootstrapping that this would have interfered with, hopefully this helps with any such issues.

Part of hashicorp/terraform-provider-google#20274
Part of hashicorp/terraform-provider-google#20262
Fixes hashicorp/terraform-provider-google#20261

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


Remove duplicated permissions, and work around terraform `depends_on`
with some additional logic.

Rename terraform resources `bigquery_foo_xxx` instead of just `editor` /
`viewer`, to avoid confusion with project viewer / editor roles.

Followup to GoogleCloudPlatform#12095

Part of hashicorp/terraform-provider-google#20274
Part of hashicorp/terraform-provider-google#20262
Fixes hashicorp/terraform-provider-google#20261
Copy link

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

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

@github-actions github-actions bot requested a review from SirGitsalot November 12, 2024 22:08
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 12, 2024
@wyardley
Copy link
Contributor Author

Hopefully this resolves some or all of the issues from my previous PR. Heads up to @melinath @SarahFrench

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Nov 12, 2024

resource "google_service_account" "bq_write_service_account" {
account_id = "{{index $.Vars "service_account_id"}}"
display_name = "BQ Write Service Account"
}

resource "google_project_iam_member" "viewer" {
resource "google_project_iam_member" "bigquery_metadata_viewer" {
Copy link
Contributor Author

@wyardley wyardley Nov 12, 2024

Choose a reason for hiding this comment

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

this and the other changes in this file shouldn't change any behavior -- just a slight readability / understandability adjustment.

I can revert the changes in this file if desired.

@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, 25 insertions(+), 30 deletions(-))
google-beta provider: Diff ( 3 files changed, 25 insertions(+), 30 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 8 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 55
Passed tests: 53
Skipped tests: 1
Affected tests: 1

Click here to see the affected service packages
  • pubsub

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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.

Failing test(s): TestAccPubsubSubscription_pubsubSubscriptionPushBqExample
3 participants