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 fields to support stateful cookie-based affinity #11845

Merged

Conversation

ahmed-laiq
Copy link
Contributor

@ahmed-laiq ahmed-laiq commented Sep 26, 2024

Add Terraform support for configuring stateful cookie-based affinity. It is added to both backend service and regional backend service. Connections bearing the same cookie will be served by the same backend VM while that VM remains healthy, as long as the cookie has not expired.
Fixes: hashicorp/terraform-provider-google#19647

  • Searched through the issue tracker for an open issue that this either resolves or contributes.
  • 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). - read only field
  • 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 enum STATEFUL_COOKIE_AFFINITY and `strong_session_affinity_cookie` field to `google_compute_backend_service` and `google_compute_region_backend_service` resource

@github-actions github-actions bot requested a review from c2thorn September 26, 2024 21:26
Copy link

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

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

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 26, 2024
@modular-magician modular-magician added service/compute-l7-load-balancer and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Sep 27, 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 ( 4 files changed, 571 insertions(+), 6 deletions(-))
google-beta provider: Diff ( 6 files changed, 684 insertions(+), 6 deletions(-))
terraform-google-conversion: Diff ( 2 files changed, 162 insertions(+))

Missing test report

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

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

resource "google_compute_backend_service" "primary" {
  strong_session_affinity_cookie {
    path = # value needed
  }
}

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

resource "google_compute_region_backend_service" "primary" {
  strong_session_affinity_cookie {
    path = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1017
Passed tests: 941
Skipped tests: 74
Affected tests: 2

Click here to see the affected service packages
  • compute

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
  • TestAccComputeBackendService_backendServiceStatefulSessionAffinityExample
  • TestAccComputeRegionBackendService_regionBackendServiceIlbStatefulSessionAffinityExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeBackendService_backendServiceStatefulSessionAffinityExample[Debug log]
TestAccComputeRegionBackendService_regionBackendServiceIlbStatefulSessionAffinityExample[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

Copy link
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

LGTM

@c2thorn c2thorn merged commit c0fae5c into GoogleCloudPlatform:main Sep 27, 2024
10 checks passed
anavada pushed a commit to anavada/magic-modules that referenced this pull request Sep 30, 2024
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Oct 7, 2024
trodge pushed a commit to trodge/magic-modules that referenced this pull request Oct 10, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 23, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 24, 2024
Philip-Jonany pushed a commit to Philip-Jonany/magic-modules that referenced this pull request Nov 4, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google compute backend service: Add stateful cookie-based affinity support
4 participants