fix(ci): make every manual gate default to a value that matches nothing #158
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/gate-defaults-match-nothing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A manual
crow pipeline createinstantiates every file in.crow/, and a declared variable default is applied even when the run never passed that variable. A gate is therefore only a gate if its default matches nothing.#155 fixed the three pipelines that had no manual gate at all. It missed that a permissive default leaves a pipeline just as exposed. Demonstrated the expensive way: creating a pipeline with only
also started
build-all-versions— because its gatetarget_archdefaults toamd64, which matches its own amd64 matrix rows — andprocess-updatesacross every row, because that gate defaults toall. The run was killed before anyUpload package indexesstep produced output and both alpine324 indices were verified unchanged, butbuild-all-versionsuploads binaries and rewrites indexes, so the next one might not be caught in time.Before:
build-all-versionstarget_archamd64build-all-versions-install-depstarget_archamd64weekly-rebuild-missingweekly_rebuild_missingallweekly-audit-missingweekly_audit_missingallprocess-updatesprocess_cran_updatesallrepair-built-stamprepair_built_stamparm64archive-missed-packageswas the one that behaved, because its gate variable is never declared and so matches nothing. That is the property this restores everywhere.What this changes
Each of the six gets a
noneoption on its gate variable and defaults to it, so a manual run has to name its target explicitly. The reason is recorded next to the default, where someone would go to change it.noneis used rather than dropping the default so the expression always has a defined value to compare, instead of relying on undefined-variable semantics.Cron triggers are untouched — they match on the
cron:name, not the variable.Verification
crow lint .crow/reports all ten configs valid. Auditing every pipeline that accepts a manual event:Every gate now defaults to something that matches no matrix row.