You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
validate reports only the first unknown key in each job #61
cigen validate, like every command that loads config, reports at most one unknown key per job. Fixing it shows the next one, so an agent or a person fixing a config needs one run per mistake.
$ cigen validate
error: cigen.yml (at workflows.ci.jobs.test.requires): unknown key `requires`
help: `requires` is now `needs`.
The config has 1 problem. `cigen validate --format json` lists them as data.
Delete requires: and run it again: now runs-on is reported, with "set the runner or container image with image:".
Expected
Both keys reported in one run, each with its own suggestion, the way problems in different jobs already are.
Likely cause
The job, workflow and document types use #[serde(deny_unknown_fields)] (src/schema/job.rs:13, src/schema/workflow.rs:15 and :68, src/schema/document.rs:18), and serde stops at the first unknown field. The top level and workflow settings probably behave the same. One fix: compare a mapping's keys with the type's known fields before deserializing, and report every unknown key.
Found while writing the blog post on CI config agents can't quietly get wrong (#58), which lists this as a known gap.
Activity
Eight false skips, not five: add #38, #51 and #53; publish the agents…