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 remaining default_route_action subfields to google_compute_region_url_map resource #6676

Merged

Conversation

SarahFrench
Copy link
Collaborator

@SarahFrench SarahFrench commented Oct 11, 2022

This PR adds the remaining defaultRouteAction.* fields that aren't in the first PR (#6674)

The new fields:

Field name API documentation Where this is defined for global version of this resource
defaultRouteAction.urlRewrite API docs Link to code
defaultRouteAction.corsPolicy API docs Link to code
defaultRouteAction.faultInjectionPolicy API docs Link to code
defaultRouteAction.timeout API docs Link to code

NOTE: This PR (and previous PR) do not implement the defaultRouteAction.maxStreamDuration field, because this is currently missing from the global url map resource. I'm aiming to get parity between the two url map resources, not necessarily 100% coverage of this field.

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.url_rewrite` field to `google_compute_region_url_map` resource
compute: added `default_route_action.cors_policy` field to `google_compute_region_url_map` resource
compute: added `default_route_action.fault_injection_policy` field to `google_compute_region_url_map` resource
compute: added `default_route_action.timeout` 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. @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.


@SarahFrench
Copy link
Collaborator Author

SarahFrench commented Oct 11, 2022

This PR is still in draft, and would ideally be rebased after this PR (#6674) gets merged first

Removing reviewers while this is in draft

@SarahFrench SarahFrench removed the request for review from slevenick October 11, 2022 00:35
@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, 3277 insertions(+), 1115 deletions(-))
Terraform Beta: Diff ( 3 files changed, 3277 insertions(+), 1115 deletions(-))
TF Validator: Diff ( 3 files changed, 656 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 242 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2216
Passed tests 1973
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
TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample|TestAccComputeInstance_soleTenantNodeAffinities|TestAccCGCSnippet_eventarcWorkflowsExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample[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 force-pushed the update-regional-url-map-even-more branch from 1f721fa to 282cd80 Compare November 14, 2022 18:07
@SarahFrench
Copy link
Collaborator Author

SarahFrench commented Nov 14, 2022

Just rebased this PR, following the first PR being updated (since this PR was opened) and being merged into main

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

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, 1031 insertions(+), 46 deletions(-))
Terraform Beta: Diff ( 3 files changed, 1031 insertions(+), 46 deletions(-))
TF Validator: Diff ( 3 files changed, 323 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 1 file changed, 40 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2251
Passed tests 2006
Skipped tests: 241
Failed tests: 4

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|TestAccComputeForwardingRule_update|TestAccComputeGlobalForwardingRule_labels

@modular-magician
Copy link
Collaborator

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

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

@rileykarson
Copy link
Member

This is still in draft, just confirming you want a review pass done now? I see it was used to mark it wasn't ready for review above, but the criteria to move forward appears to have been met.

Also, you can remove automatic assignment for yourself by adding your username to the list on

if $(echo $USER | fgrep -wq -e megan07 -e rambleraptor -e SirGitsalot -e slevenick -e c2thorn -e rileykarson -e melinath -e ScottSuarez -e shuyama1); then
if you'd like!

@SarahFrench
Copy link
Collaborator Author

Hi, sorry no I don't want a review now - the PR needs some edits so I left it in draft and forgot to remove the auto-assigned reviewer. I'll add myself to that list, thank you!

@SarahFrench SarahFrench removed the request for review from rileykarson November 15, 2022 11:11
@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

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, 1055 insertions(+), 46 deletions(-))
Terraform Beta: Diff ( 3 files changed, 1055 insertions(+), 46 deletions(-))
TF Validator: Diff ( 3 files changed, 323 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 1 file changed, 40 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2254
Passed tests 2011
Skipped tests: 241
Failed tests: 2

Action taken

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

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeGlobalForwardingRule_labels[Debug log]
TestAccComputeForwardingRule_update[Debug log]

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

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


@SarahFrench
Copy link
Collaborator Author

Updated the handwritten test with the new fields, but excluded default_route_action.cors_policy. allow_origin_regexes because it has an API error in this test due to this restriction:

Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

@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, 1098 insertions(+), 46 deletions(-))
Terraform Beta: Diff ( 4 files changed, 1098 insertions(+), 46 deletions(-))
TF Validator: Diff ( 3 files changed, 323 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 1 file changed, 40 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2254
Passed tests 2012
Skipped tests: 241
Failed tests: 1

Action taken

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

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeRegionUrlMap_defaultRouteAction_full_update[Debug log]

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

@SarahFrench SarahFrench marked this pull request as ready for review November 15, 2022 19:53
@SarahFrench
Copy link
Collaborator Author

I think this PR is ready for review now - I've made the new field match the global version of the resource (linked in PR description) and the test has been updated. The test omits one field as it requires a specific load balancer config (see here).

Copy link
Contributor

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

A few configuration asks and one test fix ask.

Comment on lines 69 to 70
host_rewrite = "A replacement header"
path_prefix_rewrite = "A replacement path"
Copy link
Contributor

Choose a reason for hiding this comment

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

I worry about server side validation breaking this in the future since they aren't valid hosts/prefixes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's a fair worry! I've replaced these values in 7613ca4

mmv1/products/compute/api.yaml Show resolved Hide resolved
@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 ( 7 files changed, 1121 insertions(+), 68 deletions(-))
Terraform Beta: Diff ( 7 files changed, 1121 insertions(+), 68 deletions(-))
TF Validator: Diff ( 3 files changed, 323 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 46 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2264
Passed tests 2014
Skipped tests: 241
Failed tests: 9

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccComputeUrlMap_trafficDirectorPathUpdate|TestAccComputeUrlMap_defaultRouteActionTrafficDirectorPathUpdate|TestAccComputeUrlMap_defaultRouteActionTrafficDirectorUpdate|TestAccComputeUrlMap_urlMapTrafficDirectorPathExample|TestAccComputeRegionUrlMap_ilbPathUpdate|TestAccComputeRegionUrlMap_regionUrlMapL7IlbPathPartialExample|TestAccComputeRegionUrlMap_regionUrlMapL7IlbPathExample|TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeUrlMap_trafficDirectorPathUpdate[Debug log]
TestAccComputeUrlMap_defaultRouteActionTrafficDirectorPathUpdate[Debug log]
TestAccComputeUrlMap_defaultRouteActionTrafficDirectorUpdate[Debug log]
TestAccComputeUrlMap_urlMapTrafficDirectorPathExample[Debug log]
TestAccComputeRegionUrlMap_ilbPathUpdate[Debug log]
TestAccComputeRegionUrlMap_regionUrlMapL7IlbPathPartialExample[Debug log]
TestAccComputeRegionUrlMap_regionUrlMapL7IlbPathExample[Debug log]
TestAccComputeRegionUrlMap_regionUrlMapDefaultRouteActionExample[Debug log]

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

Copy link
Contributor

@ScottSuarez ScottSuarez left a comment

Choose a reason for hiding this comment

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

Small test modification request but approved otherwise.

Comment on lines 1095 to 1096
path_prefix_rewrite = "foobar-2"
host_rewrite = "fizzbuzz-2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar comment regarding prefix and host rewrites

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! I've updated all the instances of these fields across all the url map resources' tests. As the tests have passed I'll go ahead and merge.

@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 ( 7 files changed, 1137 insertions(+), 84 deletions(-))
Terraform Beta: Diff ( 7 files changed, 1137 insertions(+), 84 deletions(-))
TF Validator: Diff ( 3 files changed, 323 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 4 files changed, 46 insertions(+), 6 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2268
Passed tests 2018
Skipped tests: 243
Failed tests: 7

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccComputeUrlMap_trafficDirectorPathUpdate|TestAccComputeUrlMap_defaultRouteActionUrlRewrite|TestAccComputeUrlMap_defaultRouteActionTrafficDirectorUpdate|TestAccComputeUrlMap_defaultRouteActionPathUrlRewrite|TestAccComputeUrlMap_defaultRouteActionTrafficDirectorPathUpdate|TestAccComputeRegionUrlMap_defaultRouteAction_full_update|TestAccComputeRegionUrlMap_ilbPathUpdate

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeUrlMap_trafficDirectorPathUpdate[Debug log]
TestAccComputeUrlMap_defaultRouteActionUrlRewrite[Debug log]
TestAccComputeUrlMap_defaultRouteActionTrafficDirectorUpdate[Debug log]
TestAccComputeUrlMap_defaultRouteActionPathUrlRewrite[Debug log]
TestAccComputeUrlMap_defaultRouteActionTrafficDirectorPathUpdate[Debug log]
TestAccComputeRegionUrlMap_defaultRouteAction_full_update[Debug log]
TestAccComputeRegionUrlMap_ilbPathUpdate[Debug log]

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

@SarahFrench SarahFrench merged commit 06c32b0 into GoogleCloudPlatform:main Nov 17, 2022
googlerjk pushed a commit to googlerjk/magic-modules that referenced this pull request Nov 22, 2022
…ion_url_map` resource (GoogleCloudPlatform#6676)

* Add `defaultRouteAction.urlRewrite` to `google_compute_region_url_map` resource

* Add `defaultRouteAction.corsPolicy` to `google_compute_region_url_map` resource

* Add `cors_policy` to acceptance test

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

* Fix bug where `defaultRouteAction.timeout` was incorrectly nested

* Fix misspelled field in acceptance test

* Add `at_least_one_of` logic present in the global version of UrlMap resource

* Update `defaultRouteAction` test to include `timeout` field

* Update `defaultRouteAction` test to include `url_rewrite` field

* Update `defaultRouteAction` test to include `cors_policy` field (excluding regex subfield)

* Add missing `at_least_one_of` entries inside the `defaultRouteAction` property

* Update values used for `url_rewrite` in Url Map tests and examples

* Update values of `host_rewrite` and `path_prefix_rewrite` in acc tests
googlerjk pushed a commit to googlerjk/magic-modules that referenced this pull request Nov 25, 2022
…ion_url_map` resource (GoogleCloudPlatform#6676)

* Add `defaultRouteAction.urlRewrite` to `google_compute_region_url_map` resource

* Add `defaultRouteAction.corsPolicy` to `google_compute_region_url_map` resource

* Add `cors_policy` to acceptance test

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

* Fix bug where `defaultRouteAction.timeout` was incorrectly nested

* Fix misspelled field in acceptance test

* Add `at_least_one_of` logic present in the global version of UrlMap resource

* Update `defaultRouteAction` test to include `timeout` field

* Update `defaultRouteAction` test to include `url_rewrite` field

* Update `defaultRouteAction` test to include `cors_policy` field (excluding regex subfield)

* Add missing `at_least_one_of` entries inside the `defaultRouteAction` property

* Update values used for `url_rewrite` in Url Map tests and examples

* Update values of `host_rewrite` and `path_prefix_rewrite` in acc tests
kimihrr pushed a commit to kimihrr/kimiah-magic-modules that referenced this pull request Dec 6, 2022
…ion_url_map` resource (GoogleCloudPlatform#6676)

* Add `defaultRouteAction.urlRewrite` to `google_compute_region_url_map` resource

* Add `defaultRouteAction.corsPolicy` to `google_compute_region_url_map` resource

* Add `cors_policy` to acceptance test

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

* Fix bug where `defaultRouteAction.timeout` was incorrectly nested

* Fix misspelled field in acceptance test

* Add `at_least_one_of` logic present in the global version of UrlMap resource

* Update `defaultRouteAction` test to include `timeout` field

* Update `defaultRouteAction` test to include `url_rewrite` field

* Update `defaultRouteAction` test to include `cors_policy` field (excluding regex subfield)

* Add missing `at_least_one_of` entries inside the `defaultRouteAction` property

* Update values used for `url_rewrite` in Url Map tests and examples

* Update values of `host_rewrite` and `path_prefix_rewrite` in acc tests
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Dec 6, 2022
…ion_url_map` resource (GoogleCloudPlatform#6676)

* Add `defaultRouteAction.urlRewrite` to `google_compute_region_url_map` resource

* Add `defaultRouteAction.corsPolicy` to `google_compute_region_url_map` resource

* Add `cors_policy` to acceptance test

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

* Fix bug where `defaultRouteAction.timeout` was incorrectly nested

* Fix misspelled field in acceptance test

* Add `at_least_one_of` logic present in the global version of UrlMap resource

* Update `defaultRouteAction` test to include `timeout` field

* Update `defaultRouteAction` test to include `url_rewrite` field

* Update `defaultRouteAction` test to include `cors_policy` field (excluding regex subfield)

* Add missing `at_least_one_of` entries inside the `defaultRouteAction` property

* Update values used for `url_rewrite` in Url Map tests and examples

* Update values of `host_rewrite` and `path_prefix_rewrite` in acc tests
@SarahFrench SarahFrench deleted the update-regional-url-map-even-more 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
4 participants