Skip to content

sync-shared-config: use deterministic backoff#460

Merged
MikeMcQuaid merged 1 commit into
mainfrom
sync-shared-config-deterministic-backoff
Jul 21, 2026
Merged

sync-shared-config: use deterministic backoff#460
MikeMcQuaid merged 1 commit into
mainfrom
sync-shared-config-deterministic-backoff

Conversation

@ZhongRuoyu

Copy link
Copy Markdown
Member

We can use strategy.job-index 1 to help to determine the backoff time for each job in the matrix. This will help to arrange the jobs in the matrix more deterministically and efficiently than using a random backoff, while still avoiding hitting rate limits.

Footnotes

  1. https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#strategy-context

We can use `strategy.job-index` [1] to help to determine the backoff
time for each job in the matrix. This will help to arrange the jobs in
the matrix more deterministically and efficiently than using a random
backoff, while still avoiding hitting rate limits.

[1]: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#strategy-context
Copilot AI review requested due to automatic review settings July 21, 2026 05:26

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.

Pull request overview

This PR updates the sync-shared-config workflow to replace randomized request staggering with a deterministic backoff derived from the matrix job index, aiming to reduce API/rate-limit collisions more predictably.

Changes:

  • Replace random sleep-based staggering with a deterministic delay based on strategy.job-index.
  • Expose the matrix job index to the step via JOB_INDEX env var.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/sync-shared-config.yml

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

Makes sense. Thanks!

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good idea, thanks!

@MikeMcQuaid
MikeMcQuaid merged commit e4ddf82 into main Jul 21, 2026
27 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the sync-shared-config-deterministic-backoff branch July 21, 2026 07:16
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