Skip to content

Add backoff and jitter to deployment polling - #444

Merged
yoannchaudet merged 2 commits into
mainfrom
yoannchaudet-deployment-polling-backoff
Sep 1, 2026
Merged

Add backoff and jitter to deployment polling#444
yoannchaudet merged 2 commits into
mainfrom
yoannchaudet-deployment-polling-backoff

Conversation

@yoannchaudet

Copy link
Copy Markdown
Contributor

Summary

  • exponentially back off successful non-terminal deployment status polls by 1.5x, capped at 30 seconds
  • add ±20% jitter to desynchronize concurrent deployments
  • preserve the configured reporting interval as the initial delay and keep error backoff independent
  • document the updated polling behavior and rebuild the distribution

Testing

  • npm run format:check
  • npm run lint:check
  • npm run prepare
  • npm test -- --runInBand

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@yoannchaudet
yoannchaudet marked this pull request as ready for review September 1, 2026 21:00
Copilot AI lite review requested due to automatic review settings September 1, 2026 21:00
@yoannchaudet
yoannchaudet requested a review from a team as a code owner September 1, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 High severity · 2 Low severity

New issues introduced by this change (3)
Severity Finding
High severity src/​internal/​deployment.jsreporting_interval is parsed with Number(...) but not validated. If the input is non-numeric…
Low severity README.md — The docs say the polling backoff is capped at 30 seconds, but the implementation caps only the…
Low severity action.yml — This input description implies the overall polling interval is capped, but the code caps only the…
What changed in this PR

This PR updates the deployment status polling loop to reduce load and avoid synchronized polling by adding exponential backoff and jitter to non-terminal, successful status checks, and updates the docs/built distribution to match.

Changes:

  • Add ±20% jitter to polling delays and apply 1.5× exponential backoff (capped at 30s) after successful non-terminal status responses.
  • Extend test coverage for backoff/jitter behavior and ensure error backoff remains separate from success backoff.
  • Update reporting_interval documentation and rebuild dist/.
File Description
src/​internal/​deployment.js Adds jitter helper and success-path reporting interval backoff logic.
src/​__tests__/​internal/​deployment.test.js Adds unit tests covering backoff, cap, jitter, and separation from error backoff.
README.md Documents the updated polling semantics for reporting_interval.
dist/​index.js Rebuilt distribution bundle reflecting the polling changes.
action.yml Updates the reporting_interval input description to reflect backoff/jitter behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/internal/deployment.js
Comment thread README.md Outdated
Comment thread action.yml
tjyung
tjyung previously approved these changes Sep 1, 2026
YiMysty
YiMysty previously approved these changes Sep 1, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@yoannchaudet
yoannchaudet dismissed stale reviews from YiMysty and tjyung via 7e97763 September 1, 2026 21:13
@yoannchaudet
yoannchaudet merged commit 368f825 into main Sep 1, 2026
6 checks passed
@yoannchaudet
yoannchaudet deleted the yoannchaudet-deployment-polling-backoff branch September 1, 2026 21:29
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.

4 participants