Conversation
GitHub Actions added the `queue` property to the `concurrency` mapping
(single | max, default single), but act's schema rejected any workflow
using it. Mirror SchemaStore's encoding so workflows like
`concurrency: { group: g, queue: max }` validate.
Docs: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#concurrency
Added in github/docs@336b7f5.
|
Apologies — I opened #6152 covering the same Having read the diff, I think yours is the better-scoped fix for #6095: schema-only, with table-driven cases in I have retitled #6152 so it no longer claims to close #6095 and it now points here. The only thing it carries beyond your change is the Happy to do whichever you prefer: close #6152 entirely and move the model bits into my runtime PR, or leave it as a follow-up that rebases on top of yours once this lands. If it is useful I can also open a PR against your branch with the extra |
|
Thanks for taking a look @McNultyyy. This is the smaller schema-only fix, would it make sense to merge it first and then rebase #6152 on top for the |
|
Sounds like a plan. My larger-scale idea is to get the work in #6147 reviewed and merged. However I appreciate that it is a mammoth change and will need to be broken down and reviewed in smaller manageable pieces. Keen to hear both of your ideas on this and where best to have this conversation / discussion , as to not pollute this thread. |
|
@cplee — independent verification of this change, in case it helps it move. I hit #6095 while evaluating I built this branch (
One detail that may not be obvious from the issue: the blast radius is larger than a single ignored key. Because an unknown property makes the whole job block fail to match, one Since |
Summary
Workflows using the documented
concurrency.queueproperty are currently rejected byact's schema withUnknown Property queue. GitHub addedqueueto the concurrency mapping (docs, added in github/docs@336b7f5); it acceptssingle(default) ormax. This PR mirrors SchemaStore's existing encoding in act's hand-maintained schema so those workflows validate.Fixes #6095.
Changes
pkg/schema/workflow_schema.json— add a top-levelconcurrency-queuedefinition (allowed-values: ["single", "max"], following the precedent ofbranch-protection-rule-activity-typeat line 188) and reference it fromconcurrency-mapping.properties.queue.pkg/schema/schema_test.go— addTestConcurrencyQueuecoveringsingle,max, job-level placement, and an invalid value.Out of scope
The docs state that
queue: maxcombined withcancel-in-progress: trueis a workflow validation error. act's schema engine (checkMappinginpkg/schema/schema.go) validates each property in isolation, so cross-property constraints cannot be expressed in the current schema vocabulary. SchemaStore makes the same trade-off —queueis encoded as an enum but the mutual exclusion is left to prose. Can be revisited as a follow-up.Test plan
go test ./pkg/schema/...— new test passes (TestConcurrencyQueue+ existing tests)golangci-lint run ./...— no issuesgo fmt ./.../go mod tidy— no diffact -lagainst a workflow withconcurrency.queue: maxnow lists jobs instead of erroringconcurrency.queue: boguserrors withExpected one of single,max got bogusReferences
queue: github/docs@336b7f5#/definitions/concurrency)queue:key for concurrency rhysd/actionlint#657, concurrency: Add support forqueuekey rhysd/actionlint#654