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

Datastream check private connection state after create and update #6862

Merged
merged 7 commits into from Dec 1, 2022

Conversation

iperetz-goo
Copy link
Contributor

@iperetz-goo iperetz-goo commented Nov 23, 2022

Datastream Private Connection resources create operation can finish successfully when the actual resource fails.

To solve that in TF, we will add a custom post create code (this only happens in create) that will verify the resource state after creation.

datastream: fixed `google_datastream_private_connection` ignoring failures during creation

@modular-magician
Copy link
Collaborator

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @melinath, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

@modular-magician
Copy link
Collaborator

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

@iperetz-goo
Copy link
Contributor Author

TESTED=Error: Error waiting for PrivateConnection "projects/datastream-e2e-tests/locations/us-central1/privateConnections/iperetz-tf-test20" to be CREATED. "Failed to create PrivateConnection. An unknown error occurred. Please try again. If the error persists, contact Google support., details = {\"originalMessage\":\"The resource 'projects/datastream-e2e-tests/global/networks/iperetz-tf-test20' was not found\"}"

@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 ( 2 files changed, 113 insertions(+))
Terraform Beta: Diff ( 2 files changed, 113 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2281
Passed tests 2033
Skipped tests: 244
Failed tests: 4

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccDatastreamPrivateConnection_datastreamPrivateConnectionFullExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileBigqueryPrivateConnectionExample|TestAccLoggingBucketConfigProject_cmekSettings

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccDatastreamPrivateConnection_datastreamPrivateConnectionFullExample[Debug log]
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBigqueryPrivateConnectionExample[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]

All tests passed
View the build log or the debug log for each test

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

I think it might be possible to test this using a TestCheckFunc to make sure that after creation, the state field is set to CREATED. Right now I assume (?) that check would fail because the connection would still be CREATING

mmv1/products/datastream/api.yaml Show resolved Hide resolved
mmv1/products/datastream/terraform.yaml Show resolved Hide resolved
@modular-magician
Copy link
Collaborator

Oops! It looks like no changelog entry is attached to this PR. Please include a release note block in the PR body, as described in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md:

```release-note:TYPE
Release note
```

@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 ( 2 files changed, 117 insertions(+))
Terraform Beta: Diff ( 2 files changed, 117 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2302
Passed tests 2052
Skipped tests: 244
Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccLoggingBucketConfigProject_cmekSettings|TestAccDatastreamPrivateConnection_datastreamPrivateConnectionFullExample|TestAccFirebaserulesRelease_BasicRelease|TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample|TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample|TestAccCloudFunctions2Function_fullUpdate

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]
TestAccDatastreamPrivateConnection_datastreamPrivateConnectionFullExample[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccCloudfunctions2function_cloudfunctions2BasicGcsExample[Error message] [Debug log]
TestAccCloudfunctions2function_cloudfunctions2BasicAuditlogsExample[Error message] [Debug log]
TestAccCloudFunctions2Function_fullUpdate[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@melinath
Copy link
Member

melinath commented Dec 1, 2022

VCR failures are unrelated

@melinath melinath merged commit ff00705 into GoogleCloudPlatform:main Dec 1, 2022
5fff pushed a commit to 5fff/magic-modules that referenced this pull request Dec 5, 2022
…ogleCloudPlatform#6862)

* Add desired state field to make sure PC is created in CREATED - b/260057913

* Revert virtual field

* Add state field check to make sure PC is created in CREATED - b/260057913

* Add error details and message in failure cases.

* Fix message formatting

* Added a post import impl
kimihrr pushed a commit to kimihrr/kimiah-magic-modules that referenced this pull request Dec 6, 2022
…ogleCloudPlatform#6862)

* Add desired state field to make sure PC is created in CREATED - b/260057913

* Revert virtual field

* Add state field check to make sure PC is created in CREATED - b/260057913

* Add error details and message in failure cases.

* Fix message formatting

* Added a post import impl
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Dec 6, 2022
…ogleCloudPlatform#6862)

* Add desired state field to make sure PC is created in CREATED - b/260057913

* Revert virtual field

* Add state field check to make sure PC is created in CREATED - b/260057913

* Add error details and message in failure cases.

* Fix message formatting

* Added a post import impl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants