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

feat(spanner): add instance autoscaling attributes to spanner instance resource #9403

Merged
merged 5 commits into from
Nov 8, 2023
Merged

feat(spanner): add instance autoscaling attributes to spanner instance resource #9403

merged 5 commits into from
Nov 8, 2023

Conversation

rahul2393
Copy link
Contributor

@rahul2393 rahul2393 commented Nov 3, 2023

Release Note Template for Downstream PRs (will be copied)

spanner: added `autoscaling_config` field to  `google_spanner_instance`

@rahul2393 rahul2393 changed the title feat(spanner): add instance autoscaling attributed to spanner instanc… feat(spanner): add instance autoscaling attributed to spanner instance resource Nov 3, 2023
@modular-magician
Copy link
Collaborator

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

@zli82016, 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.

@rahul2393 rahul2393 changed the title feat(spanner): add instance autoscaling attributed to spanner instance resource feat(spanner): add instance autoscaling attributes to spanner instance resource Nov 3, 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 ( 3 files changed, 384 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 3 files changed, 384 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 102 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3204
Passed tests 2877
Skipped tests: 323
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
TestAccContainerAwsCluster_BetaBasicEnumHandWritten|TestAccContainerAwsCluster_BetaBasicHandWritten|TestAccLoggingProjectSink_updatePreservesCustomWriter|TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerAwsCluster_BetaBasicEnumHandWritten[Debug log]
TestAccContainerAwsCluster_BetaBasicHandWritten[Debug log]
TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfig[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:}}$
TestAccLoggingProjectSink_updatePreservesCustomWriter[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

@rahul2393
Copy link
Contributor Author

/gcbrun

@rahul2393
Copy link
Contributor Author

@zli82016 can you please help review this

@zli82016
Copy link
Member

zli82016 commented Nov 6, 2023

The API documentation is not updated to have the new field. Will the API doc be updated soon?
https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances

@rahul2393
Copy link
Contributor Author

The API documentation is not updated to have the new field. Will the API doc be updated soon?

Yes its scheduled to be announced in public next week, proto changes and client library changes has already been merged, we need Terraform support before public announcement.

@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 ( 3 files changed, 395 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 3 files changed, 395 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 102 insertions(+), 2 deletions(-))

Missing test report

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

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

resource "google_spanner_instance" "primary" {
  autoscaling_config {
    autoscaling_limits {
      max_processing_units = # value needed
      min_processing_units = # value needed
    }
    autoscaling_targets {
      high_priority_cpu_utilization_percent = # value needed
      storage_utilization_percent           = # value needed
    }
  }
}

@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 ( 3 files changed, 395 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 3 files changed, 395 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 102 insertions(+), 2 deletions(-))

Missing test report

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

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

resource "google_spanner_instance" "primary" {
  autoscaling_config {
    autoscaling_limits {
      max_processing_units = # value needed
      min_processing_units = # value needed
    }
    autoscaling_targets {
      high_priority_cpu_utilization_percent = # value needed
      storage_utilization_percent           = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3207
Passed tests 2880
Skipped tests: 325
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccLoggingProjectSink_updatePreservesCustomWriter|TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfig

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@zli82016
Copy link
Member

zli82016 commented Nov 7, 2023

The test failed. It looks like the new field needs to be added to fieldMask in https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/templates/terraform/encoders/spanner_instance_update.go.erb

@rahul2393
Copy link
Contributor Author

The test failed. It looks like the new field needs to be added to fieldMask in https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/templates/terraform/encoders/spanner_instance_update.go.erb

Thanks @zli82016 for pointing me this, have incorporated the changes and added tests. please help review.
Screenshot 2023-11-08 at 00 35 12

@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 ( 3 files changed, 453 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 3 files changed, 453 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 102 insertions(+), 2 deletions(-))

@zli82016
Copy link
Member

zli82016 commented Nov 7, 2023

Can you please fix the unit tests, @rahul2393 ? Thanks.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3210
Passed tests 2884
Skipped tests: 325
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
TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfigUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@rahul2393
Copy link
Contributor Author

Can you please fix the unit tests, @rahul2393 ? Thanks.

Fixed!!

@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 ( 3 files changed, 453 insertions(+), 5 deletions(-))
Terraform Beta: Diff ( 3 files changed, 453 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 102 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3225
Passed tests 2897
Skipped tests: 328
Affected tests: 0

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. LGTM.

@zli82016 zli82016 merged commit 445f283 into GoogleCloudPlatform:main Nov 8, 2023
14 checks passed
swamitagupta pushed a commit to swamitagupta/magic-modules that referenced this pull request Nov 14, 2023
…e resource (GoogleCloudPlatform#9403)

* feat(spanner): add instance autoscaling attributed to spanner instance resource

* add update tests

* fix tests

* fix tests

* fix lint
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 28, 2023
…e resource (GoogleCloudPlatform#9403)

* feat(spanner): add instance autoscaling attributed to spanner instance resource

* add update tests

* fix tests

* fix tests

* fix lint
jialei-chen pushed a commit to jialei-chen/magic-modules that referenced this pull request Nov 29, 2023
…e resource (GoogleCloudPlatform#9403)

* feat(spanner): add instance autoscaling attributed to spanner instance resource

* add update tests

* fix tests

* fix tests

* fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants