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

Mark num_finite_buckets required for cloud logging metric bucket_options #8780

Merged

Conversation

pengq-google
Copy link
Contributor

@pengq-google pengq-google commented Aug 28, 2023

Fixes hashicorp/terraform-provider-google#12964

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).
  • 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).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

logging: made `growth_factor`, `num_finite_buckets`, and `scale` required for `google_logging_metric`

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

@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
Copy link
Collaborator

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field bucket_options.exponential_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

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

Terraform GA: Diff ( 3 files changed, 9 insertions(+), 10 deletions(-))
Terraform Beta: Diff ( 3 files changed, 9 insertions(+), 10 deletions(-))

@c2thorn c2thorn changed the base branch from main to FEATURE-BRANCH-major-release-5.0.0 August 28, 2023 17:19
@c2thorn c2thorn requested review from c2thorn and removed request for roaks3 August 28, 2023 17:19
@@ -246,6 +247,7 @@ properties:
- bucket_options.0.exponential_buckets.0.scale
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::Double
name: growthFactor
at_least_one_of:
Copy link
Member

Choose a reason for hiding this comment

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

We should remove the requirement for at_least_one_of for all 3 of the child fields numFiniteBuckets, growthFactor, and scale

Copy link
Member

Choose a reason for hiding this comment

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

This is why the build fails, the two restrictions (required, at least one of) are conflicting

@c2thorn
Copy link
Member

c2thorn commented Aug 28, 2023

Since this is a feature for the 5.0.0 release, I've updated the base branch to the 5.0.0 branch. There is a second PR required for this change where we update the 5.0.0 upgrade guide for this breaking change on the main branch. Instructions are on https://googlecloudplatform.github.io/magic-modules/develop/make-a-breaking-change/#add-upgrade-guide-entries-to-the-main-branch-of-magic-modules

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field bucket_options.exponential_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

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

Terraform GA: Diff ( 3 files changed, 10 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 3 files changed, 10 insertions(+), 13 deletions(-))

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field bucket_options.exponential_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

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

Terraform GA: Diff ( 3 files changed, 11 insertions(+), 13 deletions(-))
Terraform Beta: Diff ( 3 files changed, 11 insertions(+), 13 deletions(-))

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field bucket_options.exponential_buckets.growth_factor changed from optional to required on google_logging_metric - reference
  • Field bucket_options.exponential_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.exponential_buckets.scale changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.offset changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.width changed from optional to required on google_logging_metric - reference

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

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

Terraform GA: Diff ( 3 files changed, 25 insertions(+), 31 deletions(-))
Terraform Beta: Diff ( 3 files changed, 25 insertions(+), 31 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2994
Passed tests 2692
Skipped tests: 301
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
TestAccDataLossPreventionJobTrigger_dlpJobTriggerInspectCustomInfoTypes

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@@ -37,7 +37,7 @@ func ResourceLoggingProjectSink() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
Default: false,
ForceNew: true,
ForceNew: true,
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
ForceNew: true,
ForceNew: true,

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field bucket_options.exponential_buckets.growth_factor changed from optional to required on google_logging_metric - reference
  • Field bucket_options.exponential_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.exponential_buckets.scale changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.offset changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.width changed from optional to required on google_logging_metric - reference

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

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

Terraform GA: Diff ( 3 files changed, 26 insertions(+), 30 deletions(-))
Terraform Beta: Diff ( 3 files changed, 26 insertions(+), 30 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2994
Passed tests 2693
Skipped tests: 301
Affected tests: 0

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

description: |
Must be greater than 1.
required: true
Copy link
Member

Choose a reason for hiding this comment

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

just making sure, are all of these fields required? Or only numFiniteBuckets?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Thanks!

@modular-magician
Copy link
Collaborator

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

Breaking Change(s) Detected

The following breaking change(s) were detected within your pull request.

  • Field bucket_options.exponential_buckets.growth_factor changed from optional to required on google_logging_metric - reference
  • Field bucket_options.exponential_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.exponential_buckets.scale changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.num_finite_buckets changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.offset changed from optional to required on google_logging_metric - reference
  • Field bucket_options.linear_buckets.width changed from optional to required on google_logging_metric - reference

If you believe this detection to be incorrect please raise the concern with your reviewer. If you intend to make this change you will need to wait for a major release window. An override-breaking-change label can be added to allow merging.

Diff report

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

Terraform GA: Diff ( 2 files changed, 24 insertions(+), 30 deletions(-))
Terraform Beta: Diff ( 2 files changed, 24 insertions(+), 30 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3002
Passed tests 2700
Skipped tests: 301
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
TestAccDataSourceGoogleServiceAccountAccessToken_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@c2thorn c2thorn merged commit 415c90d into GoogleCloudPlatform:FEATURE-BRANCH-major-release-5.0.0 Aug 30, 2023
pengq-google added a commit to pengq-google/magic-modules that referenced this pull request Sep 1, 2023
pengq-google added a commit to pengq-google/magic-modules that referenced this pull request Sep 1, 2023
pengq-google added a commit to pengq-google/magic-modules that referenced this pull request Sep 7, 2023
pengq-google added a commit to pengq-google/magic-modules that referenced this pull request Sep 7, 2023
c2thorn added a commit that referenced this pull request Sep 11, 2023
RileyHYZ pushed a commit to RileyHYZ/magic-modules that referenced this pull request Sep 15, 2023
joelkattapuram pushed a commit to joelkattapuram/magic-modules that referenced this pull request Sep 20, 2023
@pengq-google pengq-google deleted the b2 branch October 26, 2023 19:18
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