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

load_balancing: support least_outstanding_requests steering #2472

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

tc80
Copy link
Contributor

@tc80 tc80 commented May 25, 2023

Description

Support least_outstanding_requests as a Load Balancer steering policy and as a Load Balancer Pool origin steering policy. This cannot be merged until the feature is released and API docs are updated.
Edit: the API docs are updated now, so this has been taken out of draft

Relevant cloudflare-go PR here: cloudflare/cloudflare-go#1293 (but not blocked on it).


Testing

Verified the tests pass:

$ TESTARGS='-run "^TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced" -count 1 -parallel 1' make testacc
$  TESTARGS='-run "^TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests" -count 1 -parallel 1' make testacc

Verified that the previews look good:

@github-actions
Copy link
Contributor

github-actions bot commented May 25, 2023

changelog detected ✅

…d origin steering policy

- load_balancer: update description for steering_policy and steering_policy override
and extend the enum for least_outstanding_requests

- load_balancer: update description for random_steering and random_steering override

- pool: update description for origin_steering.policy and extend the enum
for least_outstanding_requests

- pool: update description for origin weight
@jacobbednarz jacobbednarz added the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label May 30, 2023
@tc80 tc80 marked this pull request as ready for review June 6, 2023 22:15
@tc80 tc80 requested a review from jacobbednarz as a code owner June 6, 2023 22:15
@tc80
Copy link
Contributor Author

tc80 commented Jun 6, 2023

@jacobbednarz
Copy link
Member

