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 'force' parameter to all Datastream resources #10684

Conversation

alexandrunagy
Copy link
Contributor

@alexandrunagy alexandrunagy commented May 13, 2024

Adds the 'force' parameter for Datastream resources. This parameter allows creating the resources without validations.

The API parameter definition for each resource:

Fixes hashicorp/terraform-provider-google#14022

Release Note Template for Downstream PRs (will be copied)

datastream: added `create_without_validation` field to `google_datastream_connection_profile`, `google_datastream_private_connection` and `google_datastream_stream` resources

Copy link

google-cla bot commented May 13, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot requested a review from slevenick May 13, 2024 17:58
Copy link

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

@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 May 13, 2024
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.

Can you add this field to some tests so we can validate that it works correctly?

@github-actions github-actions bot requested a review from slevenick May 14, 2024 11:25
@alexandrunagy
Copy link
Contributor Author

alexandrunagy commented May 14, 2024

@slevenick added it to some, let me know if there are other places where I should add it

Copy link

This PR has been waiting for review for 2 days. Please take a look! Use the label disable-review-reminders to disable these notifications.

@slevenick
Copy link
Contributor

I'm thinking we should rename this field. Usually force is used for a force-delete behavior, as described in https://google.aip.dev/165

Maybe force_create or create_without_validation would be more clear about what this actually does?

@modular-magician modular-magician added service/datastream and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels May 16, 2024
@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 ( 10 files changed, 46 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 10 files changed, 46 insertions(+), 11 deletions(-))

Missing test report

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

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

resource "google_datastream_connection_profile" "primary" {
  force = # value needed
}

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

resource "google_datastream_private_connection" "primary" {
  force = # value needed
}

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

resource "google_datastream_stream" "primary" {
  force = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 1
Skipped tests: 7
Affected tests: 3

Click here to see the affected service packages
  • datastream

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
TestAccDatastreamConnectionProfile_datastreamConnectionProfileBasicExample|TestAccDatastreamConnectionProfile_datastreamConnectionProfileFullExample|TestAccDatastreamPrivateConnection_datastreamPrivateConnectionFullExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@alexandrunagy
Copy link
Contributor Author

I'm thinking we should rename this field. Usually force is used for a force-delete behavior, as described in https://google.aip.dev/165

Maybe force_create or create_without_validation would be more clear about what this actually does?

@slevenick renamed to create_without_validation

@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 May 17, 2024
@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 ( 10 files changed, 46 insertions(+), 11 deletions(-))
google-beta provider: Diff ( 10 files changed, 46 insertions(+), 11 deletions(-))

Missing test report

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

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

resource "google_datastream_connection_profile" "primary" {
  create_without_validation = # value needed
}

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

resource "google_datastream_private_connection" "primary" {
  create_without_validation = # value needed
}

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

resource "google_datastream_stream" "primary" {
  create_without_validation = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 11
Passed tests: 4
Skipped tests: 7
Affected tests: 0

Click here to see the affected service packages
  • datastream

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

@slevenick slevenick merged commit a39eb4f into GoogleCloudPlatform:main May 17, 2024
14 checks passed
avijain25 pushed a commit to avijain25/magic-modules that referenced this pull request May 21, 2024
ma-g-22 pushed a commit to ma-g-22/magic-modules that referenced this pull request May 21, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants