mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 09:33:24 +02:00
fix(actions): cap dynamic matrix expansion at MaxJobNumPerRun
A matrix built from a dependent job's runtime output (fromJson(needs.*.outputs.*)) has no inherent size bound, so a large or buggy upstream output could insert an arbitrary number of jobs in one transaction. The per-attempt AttemptJobIDs also back the job-index URLs, which must stay below MaxJobNumPerRun. Skip the expansion with a clear reason when the resulting jobs would exceed that limit. Also rename a test variable that tripped the misspell linter and clarify the deferred-placeholder commit-status comment. Co-Authored-By: Claude (Opus 4.8) <noreply@anthropic.com>
This commit is contained in:
3 files changed
+15
-8
No files matched your search
@@ -47,7 +47,7 @@ func CreateCommitStatusForRunJobs(ctx context.Context, run *actions_model.Action
|
||||
|
||||
for _, job := range jobs {
|
||||
// A deferred-matrix placeholder's name changes when it expands, so a status created now
|
||||
// would be orphaned; the expanded combos get theirs at expansion time.
|
||||
// would be orphaned; the job emitter creates the combos' statuses after expansion.
|
||||
if job.RawStrategy != "" && !job.IsMatrixEvaluated {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user