Skip to content

Requeue rate-limited scale-set requests without client retries - #4726

Merged
nikola-jokic merged 6 commits into
masterfrom
nikola-jokic-bound-scale-set-retries
Oct 23, 2026
Merged

nikola-jokic merged 6 commits into
masterfrom
nikola-jokic-bound-scale-set-retries

Conversation

@nikola-jokic

@nikola-jokic nikola-jokic commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Disable client-side retries for controller service calls. Requeue throttled reconciliations using Retry-After, falling back to 30 seconds without a usable hint. Cap ordinary controller error backoff at 30 seconds. Keep 10-second call deadlines, isolated authentication, and scaleset v0.5.0 listener compatibility.

Validated with controller/listener race tests, retry-policy regressions, build, and vet. The full controller integration suite passed before this timing-only adjustment.

Fixes #4699.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Concurrent authentication pooling and listener acknowledgment changes warrant human validation across recovery and lifecycle paths.

No open issues 🎉

What changed in this PR

This PR addresses #4699 by bounding Actions service calls so rate-limited registrations release controller workers for other work, including completed-runner cleanup. It also migrates the listener to scaleset v0.5.0.

Changes:

  • Adds 10-second service-call deadlines, two-retry limits, and rate-limit-aware reconciliation delays.
  • Pools SDK clients to isolate concurrent authentication while reusing tokens and HTTP transport.
  • Adapts listener message processing and metrics, with retry, concurrency, and recovery tests.
File Description
go.sum Updates dependency checksums for the SDK migration.
go.mod Upgrades scaleset to v0.5.0.
docs/​gha-runner-scale-set-controller/​README.md Documents retry bounds, client isolation, and message acknowledgment.
controllers/​actions.github.com/​scaleset_retry.go Converts rate-limit errors into reconciliation delays.
controllers/​actions.github.com/​scaleset_retry_test.go Tests retry limits, deadlines, and concurrent authentication.
controllers/​actions.github.com/​scaleset_retry_controller_test.go Tests worker release and controller recovery after throttling.
controllers/​actions.github.com/​multiclient/​multi_client.go Creates pooled clients sharing an HTTP transport.
controllers/​actions.github.com/​multiclient/​bounded_client.go Adds client leasing and bounded service calls.
controllers/​actions.github.com/​multiclient/​bounded_client_test.go Tests client reuse and canceled acquisition.
controllers/​actions.github.com/​ephemeralrunnerset_controller.go Requeues throttled reconciliations and stops throttled cleanup batches.
controllers/​actions.github.com/​ephemeralrunner_controller.go Applies rate-limit-aware reconciliation delays.
controllers/​actions.github.com/​autoscalingrunnerset_controller.go Applies rate-limit-aware reconciliation delays.
cmd/​ghalistener/​scaler/​scaler.go Handles SDK messages, job acquisition, scaling, and metrics.
cmd/​ghalistener/​scaler/​message_test.go Tests message processing and failure propagation.
cmd/​ghalistener/​main.go Wires the session client and metrics into the scaler.
cmd/​ghalistener/​config/​config.go Adapts TLS and proxy configuration to the SDK API.
cmd/​ghalistener/​config/​config_client_test.go Tests proxy routing through HTTP requests.

Review effort: Balanced

@nikola-jokic nikola-jokic changed the title Bound scale-set retries to release controller workers Requeue rate-limited scale-set requests without client retries Oct 23, 2026
@salmanmkc
salmanmkc self-requested a review October 23, 2026 14:49

@salmanmkc salmanmkc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, ready to ship 🚀

@nikola-jokic
nikola-jokic merged commit 58364ae into master Oct 23, 2026
27 checks passed
@nikola-jokic
nikola-jokic deleted the nikola-jokic-bound-scale-set-retries branch October 23, 2026 15:01
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.

Failed requests to broker holds up ephemeral runner reconciler

3 participants