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 AlloyDB user support #8431

Closed

Conversation

DanielRieske
Copy link
Contributor

@DanielRieske DanielRieske commented Jul 23, 2023

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

google_alloydb_user

Closes: hashicorp/terraform-provider-google#14272

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a community contributor. @slevenick, 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 modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 23, 2023
@DanielRieske DanielRieske changed the title feat: add AlloyDB user support Add AlloyDB user support Jul 23, 2023
@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 24, 2023
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 24, 2023
@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, 787 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 787 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 91 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 106 insertions(+))

Missing test report

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

Resource: google_alloydb_user (1 total tests)
Untested fields: cluster, user_id, database_roles, user_type

Please add acceptance tests which include these fields.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2875
Passed tests 2573
Skipped tests: 299
Affected tests: 3

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
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules|TestAccAlloydbUser_alloydbUserExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeFirewallPolicyRule_multipleRules[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:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccAlloydbUser_alloydbUserExample[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

@DanielRieske
Copy link
Contributor Author

DanielRieske commented Jul 25, 2023

Added tests to increase test coverage for the missing fields, can we run the tests again?

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 25, 2023
@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 ( 4 files changed, 827 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 4 files changed, 827 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 91 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2874
Passed tests 2572
Skipped tests: 299
Affected tests: 3

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
TestAccAlloydbUser_alloydbUserIamUserExample|TestAccAlloydbUser_alloydbUserExample|TestAccContainerAwsNodePool_BetaBasicHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_alloydbUserIamUserExample[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_alloydbUserExample[Error message] [Debug log]
TestAccContainerAwsNodePool_BetaBasicHandWritten[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

@DanielRieske
Copy link
Contributor Author

Anyway of getting the log where the test TestAccAlloydbUser_alloydbUserExample went wrong?

I tested them on my own account on which it passed.


terraform-provider-google git:(main) ✗ make testacc TEST=./google TESTARGS='-run=TestAccAlloydbUser_alloydbUserExample'
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google -v -run=TestAccAlloydbUser_alloydbUserExample -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccAlloydbUser_alloydbUserExample
=== PAUSE TestAccAlloydbUser_alloydbUserExample
=== CONT  TestAccAlloydbUser_alloydbUserExample
--- PASS: TestAccAlloydbUser_alloydbUserExample (909.38s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google   910.034s

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 26, 2023
@DanielRieske
Copy link
Contributor Author

I realised that I never ran the tests at the same time, by doing this I realised that the compute_networks being created didn't have a unique name and therefore failing.

terraform-provider-google git:(main) ✗ make testacc TEST=./google TESTARGS='-run=TestAccAlloydbUser_'
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google -v -run=TestAccAlloydbUser_ -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccAlloydbUser_alloydbUserExample
=== PAUSE TestAccAlloydbUser_alloydbUserExample
=== RUN   TestAccAlloydbUser_alloydbUserIamUserExample
=== PAUSE TestAccAlloydbUser_alloydbUserIamUserExample
=== CONT  TestAccAlloydbUser_alloydbUserExample
=== CONT  TestAccAlloydbUser_alloydbUserIamUserExample
--- PASS: TestAccAlloydbUser_alloydbUserExample (1136.85s)
--- PASS: TestAccAlloydbUser_alloydbUserIamUserExample (1171.33s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google   1171.995s

}

resource "google_compute_network" "<%= ctx[:primary_resource_id] %>" {
name = "alloydb-cluster"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should change to a parameterized value so it gets a random suffix attached. Right now this is causing the failure because it collides with another network named the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@slevenick I am skipping the generation of tests because this particular resource does not work well with the autogenerated tests.

If we destroy the cluster or instance during the CheckDestroy phase that will result in Internal 500 errors when trying to verify if an user still exists, therefore I need to check it while the parent resource still exists.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's.... frightening. What do we expect the user experience to be when they created a user within Terraform and then they destroyed it via another tool? They would hit the 500 and be confused about what is happening

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you share either the error message in logs or a use case that triggers it? I can reach out to the internal team because returning a 500 on an attempted GET is pretty bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@slevenick I did not realise the impact in certain scenario's on users and didn't report it, for future contributions I will keep this in mind.

There are a few scenario's where this can happens but usually boils down to not having an instance in it's cluster.

I tested the following 2 scenario's:

You create a cluster and try to add an user without creating an instance.


2023-07-26T20:57:40.102+0200 [DEBUG] provider.terraform-provider-google: ---[ REQUEST ]---------------------------------------
2023-07-26T20:57:40.102+0200 [DEBUG] provider.terraform-provider-google: POST /v1/projects/playground-x/locations/europe-west4/clusters/tf-test-alloydb-cluster/users?alt=json&userId=test HTTP/1.1
2023-07-26T20:57:40.102+0200 [DEBUG] provider.terraform-provider-google: Host: alloydb.googleapis.com
2023-07-26T20:57:40.102+0200 [DEBUG] provider.terraform-provider-google: User-Agent: Terraform/1.5.0 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/dev
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: Content-Length: 67
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: Content-Type: application/json
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: Accept-Encoding: gzip
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: 
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: {
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google:  "databaseRoles": [
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google:   "alloydbiamuser"
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google:  ],
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google:  "userType": "ALLOYDB_IAM_USER"
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: }
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: 
2023-07-26T20:57:40.103+0200 [DEBUG] provider.terraform-provider-google: -----------------------------------------------------
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: 2023/07/26 20:57:40 [DEBUG] Google API Response Details:
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: ---[ RESPONSE ]--------------------------------------
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: HTTP/2.0 500 Internal Server Error
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Cache-Control: private
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Content-Type: application/json; charset=UTF-8
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Date: Wed, 26 Jul 2023 18:57:40 GMT
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Server: ESF
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Vary: Origin
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Vary: X-Origin
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: Vary: Referer
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: X-Content-Type-Options: nosniff
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: X-Frame-Options: SAMEORIGIN
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: X-Xss-Protection: 0
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: 
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google: {
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google:   "error": {
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google:     "code": 500,
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google:     "message": "An internal error has occurred (4e2d52b2-e97b-466a-9d22-a1a2c9b499bc)",
2023-07-26T20:57:40.263+0200 [DEBUG] provider.terraform-provider-google:     "status": "INTERNAL"
2023-07-26T20:57:40.264+0200 [DEBUG] provider.terraform-provider-google:   }
2023-07-26T20:57:40.264+0200 [DEBUG] provider.terraform-provider-google: }

│ Error: Error creating User: timeout while waiting for state to become 'success' (timeout: 1m0s)
│ 
│   with google_alloydb_user.default,
│   on main.tf line 61, in resource "google_alloydb_user" "user":
│   34: resource "google_alloydb_user" "user" {

You create a cluster, instance & user through Terraform and we delete the instance and try to pull the state of the user resource


2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: ---[ REQUEST ]---------------------------------------
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: GET /v1/projects/playground-x/locations/europe-west4/clusters/tf-test-alloydb-cluster/users/test?alt=json HTTP/1.1
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: Host: alloydb.googleapis.com
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: User-Agent: Terraform/1.5.0 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/dev
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: Content-Type: application/json
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: Accept-Encoding: gzip
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: 
2023-07-26T20:23:52.799+0200 [DEBUG] provider.terraform-provider-google: 
2023-07-26T20:23:52.800+0200 [DEBUG] provider.terraform-provider-google: -----------------------------------------------------
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: 2023/07/26 20:23:52 [DEBUG] Google API Response Details:
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: ---[ RESPONSE ]--------------------------------------
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: HTTP/2.0 500 Internal Server Error
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Cache-Control: private
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Content-Type: application/json; charset=UTF-8
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Date: Wed, 26 Jul 2023 18:23:52 GMT
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Server: ESF
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Vary: Origin
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Vary: X-Origin
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: Vary: Referer
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: X-Content-Type-Options: nosniff
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: X-Frame-Options: SAMEORIGIN
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: X-Xss-Protection: 0
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: 
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: {
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google:   "error": {
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google:     "code": 500,
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google:     "message": "An internal error has occurred (044b08c2-93bd-4981-a397-05c5c1b32f2b)",
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google:     "status": "INTERNAL"
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google:   }
2023-07-26T20:23:52.837+0200 [DEBUG] provider.terraform-provider-google: }

│ Error: Error when reading or editing AlloydbUser "projects/playground-x/locations/europe-west4/clusters/tf-test-alloydb-cluster/users/test": googleapi: Error 500: An internal error has occurred (570d762a-8316-4854-b15c-a40116fb4e97)
│ 
│   with google_alloydb_user.user,
│   on main.tf line 61, in resource "google_alloydb_user" "user":
│   61: resource "google_alloydb_user" "user" {

While I was at it I tested what happens with an invalid cluster name and it got rejected as a 404.

Given these results I am unsure if this should be merged at this time.

Copy link
Contributor

Choose a reason for hiding this comment

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

@GauravJain21 please take a look at this

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Error is: global/networks/alloydb-cluster' already exists, alreadyExists

Please change the name to be parameterized so it gets randomized

@DanielRieske
Copy link
Contributor Author

This was changed in the "handwritten" tests and should work.

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 26, 2023
@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 ( 4 files changed, 827 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 4 files changed, 827 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 91 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2886
Passed tests 2582
Skipped tests: 301
Affected tests: 3

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
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccAlloydbUser_alloydbUserExample|TestAccAlloydbUser_alloydbUserIamUserExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_alloydbUserExample[Debug log]
TestAccAlloydbUser_alloydbUserIamUserExample[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:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[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

@slevenick
Copy link
Contributor

@GauravJain21 can you take a look at the error message here? This looks to be a bug on the service side, we shouldn't be getting a 500 response

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Needs some changes before merging, but the main questions come around the stability of this API for integration, especially around the 500 error returned in some cases.

At this point we should wait for @GauravJain21 to review

mmv1/products/alloydb/User.yaml Show resolved Hide resolved
description: |
The ID of the alloydb user.
- !ruby/object:Api::Type::ResourceRef
name: 'cluster'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it preferable to have this set up as a single parent resource rather than a series of project/location/cluster?

Generally we have each broken out into an individual field.

cc @GauravJain21

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would mean that the user has to set it's location and I'd argue this resource isn't a regional object on it's own but rather part of a regional object.

As the cluster dictates what region the user resides in I wouldn't give the user the option to specify location.

Copy link
Contributor

Choose a reason for hiding this comment

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

True. On the other hand existing resources like google_sql_user work this way, where the project and instance are both specified independently: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_user#project

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The biggest difference here is that google_sql_user doesn't rely on a region in his end-point nor is it a field that can be set.
It is implied that it lives in the region where the instance resides in.

POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/users

I am curious what others believe the right approach is here.

mmv1/products/alloydb/User.yaml Outdated Show resolved Hide resolved
}

resource "google_compute_network" "<%= ctx[:primary_resource_id] %>" {
name = "alloydb-cluster"
Copy link
Contributor

Choose a reason for hiding this comment

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

@GauravJain21 please take a look at this

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Jul 27, 2023
@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 ( 4 files changed, 887 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 4 files changed, 887 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 91 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2891
Passed tests 2586
Skipped tests: 302
Affected tests: 3

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
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccAlloydbUser_alloydbUserIamUser|TestAccAlloydbUser_alloydbUser

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_alloydbUserIamUser[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:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccAlloydbUser_alloydbUser[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 modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 27, 2023
@DanielRieske
Copy link
Contributor Author

TestAccAlloydbUser_alloydbUser failed because of an incorrect cluster reference, I corrected the mistake and ran the tests on my own account.

➜  terraform-provider-google git:(main) ✗ make testacc TEST=./google TESTARGS='-run=TestAccAlloydbUser_'         
TF_ACC=1 TF_SCHEMA_PANIC_ON_ERROR=1 go test ./google -v -run=TestAccAlloydbUser_ -timeout 240m -ldflags="-X=github.com/hashicorp/terraform-provider-google/version.ProviderVersion=acc"
=== RUN   TestAccAlloydbUser_alloydbUser
=== PAUSE TestAccAlloydbUser_alloydbUser
=== RUN   TestAccAlloydbUser_alloydbUserIamUser
=== PAUSE TestAccAlloydbUser_alloydbUserIamUser
=== CONT  TestAccAlloydbUser_alloydbUser
=== CONT  TestAccAlloydbUser_alloydbUserIamUser
--- PASS: TestAccAlloydbUser_alloydbUserIamUser (1173.06s)
--- PASS: TestAccAlloydbUser_alloydbUser (1232.61s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google   1233.281s

Anyway we can re-run the tests?

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jul 27, 2023
@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 ( 4 files changed, 945 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 4 files changed, 945 insertions(+), 2 deletions(-))
TF Conversion: Diff ( 3 files changed, 91 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2891
Passed tests 2585
Skipped tests: 302
Affected tests: 4

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccIapWebTypeAppEngineIamBindingGenerated|TestAccAlloydbUser_alloydbUser|TestAccAlloydbUser_alloydbUserIamUser

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAlloydbUser_alloydbUser[Debug log]
TestAccAlloydbUser_alloydbUserIamUser[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:}}$
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccIapWebTypeAppEngineIamBindingGenerated[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

@slevenick
Copy link
Contributor

Tests look good, I'm going to hold off on more review until @GauravJain21 has a chance to look at this next week.

@DanielRieske
Copy link
Contributor Author

Hi @GauravJain21, did you have an opportunity yet to take a look at this?

@GauravJain21
Copy link
Contributor

GauravJain21 commented Aug 10, 2023 via email

@DanielRieske
Copy link
Contributor Author

Hi @GauravJain21, anything I can do to help at this point?

@GauravJain21
Copy link
Contributor

Hey Daniel,
We have stopped taking in PR requests for major features from the external community contribution. An internal developer is working for adding Users API support to Terraform.
Best,
Gaurav

@DanielRieske
Copy link
Contributor Author

DanielRieske commented Sep 5, 2023

@GauravJain21 Thank you for your response and sad to hear that major features created by the external community won't be accepted anymore.

Will there be an official statement on what type of contributions will or will not be considered? I truly enjoy working on this product and have thoroughly enjoyed contributing to it.

But if certain contributions won't be accepted anymore then I'd like to know to what extent so I won’t spend time on contributions that might not get accepted.

Thanks a lot!

@alexgartner-bc
Copy link

@GauravJain21 any update on this?

@GauravJain21
Copy link
Contributor

We are tracking it here. Can you close this as duplicate. PR has been raised.

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.

Add google_alloydb_user resouce w/ support for creating IAM users
5 participants