Skip to content

feat: support concurrency.queue in workflow schema#6096

Open
xenjke wants to merge 1 commit into
nektos:masterfrom
xenjke:feat/concurrency-queue-schema
Open

feat: support concurrency.queue in workflow schema#6096
xenjke wants to merge 1 commit into
nektos:masterfrom
xenjke:feat/concurrency-queue-schema

Conversation

@xenjke
Copy link
Copy Markdown

@xenjke xenjke commented May 19, 2026

Summary

Workflows using the documented concurrency.queue property are currently rejected by act's schema with Unknown Property queue. GitHub added queue to the concurrency mapping (docs, added in github/docs@336b7f5); it accepts single (default) or max. 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-level concurrency-queue definition (allowed-values: ["single", "max"], following the precedent of branch-protection-rule-activity-type at line 188) and reference it from concurrency-mapping.properties.queue.
  • pkg/schema/schema_test.go — add TestConcurrencyQueue covering single, max, job-level placement, and an invalid value.

Out of scope

The docs state that queue: max combined with cancel-in-progress: true is a workflow validation error. act's schema engine (checkMapping in pkg/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 — queue is 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 issues
  • go fmt ./... / go mod tidy — no diff
  • Positive e2e: act -l against a workflow with concurrency.queue: max now lists jobs instead of erroring
  • Negative e2e: concurrency.queue: bogus errors with Expected one of single,max got bogus

References

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Workflows using concurrency.queue fail schema validation ("Unknown Property queue")

1 participant