-
Notifications
You must be signed in to change notification settings - Fork 276
Description
Objective
Fix the strategy field in the custom jobs JSON schema — currently defined as an empty object that blocks all valid usage — and decide whether to implement compiler support or clearly remove it.
Context
From discussion #19383 (MEDIUM-2): In pkg/parser/schemas/main_workflow_schema.json, the strategy property under .properties.jobs.additionalProperties.properties is:
"strategy": {
"type": "object",
"description": "Matrix strategy for the job",
"additionalProperties": false
}additionalProperties: false with no properties means only {} is valid. Any real matrix strategy (e.g., {matrix: {os: [ubuntu, windows]}}) would fail schema validation. The compiler also does not extract strategy at all.
Approach
Option A — Remove strategy from the schema (recommended if not implementing support):
- Delete the
strategyentry from the custom jobs schema properties - This is honest: the compiler doesn't support it, users won't be misled by autocomplete
Option B — Add proper schema definition + compiler extraction:
- Define
strategywith fullmatrix,include,exclude,fail-fast,max-parallelsub-fields - Extract
strategyinbuildCustomJobs()using YAML marshal (same pattern ascontainer/services) - Add
Strategy stringfield toJobstruct and render it injobs.go
Implement Option A (remove from schema) unless there's strong reason to implement full support. Compiler support can be added in a follow-up.
Files to Modify
pkg/parser/schemas/main_workflow_schema.json— remove or fixstrategyunder custom jobs properties- If Option B:
pkg/workflow/compiler_jobs.go,pkg/workflow/jobs.go
Acceptance Criteria
- Schema no longer defines
strategyas an empty-object-only type - If removed:
strategyin a custom job produces a schema validation error with a helpful message - If implemented:
strategyround-trips correctly through compilation -
make buildrun after schema changes - Run
make agent-finishbefore committing
Generated by Plan Command for issue #discussion #19383 · ◷
- expires on Mar 5, 2026, 10:49 AM UTC