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 WEIGHTED_MAGLEV to localityLbPolicy enum, and update associated docstrings. #7444

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

uberferg
Copy link
Contributor

@uberferg uberferg commented Mar 10, 2023

This PR adds WEIGHTED_MAGLEV to the enum for localist_lb_policy, resolving b/272540261 and unblocking NetLB Weighted Load Balancing GA.

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 the Release Notes Guide before writing my release note below.
compute: added `WEIGHED_MAGLEV` to `locality_lb_policy` enum for backend service resources.

@uberferg uberferg requested a review from a team as a code owner March 10, 2023 21:56
@uberferg uberferg requested review from roaks3 and removed request for a team March 10, 2023 21:56
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.

Changes look good to me (and sorry for the delay).

The one thing I wanted to check in on before approving: can you help me understand which parts of this are beta-only? I was expecting either:

  1. All additions being GA
  2. The new enum being marked in the description as "beta only" in some way

@uberferg
Copy link
Contributor Author

Thanks for the review!

All additions here are supposed to be GA. Was the point of confusion due to the min_version: beta line in terraform.yaml? If so, sorry about that, I wasn't sure exactly what that line did, but it was in a lot of the other examples, and didn't seem to affect the tests passing for the generated tpg and tpg beta.

@roaks3
Copy link
Contributor

roaks3 commented Mar 17, 2023

Ah ok, yep, the min_version: beta line means that a test will only be generated for the beta version of the provider. So in this case, the test you've added would not be run for the regular terraform-provider-google, which is probably not ideal. If you can remove that line and have this test run for both providers, you'll also want to remove provider = google-beta, as it is only needed to ensure the beta version of the resource is used.

@roaks3
Copy link
Contributor

roaks3 commented Mar 17, 2023

Oh also, now that I'm seeing the conflict, we made a project-wide change that will require you to move the config you have in terraform.yaml to the RegionBackendService.yaml, after a rebase.

@uberferg
Copy link
Contributor Author

Thanks for the explanation. In hindsight, it makes sense to me that min_version: beta would exclude GA, since beta > GA, but at the time, for some reason I thought the opposite, haha.

Think I made all the requested changes, and included the updated changes from main. PTAL.

@roaks3
Copy link
Contributor

roaks3 commented Mar 21, 2023

/gcbrun

@modular-magician modular-magician requested a review from roaks3 March 21, 2023 13:51
@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, 150 insertions(+), 14 deletions(-))
Terraform Beta: Diff ( 5 files changed, 150 insertions(+), 14 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2514
Passed tests 2245
Skipped tests: 263
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccLoggingBucketConfigProject_analyticsEnabled|TestAccLoggingBucketConfig_CreateBuckets_withCustomId|TestAccLoggingBucketConfigProject_cmekSettings|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeRegionBackendService_regionBackendServiceExternalWeightedExample|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccLoggingBucketConfigProject_analyticsEnabled[Debug log]
TestAccLoggingBucketConfig_CreateBuckets_withCustomId[Debug log]
TestAccLoggingBucketConfigProject_cmekSettings[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccComputeRegionBackendService_regionBackendServiceExternalWeightedExample[Error message] [Debug log]
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

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.

Code looks good, just the one test failure that needs to be fixed

@roaks3
Copy link
Contributor

roaks3 commented Mar 21, 2023

/gcbrun

@uberferg
Copy link
Contributor Author

Just fixed the test. Sorry about that, I was negligent and didn't re-run tests after the merge yesterday.

@modular-magician modular-magician requested a review from roaks3 March 21, 2023 15:44
@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, 150 insertions(+), 14 deletions(-))
Terraform Beta: Diff ( 5 files changed, 150 insertions(+), 14 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2514
Passed tests 2248
Skipped tests: 263
Affected tests: 3

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
TestAccComputeRegionBackendService_regionBackendServiceExternalWeightedExample|TestAccLoggingBucketConfigProject_analyticsEnabled|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeRegionBackendService_regionBackendServiceExternalWeightedExample[Debug log]
TestAccLoggingBucketConfigProject_analyticsEnabled[Debug log]

Tests failed during RECORDING mode:
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

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.

Oh no worries, thanks for fixing. LGTM

dannawang0221 pushed a commit to dannawang0221/magic-modules that referenced this pull request Mar 24, 2023
…ocstrings. (GoogleCloudPlatform#7444)

* Add WEIGHTED_MAGLEV to localityLbPolicy enum, and update associated docstrings.

* Example for WEIGHTED_MAGLEV uses HTTP health check.
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
…ocstrings. (GoogleCloudPlatform#7444)

* Add WEIGHTED_MAGLEV to localityLbPolicy enum, and update associated docstrings.

* Example for WEIGHTED_MAGLEV uses HTTP health check.
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