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

Support Query Insights #4464

Merged
merged 3 commits into from
Feb 10, 2021
Merged

Conversation

itkq
Copy link
Contributor

@itkq itkq commented Feb 4, 2021

Fixes hashicorp/terraform-provider-google#8328

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).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • 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).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

sql: added `insights_config` block to `google_sql_database_instance` resource

@google-cla
Copy link

google-cla bot commented Feb 4, 2021

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

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Feb 4, 2021
@modular-magician
Copy link
Collaborator

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

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@c2thorn, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))

@itkq
Copy link
Contributor Author

itkq commented Feb 4, 2021

@googlebot I signed it!

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))

Copy link

@ve6yeq ve6yeq left a comment

Choose a reason for hiding this comment

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

LGTM

@c2thorn
Copy link
Member

c2thorn commented Feb 9, 2021

Sorry for the delay, I should be able to get to this over the next day or so

@c2thorn
Copy link
Member

c2thorn commented Feb 9, 2021

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171656"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccSqlDatabaseInstance_insights You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171672"

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccSqlDatabaseInstance_insights Please fix these to complete your PR

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

Only a couple of small asks here, overall great! Tests also passing.

@@ -179,3 +179,13 @@ The `replica_configuration` block contains:
* `server_ca_cert.0.expiration_time` - Expiration time of the CA Cert.

* `server_ca_cert.0.sha1_fingerprint` - SHA Fingerprint of the CA Cert.

The `settings.insights_config` subblock for instances declares [Query Insights](https://cloud.google.com/sql/docs/postgres/insights-overview) configuration. It contains:
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this sub block just above the replica_configuration block (line 129)? To be closer with other settings blocks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed 8464a20

@@ -1322,6 +1346,26 @@ resource "google_sql_database_instance" "instance" {
}
`

var testGoogleSqlDatabaseInstance_insights = `
resource "google_sql_database_instance" "instance" {
name = "tf-lw-%d"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name = "tf-lw-%d"
name = "tf-test-%d"

Allows any hanging database instances to be swept (some other test configs in this file are outdated)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 42df0e2

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))

@c2thorn
Copy link
Member

c2thorn commented Feb 10, 2021

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171761"

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))
Terraform Beta: Diff ( 3 files changed, 139 insertions(+), 1 deletion(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccEssentialContactsContact_essentialContactExample|TestAccSqlDatabaseInstance_insights You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=171763"

@itkq itkq deleted the sql-insights branch February 10, 2021 23:07
@itkq
Copy link
Contributor Author

itkq commented Feb 10, 2021

Thanks!

venkykuberan pushed a commit to venkykuberan/magic-modules that referenced this pull request Feb 11, 2021
* Support Query Insights

* Fix test instance name

* Move doc of settings.insights_config closer with other settings blocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Query Insights fields to google_sql_database_instance
4 participants