there is one test failing but it is unrelated and i'll have a look in another PR.

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^(TestAccCloudflareLoadBalancerPool_|TestAccCloudflareLoadBalancer_)" -count 1 -timeout 120m -parallel 1
=== RUN   TestAccCloudflareLoadBalancerPool_Import
=== PAUSE TestAccCloudflareLoadBalancerPool_Import
=== RUN   TestAccCloudflareLoadBalancer_Import
=== PAUSE TestAccCloudflareLoadBalancer_Import
=== RUN   TestAccCloudflareLoadBalancerPool_Basic
=== PAUSE TestAccCloudflareLoadBalancerPool_Basic
=== RUN   TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests
=== PAUSE TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests
=== RUN   TestAccCloudflareLoadBalancerPool_FullySpecified
=== PAUSE TestAccCloudflareLoadBalancerPool_FullySpecified
=== RUN   TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
=== PAUSE TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
=== RUN   TestAccCloudflareLoadBalancer_Basic
=== PAUSE TestAccCloudflareLoadBalancer_Basic
=== RUN   TestAccCloudflareLoadBalancer_SessionAffinity
=== PAUSE TestAccCloudflareLoadBalancer_SessionAffinity
=== RUN   TestAccCloudflareLoadBalancer_AdaptiveRouting
=== PAUSE TestAccCloudflareLoadBalancer_AdaptiveRouting
=== RUN   TestAccCloudflareLoadBalancer_LocationStrategy
=== PAUSE TestAccCloudflareLoadBalancer_LocationStrategy
=== RUN   TestAccCloudflareLoadBalancer_RandomSteering
=== PAUSE TestAccCloudflareLoadBalancer_RandomSteering
=== RUN   TestAccCloudflareLoadBalancer_GeoBalanced
=== PAUSE TestAccCloudflareLoadBalancer_GeoBalanced
=== RUN   TestAccCloudflareLoadBalancer_ProximityBalanced
=== PAUSE TestAccCloudflareLoadBalancer_ProximityBalanced
=== RUN   TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced
=== PAUSE TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced
=== RUN   TestAccCloudflareLoadBalancer_Rules
=== PAUSE TestAccCloudflareLoadBalancer_Rules
=== RUN   TestAccCloudflareLoadBalancer_DuplicatePool
=== PAUSE TestAccCloudflareLoadBalancer_DuplicatePool
=== RUN   TestAccCloudflareLoadBalancer_Update
=== PAUSE TestAccCloudflareLoadBalancer_Update
=== RUN   TestAccCloudflareLoadBalancer_CreateAfterManualDestroy
=== PAUSE TestAccCloudflareLoadBalancer_CreateAfterManualDestroy
=== CONT  TestAccCloudflareLoadBalancerPool_Import
--- PASS: TestAccCloudflareLoadBalancerPool_Import (18.23s)
=== CONT  TestAccCloudflareLoadBalancer_LocationStrategy
--- PASS: TestAccCloudflareLoadBalancer_LocationStrategy (14.50s)
=== CONT  TestAccCloudflareLoadBalancer_CreateAfterManualDestroy
--- PASS: TestAccCloudflareLoadBalancer_CreateAfterManualDestroy (26.52s)
=== CONT  TestAccCloudflareLoadBalancer_Update
--- PASS: TestAccCloudflareLoadBalancer_Update (28.88s)
=== CONT  TestAccCloudflareLoadBalancer_DuplicatePool
--- PASS: TestAccCloudflareLoadBalancer_DuplicatePool (7.75s)
=== CONT  TestAccCloudflareLoadBalancer_Rules
--- PASS: TestAccCloudflareLoadBalancer_Rules (16.01s)
=== CONT  TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced
--- PASS: TestAccCloudflareLoadBalancer_LeastOutstandingRequestsBalanced (16.14s)
=== CONT  TestAccCloudflareLoadBalancer_ProximityBalanced
--- PASS: TestAccCloudflareLoadBalancer_ProximityBalanced (16.25s)
=== CONT  TestAccCloudflareLoadBalancer_GeoBalanced
--- PASS: TestAccCloudflareLoadBalancer_GeoBalanced (14.70s)
=== CONT  TestAccCloudflareLoadBalancer_RandomSteering
--- PASS: TestAccCloudflareLoadBalancer_RandomSteering (24.66s)
=== CONT  TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy
--- PASS: TestAccCloudflareLoadBalancerPool_CreateAfterManualDestroy (22.20s)
=== CONT  TestAccCloudflareLoadBalancer_AdaptiveRouting
--- PASS: TestAccCloudflareLoadBalancer_AdaptiveRouting (15.31s)
=== CONT  TestAccCloudflareLoadBalancer_SessionAffinity
    resource_cloudflare_load_balancer_test.go:133: Step 1/1 error: Check failed: Check 4/8 error: cloudflare_load_balancer.gdgrmvscja: Attribute 'session_affinity_ttl' found when not expected
--- FAIL: TestAccCloudflareLoadBalancer_SessionAffinity (24.45s)
=== CONT  TestAccCloudflareLoadBalancer_Basic
--- PASS: TestAccCloudflareLoadBalancer_Basic (14.29s)
=== CONT  TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests
--- PASS: TestAccCloudflareLoadBalancerPool_OriginSteeringLeastOutstandingRequests (12.40s)
=== CONT  TestAccCloudflareLoadBalancerPool_FullySpecified
--- PASS: TestAccCloudflareLoadBalancerPool_FullySpecified (13.01s)
=== CONT  TestAccCloudflareLoadBalancerPool_Basic
--- PASS: TestAccCloudflareLoadBalancerPool_Basic (12.30s)
=== CONT  TestAccCloudflareLoadBalancer_Import
--- PASS: TestAccCloudflareLoadBalancer_Import (17.78s)
FAIL
FAIL	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	316.867s
FAIL
make: *** [testacc] Error 1

@jacobbednarz jacobbednarz merged commit 84eca8a into cloudflare:master Jun 7, 2023
10 checks passed
@jacobbednarz jacobbednarz removed the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Jun 7, 2023
@github-actions github-actions bot added this to the v4.8.0 milestone Jun 7, 2023
github-actions bot pushed a commit that referenced this pull request Jun 7, 2023
@github-actions
Copy link
Contributor

This functionality has been released in v4.8.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants