Skip to content

πŸ›πŸ§‘β€πŸ’» - Throttle workflow queue polling and increase workflow timeoutsΒ #344

Description

@efraespada

Is there an existing issue for this?

  • I have searched the existing issues.

Which actions are affected?

Pull Request

Which platforms are affected?

No response

Description

During dogfooding, multiple Copilot workflows failed before executing their business logic because the workflow queue exhausted GitHub's API rate limit.

The current queue polls GitHub every two seconds and performs multiple workflow-run queries per polling cycle. When several runs are queued simultaneously, this creates unnecessary API pressure and can prevent all runs from starting.
The sequential execution guarantee must be preserved: runs must never be cancelled, skipped or overwritten.

Expected behavior

  • Workflow runs remain strictly sequential.
  • Queued runs wait until previous Copilot runs finish.
  • Polling must not exhaust GitHub's API rate limit.
  • Rate-limit responses must be handled gracefully.
  • Long queues must be allowed to drain without the workflow timing out prematurely.
  • The queue must remain reliable during bursts of issue, comment, pull request and release activity.

Reproducing the issue

  • Copilot - Issue Comment: run 33379584423
  • Copilot - Issue Comment: run 33378311554
  • Several Issue, Pull Request, Pull Request Comment, Commit and CI runs also failed during the same period.

copilot Version

master

Relevant Log Output

API rate limit exceeded

Additional context and comments

Acceptance criteria

  • No unnecessary API request burst occurs when multiple runs are queued.
  • HTTP 429 responses cause a controlled wait instead of immediate workflow failure.
  • Sequential execution remains guaranteed.
  • All queued runs are eventually processed without cancellation.
  • Workflow timeouts are long enough to accommodate the configured queue wait period.
  • CI, release, hotfix and setup workflow contract tests pass.
  • The behavior is covered by deterministic automated tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

95%Progress: 95%branchedIndicates that a branch has been created for this issue.bugSomething isn't workingbugfixSomething isn't workingcopilot:state:in-progresspriority: highCritical issue, needs immediate attention.size: XXLIndicates an extremely large task or issue that requires significant time and effort to complete.

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions