ci: enable batched integration tests + fix concurrency collisions#1407
Merged
Conversation
The workflow's concurrency group keyed off `github.ref`, so multiple
manual PR dispatches from `main` all shared one group and cancelled each
other — only the last dispatched PR actually ran.
Key changes:
- Concurrency group now keys off PR number / pr_numbers / git_ref, so
different PRs and batches don't cancel each other; re-dispatch of the
same target still cancels its stale run.
- Replace `pr_number` input with `pr_numbers` — accepts a single PR
("100") or comma-separated list ("100,200,300") for overnight batches.
- Add a `prepare` job that parses inputs into a JSON target array; the
three test jobs fan out via `strategy.matrix.target` with
`max-parallel: 2` and `fail-fast: false`.
- Artifact names suffixed with the PR id to avoid collisions within a
batched run.
Co-authored-by: Isaac
Review-pass refinements on top of the batching change:
- Adopt the `setup-python-deps` + `setup-jfrog-pypi` fallback pattern
already used by main.yml, and set `cache-local-path: ~/.cache/uv` on
the uv install step. Each matrix cell now restores the warm deps cache
instead of re-resolving against JFrog on every run (biggest win at
batched dispatches of 2+ PRs where we run up to 6 parallel cells).
- Drop `fetch-depth: 0` on checkout — functional tests don't need full
history, and every sibling workflow already uses the default shallow
depth.
- Widen the parse whitespace check from literal space to `[[:space:]]`
so tab / `\r` (e.g. Windows-edited dispatch inputs) are handled.
- Include the full `pr_numbers` in the invalid-PR error to help the
dispatcher debug their input.
- Add a defensive comment on the first test job explaining why
downstream jobs deliberately lack `if: always()` / `if: !cancelled()`
— the fork-skip relies on `needs: prepare` propagating cleanly, and
forcing evaluation would make `fromJSON("")` explode on a skipped
prepare.
Co-authored-by: Isaac
benc-db
approved these changes
Apr 21, 2026
sd-db
added a commit
that referenced
this pull request
Apr 23, 2026
Main's integration.yml was substantially rewritten by #1407 to introduce a `prepare` job that emits a targets JSON array for a matrix strategy across the three integration jobs. Reconciling the slash-command + nightly work on top: - Drop the separate `check-nightly-needed` gate; fold the SHA-skip into `prepare` itself (emits targets=[] to skip via an empty matrix). Uses the GitHub API via curl+jq to check for prior successful runs on the current main SHA. - Drop the `pull_request` trigger + the fork-repo `if:` on `prepare` (dead after removing pull_request). Prepare now runs unconditionally. - Keep the existing `prepare` batch/git_ref/default branches; just prepend a `schedule` branch at the top. - Rename `pr_number` → `pr_numbers` in the dispatcher (integration-trigger.yml) so the slash command targets the new input. - `report-status` now guards on `!contains(inputs.pr_numbers, ',')` — batch dispatches don't get auto-comments (matrix jobs produce aggregate results, so per-PR reporting would need a larger rework). - Retain main's note against `!cancelled()` on matrix jobs — the skip-via- empty-targets approach avoids that trap entirely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Here's the trimmed body to paste into PR 1407:
Summary
workflow-refs/heads/mainand cancelled each other. Group is now target-aware (PR number →pr_numbers→git_ref→ ref).pr_numberinput withpr_numbers— accepts one PR or comma-separated list for batching (100,200,300).preparejob parses inputs into a JSON target array; the three test jobs fan out viastrategy.matrix.targetwithmax-parallel: 2andfail-fast: false.setup-python-depscache pattern frommain.ymlso matrix cells restore the warm deps cache instead of re-resolving against JFrog.