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 lb traffic extension resource #10121

Merged
merged 23 commits into from
May 14, 2024

Conversation

maxi-cit
Copy link
Contributor

@maxi-cit maxi-cit commented Mar 5, 2024

Adds the new google_network_services_lb_traffic_extension resource.

Part of: hashicorp/terraform-provider-google#17491
Fixes: hashicorp/terraform-provider-google#17373

Release Note Template for Downstream PRs (will be copied)

`google_network_services_lb_traffic_extension`

Copy link

github-actions bot commented Mar 5, 2024

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

@NickElliot, 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 github-actions bot requested a review from NickElliot March 5, 2024 15:47
Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

Could please remove the trailing white spaces on all files so it can pass lint? Then I'll start up running tests on it. Thanks!

@github-actions github-actions bot requested a review from NickElliot March 7, 2024 14:29
@maxi-cit
Copy link
Contributor Author

maxi-cit commented Mar 7, 2024

Hey @NickElliot 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

@NickElliot
Copy link
Contributor

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Mar 8, 2024
@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 ( 1 file changed, 430 insertions(+))
Terraform Beta: Diff ( 5 files changed, 1768 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_traffic_extension (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

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

@modular-magician
Copy link
Collaborator

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
TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

These need to be updated, thanks!

location = "us-west1"
name = "lb-traffic-extension"
provider = google-beta
forwarding_rules = ["https://www.googleapis.com/compute/v1/projects/myproj/regions/us-west1/forwardingRules/l7-ilb-forwarding-rule"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be an id reference to a forwarding rule created in this example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @NickElliot. API is returning the self_link using number, so I do not think we can use the id field here

Copy link
Contributor

Choose a reason for hiding this comment

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

the string could be constructed using variables such as
"https://www.googleapis.com/compute/v1/projects/<%= ctx[:test_env_vars]['project'] %>/regions/us-west1/forwardingRules/<%= ctx[:vars]['forwarding_rule_name'] %>"

extensions {
name = "ext11"
authority = "ext11.com"
service = "https://www.googleapis.com/compute/v1/projects/myproj/regions/us-west1/backendServices/l7-ilb-test-vm"
Copy link
Contributor

Choose a reason for hiding this comment

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

same here but for backend service!

@github-actions github-actions bot requested a review from NickElliot April 4, 2024 16:24
@NickElliot
Copy link
Contributor

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Apr 5, 2024
@maxi-cit
Copy link
Contributor Author

maxi-cit commented Apr 5, 2024

Hello @NickElliot, still working on adding integration tests but I should be able to push some of them today for traffic and route extensions

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

google provider: Diff ( 5 files changed, 1766 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 1766 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 267 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 313 insertions(+))

Missing test report

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

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

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

@modular-magician
Copy link
Collaborator

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
TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

@NickElliot
Copy link
Contributor

All good, ping me when you have them ready @maxi-cit

@NickElliot
Copy link
Contributor

Also in case it resolves the current VCR error, could you rebase? Thanks!

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label May 9, 2024
@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.

google provider: Diff ( 6 files changed, 2742 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 2742 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 267 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 421 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 48
Passed tests: 47
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
TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccNetworkServicesLbTrafficExtension_networkServicesLbTrafficExtensionBasicExample[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 modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels May 10, 2024
@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.

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

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • networkservices
$\textcolor{green}{\textsf{All tests passed!}}$ View the [build log](https://storage.cloud.google.com/ci-vcr-logs/beta/refs/heads/auto-pr-10121/artifacts/a4420eb0-f626-4d49-86b2-3a36357182c3/build-log/replaying_test.log)

@github-actions github-actions bot requested a review from NickElliot May 14, 2024 02:45
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels May 14, 2024
@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.

google provider: Diff ( 6 files changed, 2828 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 6 files changed, 2828 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 267 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 435 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • networkservices

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

LGTM

@NickElliot NickElliot merged commit 132b83b into GoogleCloudPlatform:main May 14, 2024
14 checks passed
kautikdk pushed a commit to kautikdk/magic-modules that referenced this pull request May 16, 2024
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
ma-g-22 pushed a commit to ma-g-22/magic-modules that referenced this pull request May 21, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
pcostell pushed a commit to pcostell/magic-modules that referenced this pull request Jul 16, 2024
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.

Send "google_network_services_lb_traffic_extension" to G.A
5 participants