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

Users API changes #8920

Merged
merged 11 commits into from
Oct 5, 2023
Merged

Conversation

pattukerman
Copy link
Contributor

@pattukerman pattukerman commented Sep 12, 2023

AlloyDB hosts different resources in its public API, including Clusters, Instances, and Backups. All those have their corresponding Terraform integration. One new AlloyDB resource that got published in 2023 April is AlloyDB Users resource and API. This PR introduces support for it.

Release Note Template for Downstream PRs (will be copied)

`google_alloydb_user`

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

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

Terraform GA: Diff ( 5 files changed, 1063 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 1063 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

Remove the trailing empty line
@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.

Terraform GA: Diff ( 5 files changed, 1063 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 6 files changed, 1068 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3032
Passed tests 2730
Skipped tests: 297
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbUser_updateRoles_IAM|TestAccAlloydbUser_updatePassword_BuiltIn|TestAccAlloydbUser_updateRoles_BuiltIn|TestAccAlloydbUser_alloydbUserBuiltinExample|TestAccAlloydbUser_alloydbUserIamExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_updatePassword_BuiltIn[Debug log]
TestAccAlloydbUser_updateRoles_BuiltIn[Debug log]
TestAccAlloydbUser_alloydbUserBuiltinExample[Debug log]
TestAccAlloydbUser_alloydbUserIamExample[Debug log]

Rerun these tests in REPLAYING mode to catch issues

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


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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@pattukerman
Copy link
Contributor Author

The failing test is due to an issue with the AlloyDB Control Plane. The fix has been submitted and is waiting to be deployed. I'd appreciate an early feedback about the PR beforehand.

@shuyama1
Copy link
Member

The failing test is due to an issue with the AlloyDB Control Plane. The fix has been submitted and is waiting to be deployed. I'd appreciate an early feedback about the PR beforehand.

@pattukerman Thanks for the heads up. I'll start working on the review but will hold merging until the upstream fix.

@GauravJain21 GauravJain21 mentioned this pull request Sep 19, 2023
5 tasks
Removing the test for now, since AlloyDB control plane deployment for the fix is taking time. The fix is about returning the database roles for a given user in sorted order, so it is not a breaking bug. 

I will re-add the test once the Control Plane deployment is 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.

Terraform GA: Diff ( 5 files changed, 971 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 971 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3079
Passed tests 2779
Skipped tests: 299
Affected tests: 1

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
TestAccDataSourceGoogleServiceAccountIdToken_impersonation

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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

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.

First pass. will look into tests closely after

mmv1/products/alloydb/User.yaml Show resolved Hide resolved
create_url: '{{cluster}}/users?userId={{user_id}}'
update_url: '{{cluster}}/users?userId={{user_id}}'
update_verb: :POST
update_mask: false
Copy link
Member

Choose a reason for hiding this comment

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

If we're not using udpate mask for this resource, we can omit this field. The default is false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, I'll remove the line.

mmv1/products/alloydb/User.yaml Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Show resolved Hide resolved
@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.

Terraform GA: Diff ( 5 files changed, 971 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 971 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3081
Passed tests 2782
Skipped tests: 299
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
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.

Terraform GA: Diff ( 5 files changed, 971 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 971 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3096
Passed tests 2797
Skipped tests: 299
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

@GauravJain21
Copy link
Contributor

Hey Shuya,
Can you please approve and merge this PR?

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.

Some comments + questions. Sorry for the delay on reviewing it.

mmv1/products/alloydb/User.yaml Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Show resolved Hide resolved
Add back the update test for IAM user.
@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.

Terraform GA: Diff ( 5 files changed, 1054 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 1054 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbUser_updateRoles_IAM[Error message] [Debug log]
TestAccAlloydbUser_alloydbUserIamExample[Error message] [Debug log]
TestAccAlloydbUser_updateRoles_BuiltIn[Error message] [Debug log]
TestAccAlloydbUser_alloydbUserBuiltinExample[Error message] [Debug log]
TestAccAlloydbUser_updatePassword_BuiltIn[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these 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.

Terraform GA: Diff ( 5 files changed, 1054 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 1054 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3115
Passed tests 2792
Skipped tests: 314
Affected tests: 9

Action taken

Found 9 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbUser_updateRoles_IAM|TestAccAlloydbUser_alloydbUserBuiltinExample|TestAccAlloydbUser_alloydbUserIamExample|TestAccAlloydbUser_updateRoles_BuiltIn|TestAccAlloydbUser_updatePassword_BuiltIn|TestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig|TestAccSpannerInstanceIamPolicy

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_updateRoles_IAM[Debug log]
TestAccAlloydbUser_alloydbUserBuiltinExample[Debug log]
TestAccAlloydbUser_alloydbUserIamExample[Debug log]
TestAccAlloydbUser_updateRoles_BuiltIn[Debug log]
TestAccSpannerInstanceIamPolicy[Debug log]

Rerun these tests in REPLAYING mode to catch issues

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccAlloydbUser_updatePassword_BuiltIn[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@shuyama1
Copy link
Member

shuyama1 commented Oct 3, 2023

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

Terraform GA: Diff ( 5 files changed, 1054 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 6 files changed, 1054 insertions(+), 7 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3117
Passed tests 2797
Skipped tests: 314
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbUser_updatePassword_BuiltIn|TestAccContainerNodePool_withKubeletConfig|TestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings|TestAccHealthcareDatasetIamPolicy|TestAccDataSourceGoogleServiceAccountJwt

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccContainerNodePool_withKubeletConfig[Error message] [Debug log]
TestAccContainerCluster_withAddons[Error message] [Debug log]
TestAccContainerNodePool_withUpgradeSettings[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@GauravJain21
Copy link
Contributor

/gcbrun

@GauravJain21
Copy link
Contributor

Hey Shuya,
The failing tests are not a part of AlloyDB service. Can you please merge this PR?

@shuyama1
Copy link
Member

shuyama1 commented Oct 4, 2023

Hey Shuya, The failing tests are not a part of AlloyDB service. Can you please merge this PR?

Thanks for taking a look at the PR. Yes, the failing tests are unrelated to the change of this PR and we don't need to worry about them. I'm giving a final pass now. I'll approve and merge the PR when it's ready to go

mmv1/products/alloydb/User.yaml Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Outdated Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Show resolved Hide resolved
mmv1/products/alloydb/User.yaml Outdated Show resolved Hide resolved
@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.

Terraform GA: Diff ( 5 files changed, 1049 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 1049 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3124
Passed tests 2800
Skipped tests: 318
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAlloydbUser_updateRoles_BuiltIn|TestAccAlloydbUser_alloydbUserBuiltinExample|TestAccAlloydbUser_updateRoles_IAM|TestAccAlloydbUser_alloydbUserIamExample|TestAccAlloydbUser_updatePassword_BuiltIn|TestAccWorkstationsWorkstationConfig_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_updateRoles_BuiltIn[Debug log]
TestAccAlloydbUser_alloydbUserBuiltinExample[Debug log]
TestAccAlloydbUser_alloydbUserIamExample[Debug log]
TestAccAlloydbUser_updatePassword_BuiltIn[Debug log]
TestAccWorkstationsWorkstationConfig_update[Debug log]

Rerun these tests in REPLAYING mode to catch issues

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


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

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@pattukerman
Copy link
Contributor Author

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

Terraform GA: Diff ( 5 files changed, 1049 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 1049 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 1 file changed, 89 insertions(+))
TF OiCS: Diff ( 8 files changed, 295 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3124
Passed tests 2805
Skipped tests: 318
Affected tests: 1

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
TestAccAlloydbUser_updateRoles_IAM

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Rerun these tests in REPLAYING mode to catch issues

$\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

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.

LGTM! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants