Prioritize buildkite merge queue based on pr queue #5979
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Low Risk
Low risk CI-only change that affects Buildkite job scheduling/ordering but not application runtime behavior. Main risk is miscomputed priority (e.g., failing PR number extraction/GraphQL query) leading to default priority 0 and unexpected build ordering.
Overview
Adds merge-queue-aware scheduling for Buildkite runs by introducing a pipeline
priorityderived fromMERGE_QUEUE_PRIORITY.The GitHub workflow now extracts the PR number from the merge-queue ref, queries GitHub’s GraphQL API for the PR’s merge queue
position, converts it to a negative priority (earlier in queue = higher priority), and passes it to Buildkite viabuild_env_vars.Written by Cursor Bugbot for commit 518d074. This will update automatically on new commits. Configure here.