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 3 default_route_action subfields to google_compute_region_url_map resource #6674

Merged

Conversation

SarahFrench
Copy link
Collaborator

@SarahFrench SarahFrench commented Oct 10, 2022

Closes hashicorp/terraform-provider-google#10660

This PR adds multiple new fields to the RegionUrlMap resource:

I've added the other fields under defaultRouteAction, but wanted to split the work across 2 PRs so it was easier to review


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)

compute: added `default_route_action.weighted_backend_services` field to `google_compute_region_url_map` resource
compute: added `default_route_action.retry_policy` field to `google_compute_region_url_map` resource
compute: added `default_route_action.request_mirror_policy` field to `google_compute_region_url_map` resource

@modular-magician
Copy link
Collaborator

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

I've detected that you're a community contributor. @ScottSuarez, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

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

I've detected that you're a community contributor. @slevenick, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


…_region_url_map` resource

Enforce mutual exclusive relationships between `defaultRouteAction.weightedBackendServices[]`, `defaultUrlRedirect` and `defaultService`
…uding `defaultRouteAction.weightedBackendServices[]`
…n_url_map` resource, update generated test
@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, 1227 insertions(+), 50 deletions(-))
Terraform Beta: Diff ( 3 files changed, 1227 insertions(+), 50 deletions(-))
TF Validator: Diff ( 3 files changed, 336 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 202 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2209
Passed tests 1963
Skipped tests: 240
Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeInstance_soleTenantNodeAffinities|TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Debug log]

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

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

@SarahFrench SarahFrench removed the request for review from slevenick October 10, 2022 23:43
@SarahFrench
Copy link
Collaborator Author

I'm removing reviewers while the PR is in draft to try and avoid spamming y'all 🙏

@SarahFrench SarahFrench changed the title Add default_route_action.weighted_backend_services field to google_compute_region_url_map resource Add 3 default_route_action subfields to google_compute_region_url_map resource Oct 10, 2022
@SarahFrench SarahFrench marked this pull request as ready for review October 11, 2022 11:49
@modular-magician
Copy link
Collaborator

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

I've detected that you're a community contributor. @megan07, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@SarahFrench SarahFrench requested review from slevenick and removed request for megan07 October 11, 2022 11:50
mmv1/products/compute/api.yaml Show resolved Hide resolved
mmv1/products/compute/api.yaml Show resolved Hide resolved
name = "<%= ctx[:vars]['region_url_map_name'] %>"
description = "a description"

default_route_action {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you write a test that updates several of the fields in here (particularly the lists like retry_policy & weighted_backend_services) to add items, remove items and/or remove the list entirely?

Updates on these sorts of fields can be complicated and produce perma-diffs for users depending on how the API is implemented, and we lose a lot of possible fixes once we release the resource with a certain implementation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do soon, after the choice about using sets is clearer! after I make the PR conform to google_compute_url_map

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tests added in 06750b7

@SarahFrench SarahFrench removed the request for review from slevenick November 4, 2022 21:48
@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 ( 4 files changed, 1421 insertions(+), 61 deletions(-))
Terraform Beta: Diff ( 4 files changed, 1421 insertions(+), 61 deletions(-))
TF Validator: Diff ( 3 files changed, 341 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 230 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2221
Passed tests 1979
Skipped tests: 239
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample|TestAccComputeRegionUrlMap_errorWhenUseID

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]

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

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

@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 ( 4 files changed, 1546 insertions(+), 49 deletions(-))
Terraform Beta: Diff ( 4 files changed, 1546 insertions(+), 49 deletions(-))
TF Validator: Diff ( 3 files changed, 336 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 230 insertions(+))

@SarahFrench
Copy link
Collaborator Author

This resource is a bit of a pain and this PR is a bit messy, apologies!

I've made changes so that this PR adds fields to google_compute_region_url_map in a way that matches the google_compute_url_map resource

RegionUrlMap UrlMap
weightedBackendServices added in this PR weightedBackendServices
retryPolicy added in this PR retryPolicy
requestMirrorPolicy added in this PR requestMirrorPolicy

@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 ( 4 files changed, 1553 insertions(+), 49 deletions(-))
Terraform Beta: Diff ( 4 files changed, 1553 insertions(+), 49 deletions(-))
TF Validator: Diff ( 3 files changed, 336 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 230 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2228
Passed tests 1985
Skipped tests: 240
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeRegionUrlMap_defaultRouteAction_full_update|TestAccComputeForwardingRule_update

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeRegionUrlMap_defaultRouteAction_full_update[Debug log]
TestAccComputeForwardingRule_update[Debug log]

All tests passed
View the build log or the debug log for each test

@SarahFrench
Copy link
Collaborator Author

Thanks!

@SarahFrench SarahFrench merged commit 7de8791 into GoogleCloudPlatform:main Nov 14, 2022
googlerjk pushed a commit to googlerjk/magic-modules that referenced this pull request Nov 22, 2022
…map` resource (GoogleCloudPlatform#6674)

* Add `defaultRouteAction.weightedBackendServices[]` to `google_compute_region_url_map` resource

Enforce mutual exclusive relationships between `defaultRouteAction.weightedBackendServices[]`, `defaultUrlRedirect` and `defaultService`

* Add generated test for `google_compute_region_url_map` resource, including `defaultRouteAction.weightedBackendServices[]`

* Add `defaultRouteAction.retryPolicy` to `google_compute_region_url_map` resource, update generated test

* Add `defaultRouteAction.requestMirrorPolicy` to `google_compute_region_url_map` resource, update generated test

* Add missing field descriptions

* Add missing `properties` field from `requestMirrorPolicy` definition

* Update example (an generated tests) to have multiple `weighted_backend_services` blocks and nested blocks

* Convert `defaultRouteAction.weightedBackendServices` and `defaultRouteAction.weightedBackendServices.headerAction.*` lists to sets, add test showing issue with permadiff

* Remove use of sets, to match global version of the resource

* Add `conflicts` field between `default_url_redirect` and `default_route_action`

To match UrlMap resource : https://github.com/hashicorp/magic-modules/blob/4f1ef3974f99d6a9efa95ea0284ee831cc63d2f5/mmv1/products/compute/api.yaml#L18556-L18557

* Remove validation for field not added in this PR

* Update acceptance test to set and update `retry_policy`, `request_mirror_policy`, and`weighted_backend_services` fields within `default_route_action`

* Add missing `at_least_one_of` fields, for parity with the global version of this resource

* Update `at_least_one_of` field to reference fields currently within `default_route_action`, add field to `retryPolicy`
googlerjk pushed a commit to googlerjk/magic-modules that referenced this pull request Nov 25, 2022
…map` resource (GoogleCloudPlatform#6674)

* Add `defaultRouteAction.weightedBackendServices[]` to `google_compute_region_url_map` resource

Enforce mutual exclusive relationships between `defaultRouteAction.weightedBackendServices[]`, `defaultUrlRedirect` and `defaultService`

* Add generated test for `google_compute_region_url_map` resource, including `defaultRouteAction.weightedBackendServices[]`

* Add `defaultRouteAction.retryPolicy` to `google_compute_region_url_map` resource, update generated test

* Add `defaultRouteAction.requestMirrorPolicy` to `google_compute_region_url_map` resource, update generated test

* Add missing field descriptions

* Add missing `properties` field from `requestMirrorPolicy` definition

* Update example (an generated tests) to have multiple `weighted_backend_services` blocks and nested blocks

* Convert `defaultRouteAction.weightedBackendServices` and `defaultRouteAction.weightedBackendServices.headerAction.*` lists to sets, add test showing issue with permadiff

* Remove use of sets, to match global version of the resource

* Add `conflicts` field between `default_url_redirect` and `default_route_action`

To match UrlMap resource : https://github.com/hashicorp/magic-modules/blob/4f1ef3974f99d6a9efa95ea0284ee831cc63d2f5/mmv1/products/compute/api.yaml#L18556-L18557

* Remove validation for field not added in this PR

* Update acceptance test to set and update `retry_policy`, `request_mirror_policy`, and`weighted_backend_services` fields within `default_route_action`

* Add missing `at_least_one_of` fields, for parity with the global version of this resource

* Update `at_least_one_of` field to reference fields currently within `default_route_action`, add field to `retryPolicy`
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Dec 6, 2022
…map` resource (GoogleCloudPlatform#6674)

* Add `defaultRouteAction.weightedBackendServices[]` to `google_compute_region_url_map` resource

Enforce mutual exclusive relationships between `defaultRouteAction.weightedBackendServices[]`, `defaultUrlRedirect` and `defaultService`

* Add generated test for `google_compute_region_url_map` resource, including `defaultRouteAction.weightedBackendServices[]`

* Add `defaultRouteAction.retryPolicy` to `google_compute_region_url_map` resource, update generated test

* Add `defaultRouteAction.requestMirrorPolicy` to `google_compute_region_url_map` resource, update generated test

* Add missing field descriptions

* Add missing `properties` field from `requestMirrorPolicy` definition

* Update example (an generated tests) to have multiple `weighted_backend_services` blocks and nested blocks

* Convert `defaultRouteAction.weightedBackendServices` and `defaultRouteAction.weightedBackendServices.headerAction.*` lists to sets, add test showing issue with permadiff

* Remove use of sets, to match global version of the resource

* Add `conflicts` field between `default_url_redirect` and `default_route_action`

To match UrlMap resource : https://github.com/hashicorp/magic-modules/blob/4f1ef3974f99d6a9efa95ea0284ee831cc63d2f5/mmv1/products/compute/api.yaml#L18556-L18557

* Remove validation for field not added in this PR

* Update acceptance test to set and update `retry_policy`, `request_mirror_policy`, and`weighted_backend_services` fields within `default_route_action`

* Add missing `at_least_one_of` fields, for parity with the global version of this resource

* Update `at_least_one_of` field to reference fields currently within `default_route_action`, add field to `retryPolicy`
@SarahFrench SarahFrench deleted the update-regional-url-map branch March 26, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants