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 support for AuthorizedView resource in Bigtable #10203

Merged
merged 4 commits into from
May 2, 2024

Conversation

trollyxia
Copy link
Member

Release Note Template for Downstream PRs (will be copied)

`google_bigtable_authorized_view`

@github-actions github-actions bot requested a review from c2thorn March 14, 2024 22:37
Copy link

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

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

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • bigtable

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

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

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • bigtable

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


authorizedViewId := d.Get("name").(string)
tableId := d.Get("table_name").(string)
authorizedViewConf := bigtable.AuthorizedViewConf{
Copy link
Member

Choose a reason for hiding this comment

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

Apologies, I thought I left a comment but it must not have sent.
The build is failing with bigtable.AuthorizedViewConf being undefined.

I believe we will have to update the cloud.google.com/go/bigtable dependency

yaqs/8444818848342867968 should have a note that explains how to do that in our go.mod

Copy link
Member Author

@trollyxia trollyxia Apr 29, 2024

Choose a reason for hiding this comment

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

Sorry it took a while for us to merge the cloud.google.com/go/bigtable dependency for this PR. Now the dependency is finally merged, and the go.mod is updated accordingly.

@c2thorn Can you please start review this PR? Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

We should update the go.sum as gets generated as well. You should just be able to copy and paste the result after running go get cloud.google.com/go/bigtable in the provider

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 the info! Done.

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

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • bigtable

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

@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 ( 5 files changed, 1265 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 1265 insertions(+), 1 deletion(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_bigtable_authorized_view (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_bigtable_authorized_view" "primary" {
  project = # value needed
}


subsetView, ok := d.GetOk("subset_view")
if !ok || len(subsetView.([]interface{})) != 1 {
return fmt.Errorf("subset_view must be specified for authorized view %s", authorizedViewId)
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have validation for subset_view here, but have it set as optional in the field schema?

Copy link
Member Author

@trollyxia trollyxia May 1, 2024

Choose a reason for hiding this comment

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

Since the subset_view is actually one variant in a one-of field in the AuthorizedView API proto as below:

  // The type of this AuthorizedView.
  oneof authorized_view {
    // An AuthorizedView permitting access to an explicit subset of a Table.
    SubsetView subset_view = 2;
  }

Although it is currently the only possible variant in that one-of field, in the future we might add other types of authorized views. Therefore each one-of variant will be optional in the field schema.

However we also want to make sure that at least one of the possible variants are set, hence the validation here. In the future when we have other variants, we will adjust the validation accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense. Refreshing to see considerations for future changes, thank you!

@github-actions github-actions bot requested a review from c2thorn April 30, 2024 19:59
@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, 1406 insertions(+), 101 deletions(-))
google-beta provider: Diff ( 6 files changed, 1406 insertions(+), 101 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_bigtable_authorized_view (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_bigtable_authorized_view" "primary" {
  project = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3633
Passed tests: 3263
Skipped tests: 369
Affected tests: 1

Click here to see the affected service packages
all service packages are affected

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
TestAccHealthcareDatasetIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccHealthcareDatasetIamPolicy[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

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

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_bigtable_authorized_view (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_bigtable_authorized_view" "primary" {
  project = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3633
Passed tests: 3264
Skipped tests: 369
Affected tests: 0

Click here to see the affected service packages
all service packages are affected

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@github-actions github-actions bot requested a review from c2thorn May 1, 2024 20:52
@c2thorn
Copy link
Member

c2thorn commented May 1, 2024

Don't see any other changes necessary, so I'm going to go ahead and commit my small suggestion to move things along.

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

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_bigtable_authorized_view (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_bigtable_authorized_view" "primary" {
  project = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3633
Passed tests: 3264
Skipped tests: 369
Affected tests: 0

Click here to see the affected service packages
all service packages are affected

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@c2thorn
Copy link
Member

c2thorn commented May 2, 2024

Looks like another PR was merged that modified the go.mod.erb file. May have to rerun the dependency upgrade with go get <dependency>

@trollyxia
Copy link
Member Author

Looks like another PR was merged that modified the go.mod.erb file. May have to rerun the dependency upgrade with go get <dependency>

Done.

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

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_bigtable_authorized_view (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_bigtable_authorized_view" "primary" {
  project = # value needed
}

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 ( 7 files changed, 1483 insertions(+), 16 deletions(-))
google-beta provider: Diff ( 7 files changed, 1483 insertions(+), 16 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_bigtable_authorized_view (8 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_bigtable_authorized_view" "primary" {
  project = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3633
Passed tests: 3264
Skipped tests: 369
Affected tests: 0

Click here to see the affected service packages
all service packages are affected

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3633
Passed tests: 3264
Skipped tests: 369
Affected tests: 0

Click here to see the affected service packages
all service packages are affected

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

Copy link
Member

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

LGTM

@c2thorn c2thorn merged commit 8c35b73 into GoogleCloudPlatform:main May 2, 2024
11 checks passed
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request May 8, 2024
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
pcostell pushed a commit to pcostell/magic-modules that referenced this pull request Jul 16, 2024
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