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 ssl_mode option to google_sql_database_instance. #9316

Merged
merged 5 commits into from
Oct 25, 2023

Conversation

feng-zhe
Copy link
Contributor

@feng-zhe feng-zhe commented Oct 20, 2023

This PR adds support for the new field ssl_mode to google_sql_database_instance. This new field is only available for google.golang.org/api v0.148.0 or after. Acctests are added for each database types and they all passed.

Release Note Template for Downstream PRs (will be copied)

sql: added `ssl_mode` field to `google_sql_database_instance` resource

@modular-magician
Copy link
Collaborator

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

@roaks3, 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 Oct 20, 2023
Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Some nits, but LGTM. Main thing is if we can reduce the tests a bit.

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

Running tests now, but code LGTM

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Oct 24, 2023
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Breaking Change Detection Failed

The breaking change detector crashed during execution. This is usually due to the downstream provider(s) failing to compile. Please investigate or follow up with your reviewer.

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 5 files changed, 328 insertions(+), 239 deletions(-))
Terraform Beta: Diff ( 5 files changed, 328 insertions(+), 239 deletions(-))

@roaks3
Copy link
Contributor

roaks3 commented Oct 24, 2023

Build error is:

Step #22 - "gcb-tpg-vcr-test": go: updates to go.mod needed; to update it:
Step #22 - "gcb-tpg-vcr-test": 	go mod tidy

I suspect the library bump needs to be fixed (see yaqs/8444818848342867968#a1n2)

@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 Oct 24, 2023
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Breaking Change Detection Failed

The breaking change detector crashed during execution. This is usually due to the downstream provider(s) failing to compile. Please investigate or follow up with your reviewer.

Diff report

Your PR generated some diffs in downstreams - here they are.

Terraform GA: Diff ( 5 files changed, 361 insertions(+), 271 deletions(-))
Terraform Beta: Diff ( 5 files changed, 361 insertions(+), 271 deletions(-))

@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 Oct 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, 123 insertions(+), 36 deletions(-))
Terraform Beta: Diff ( 5 files changed, 123 insertions(+), 36 deletions(-))

Missing test report

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

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

resource "google_sql_database_instance" "primary" {
  settings {
    ip_configuration {
      ssl_mode = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3171
Passed tests 2851
Skipped tests: 319
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
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@feng-zhe
Copy link
Contributor Author

It is unclear why the above test terraform-google-conversion-build-and-unit-tests failed. The error is

../../../../go/pkg/mod/github.com/modular-magician/terraform-provider-google-beta@v1.20.1-0.20231024211950-df57ab7a5264/google-beta/services/sql/resource_sql_database_instance.go:441:147: syntax error: unexpected newline in composite literal; possibly missing comma or }

But that should have been fixed by 5b96b40. And I manually generated the provider locally and there is no error.

slevenick added a commit to slevenick/magic-modules that referenced this pull request Oct 25, 2023
jiayimeow pushed a commit to jiayimeow/magic-modules that referenced this pull request Oct 31, 2023
…form#9316)

* Add ssl_mode option to google_sql_database_instance.

* Remove unnecessary ssl_mode values and related tests.

* Improve the doc and description for ssl_mode and require_ssl

* Bump the dependency libraries' versions for google.golang.org/api v0.148.0

* Fix a missing comma which causes syntax error.
jiayimeow pushed a commit to jiayimeow/magic-modules that referenced this pull request Oct 31, 2023
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 28, 2023
…form#9316)

* Add ssl_mode option to google_sql_database_instance.

* Remove unnecessary ssl_mode values and related tests.

* Improve the doc and description for ssl_mode and require_ssl

* Bump the dependency libraries' versions for google.golang.org/api v0.148.0

* Fix a missing comma which causes syntax error.
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 28, 2023
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this pull request Nov 29, 2023
…form#9316)

* Add ssl_mode option to google_sql_database_instance.

* Remove unnecessary ssl_mode values and related tests.

* Improve the doc and description for ssl_mode and require_ssl

* Bump the dependency libraries' versions for google.golang.org/api v0.148.0

* Fix a missing comma which causes syntax error.
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this pull request Nov 29, 2023
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.

3 participants