magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Add lb route extension resource

Open maxi-cit opened this issue 1 year ago • 9 comments

Adds the new google_network_services_lb_route_extension resource.

Part of: https://github.com/hashicorp/terraform-provider-google/issues/17491 Fixes: https://github.com/hashicorp/terraform-provider-google/issues/17372

Release Note Template for Downstream PRs (will be copied)

`google_network_services_lb_route_extension`

maxi-cit avatar Mar 05 '24 15:03 maxi-cit

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

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

github-actions[bot] avatar Mar 05 '24 15:03 github-actions[bot]

Can you please fix the yaml lint errors? Thanks.

zli82016 avatar Mar 05 '24 17:03 zli82016

working on it

maxi-cit avatar Mar 05 '24 17:03 maxi-cit

Hey @zli82016, I am still waiting for the API to become GA in order to validate the tests

PD: they told they are releasing it in the comming weeks

maxi-cit avatar Mar 07 '24 14:03 maxi-cit

Hey @zli82016, I am still waiting for the API to become GA in order to validate the tests

PD: they told they are releasing it in the comming weeks

Thanks for letting me know.

zli82016 avatar Mar 07 '24 20:03 zli82016

/gcbrun

zli82016 avatar Mar 07 '24 20:03 zli82016

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 ( 1 file changed, 429 insertions(+)) Terraform Beta: Diff ( 5 files changed, 1766 insertions(+), 2 deletions(-)) TF Conversion: Diff ( 1 file changed, 267 insertions(+))

Missing test report

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

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

resource "google_network_services_lb_route_extension" "primary" {
  description = # value needed
  extension_chains {
    extensions {
      fail_open        = # value needed
      forward_headers  = # value needed
      supported_events = # value needed
    }
  }
  labels = # value needed
}

modular-magician avatar Mar 07 '24 20:03 modular-magician

Tests analytics

Total tests: 47 Passed tests: 46 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • networkservices

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
TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample

Get to know how VCR tests work

modular-magician avatar Mar 07 '24 20:03 modular-magician

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$ TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample[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

modular-magician avatar Mar 07 '24 20:03 modular-magician

Can you also add the update tests for the fields that can be updated in-place? This is the doc how to add an update test. Thanks.

zli82016 avatar May 01 '24 18:05 zli82016

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.

google provider: Diff ( 1 file changed, 544 insertions(+)) google-beta provider: Diff ( 5 files changed, 2010 insertions(+), 2 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 267 insertions(+))

Missing test report

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

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

resource "google_network_services_lb_route_extension" "primary" {
  description = # value needed
  extension_chains {
    extensions {
      forward_headers  = # value needed
      supported_events = # value needed
    }
  }
  labels  = # value needed
  project = # value needed
}

modular-magician avatar May 02 '24 16:05 modular-magician

Tests analytics

Total tests: 47 Passed tests: 46 Skipped tests: 0 Affected tests: 1

Click here to see the affected service packages
  • networkservices

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
TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample

Get to know how VCR tests work

modular-magician avatar May 02 '24 16:05 modular-magician

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$ TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample[Debug log]

$\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

modular-magician avatar May 02 '24 16:05 modular-magician

Missing test report

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

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

resource "google_network_services_lb_route_extension" "primary" {
  description = # value needed
  extension_chains {
    extensions {
      forward_headers  = # value needed
      supported_events = # value needed
    }
  }
  labels  = # value needed
  project = # value needed
}

Can you add the tests for these fields?

Also, can you please add update tests for the fields that can be updated in-place? Here is the doc. Thanks.

zli82016 avatar May 03 '24 17:05 zli82016

FYI

  | Error: Error creating LbRouteExtension: googleapi: Error 400: The request was invalid: usage of the supported_events field is not allowed for LbRouteExtension resource.
  | Details:
  | [
  |   {
  |     "@type": "type.googleapis.com/google.rpc.BadRequest",
  |     "fieldViolations": [
  |       {
  |         "field": "lb_route_extension.extension_chains[0].extensions[0].supported_events"
  |       }
  |     ]
  |   },
  |   {
  |     "@type": "type.googleapis.com/google.rpc.RequestInfo",
  |     "requestId": "834fddf60d27ec3a"
  |   }
  | ]

I guess they will allowed it in the future and thats why they left that open in the API

maxi-cit avatar May 15 '24 23:05 maxi-cit

lb_route_extension

Got it. supported_events can be added later in Terraform provider when it will be supported in API side.

zli82016 avatar May 16 '24 00:05 zli82016

Hello @zli82016, I added your suggestion as well with an update test. I also removed the required flag on the traffic extension resource which was recently added for the same fields.

maxi-cit avatar May 16 '24 05:05 maxi-cit

/gcbrun

zli82016 avatar May 16 '24 15:05 zli82016

Hello @zli82016, are there any issue with the integration tests?

maxi-cit avatar May 16 '24 16:05 maxi-cit

Hello @zli82016, are there any issue with the integration tests?

The integration tests are not triggered. I will check with our team.

zli82016 avatar May 16 '24 16:05 zli82016

Can you please remove log.txt file? It could be the reason that the checked are not triggered.

zli82016 avatar May 16 '24 16:05 zli82016

Hello @zli82016, I guess that was the issue. I used that file to track progress on local tests. Sorry for pushing it.

maxi-cit avatar May 16 '24 16:05 maxi-cit

Hello @zli82016, I guess that was the issue. I used that file to track progress on local tests. Sorry for pushing it.

No worries. The integration tests will be triggered soon.

zli82016 avatar May 16 '24 16:05 zli82016

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.

google provider: Diff ( 8 files changed, 2880 insertions(+), 15 deletions(-)) google-beta provider: Diff ( 8 files changed, 2880 insertions(+), 15 deletions(-)) terraform-google-conversion: Diff ( 1 file changed, 256 insertions(+)) Open in Cloud Shell: Diff ( 4 files changed, 449 insertions(+))

modular-magician avatar May 16 '24 17:05 modular-magician

Tests analytics

Total tests: 51 Passed tests: 49 Skipped tests: 0 Affected tests: 2

Click here to see the affected service packages
  • networkservices

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
TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample|TestAccNetworkServicesLbRouteExtension_update

Get to know how VCR tests work

modular-magician avatar May 16 '24 17:05 modular-magician

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$ TestAccNetworkServicesLbRouteExtension_networkServicesLbRouteExtensionBasicExample[Debug log] TestAccNetworkServicesLbRouteExtension_update[Debug log]

$\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

modular-magician avatar May 16 '24 17:05 modular-magician

Hello @zli82016, I added your suggestions and I think I am ready for another round of reviews. Could you run the tests please?

maxi-cit avatar May 18 '24 11:05 maxi-cit

This PR has been waiting for review for 2 days. Please take a look! Use the label disable-review-reminders to disable these notifications.

github-actions[bot] avatar May 20 '24 09:05 github-actions[bot]

Hello @zli82016, any issues with the tests?

maxi-cit avatar May 20 '24 14:05 maxi-cit

Hello @zli82016, any issues with the tests?

I just approved the test trigger. Let's see how it is going.

zli82016 avatar May 20 '24 16:05 zli82016