Skip to content

[ci]: fix merge-gate Buildkite state filters - #1760

Closed
SolitaryThinker wants to merge 1 commit into
hao-ai-lab:mainfrom
SolitaryThinker:fix/merge-gate-buildkite-state
Closed

[ci]: fix merge-gate Buildkite state filters#1760
SolitaryThinker wants to merge 1 commit into
hao-ai-lab:mainfrom
SolitaryThinker:fix/merge-gate-buildkite-state

Conversation

@SolitaryThinker

Copy link
Copy Markdown
Collaborator

Problem

The merge-gate launcher fails before it can schedule Buildkite. Recent runs such as 32933734982 and 32934071377 stop in Cancel previous Buildkite builds with:

jq: Cannot index string with string "env"

The list-builds request sends state=running,scheduled. Buildkite's REST API requires repeated Rails-array parameters for multiple states: state[]=running&state[]=scheduled. The rejected response is an error object, but the current curl -sS still pipes it into a jq filter that assumes an array of builds.

Official contract: https://buildkite.com/docs/apis/rest-api/builds

Solution

  • Send one state[] query parameter per requested state.
  • Exclude unneeded jobs and expanded pipeline data from this polling request.
  • Enable strict shell error handling and make HTTP errors fail the step.
  • Validate that the API returned an array of build objects before filtering it.
  • Make cancellation request failures visible instead of continuing silently.
  • Add a CPU-only workflow contract test so the invalid state encoding and fail-open behavior cannot return.

If the corrected request reports an authorization error, the repository's Buildkite token must be updated to include read_builds; cancellation and build creation require write_builds.

Validation

pytest fastvideo/tests/contract/ -q
  88 passed

pre-commit run --files \
  .github/workflows/ci-trigger-full-suite.yml \
  fastvideo/tests/contract/test_ci_test_collection.py
  passed, including GitHub Actions workflow lint

git diff --check
  passed

@mergify mergify Bot added type: ci CI/CD infrastructure scope: infra CI, tests, Docker, build labels Aug 26, 2026
@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI

Protection Waiting on
🔴 PR merge requirements 👀 reviews and 🤖 CI

🔴 PR merge requirements

Waiting for

  • #approved-reviews-by>=1
  • check-success=full-suite-passed
This rule is failing.
  • #approved-reviews-by>=1
  • check-success=full-suite-passed
  • check-success=fastcheck-passed
  • check-success~=pre-commit
  • title~=(?i)^\[(feat|feature|bugfix|fix|refactor|perf|ci|doc|docs|misc|chore|kernel|new.?model|skill|skills|infra)\]

@SolitaryThinker

Copy link
Copy Markdown
Collaborator Author

/test full

@SolitaryThinker

Copy link
Copy Markdown
Collaborator Author

/merge

@SolitaryThinker

Copy link
Copy Markdown
Collaborator Author

Superseded by #1762 at reviewed head 2dc322b60b24507834b447019d71ff75a58adb10. That PR combines the correct repeated Buildkite state filters and strict response validation from this branch with the necessary best-effort cancellation policy, checked cancellation attempts, non-leaking error handling, and CPU contract coverage. Closing this duplicate rather than merging two competing workflow fixes. The unrelated GameCraft T2V SSIM observation from full build #5043 remains tracked by draft diagnostic #1763.

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

Labels

ready PR is ready to merge scope: infra CI, tests, Docker, build type: ci CI/CD infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant