fix(actions): dynamic matrix expansion correctness fixes - #38690
Open
bircni wants to merge 4 commits into
Open
Conversation
Contributor
|
Addressed an issue of |
Zettat123
approved these changes
Jul 29, 2026
Member
|
Found some more issues, doing cleanups. |
A job `if:` may omit the `${{ }}`, which GitHub evaluates as one expression
anyway. The placeholder gate only recognised the braced form, so
`if: matrix.value == 1` was still decided against an absent matrix and skipped
the whole job instead of expanding it.
Reducing such an `if:` to the needs gate also discarded `always()`, `failure()`
and `cancelled()`. A job asking to run whatever its needs did was skipped as a
single unexpanded row, even where the needs had recorded the outputs the matrix
resolves from. The reduction now applies only under the implicit `success()`.
A malformed caller payload fails the same way on every pass, so returning it
requeued the run forever without ever expanding. It fails the job instead;
`getInputsForJob` marks that error invalid-argument so only it is caught, not
every missing row.
Assisted-by: Claude:Opus 5
silverwind
approved these changes
Jul 29, 2026
Member
There was a problem hiding this comment.
fixups done in f16cd23 after a deep investigation. Also reviewed all existing claims, they hold. PR description updated.
Member
|
PS: My commit also dropped a nonsensical "Say which one this is, because dropping the cap silently is the opposite of what the author asked for." comment in the code that was added in initial commit by @bircni, should verify why that happened. |
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.
Follow-up to #36564 (dynamic matrix) and #36357 (max-parallel), fixing issues found reviewing the two features together.
needs, soParseJobre-expanded it instead of reading it back — fatal forinclude: ${{ fromJson(needs.*.outputs.*) }}.if:readingmatrix.*skipped the whole job, with or without the${{ }}. It now reduces to the needs gate, except underalways()/failure()/cancelled(), and each combination is decided on its own values once the matrix expands.Plus:
max-paralleldistinguishes an unevaluated${{ }}(debug) from a non-numeric literal (warn — it silently drops the cap).