Repository navigation
ci: schedule fast-checks only when the diff needs it - #1702
Conversation
|
First pipeline's |
|
Second fast-checks failure (job 23383, ~5s): |
|
Switched the |
|
The boolean |
|
Simplified per review (0b6aec3): dropped the |
0b6aec3 to
a9e8585
Compare
a9e8585 to
6ae9b17
Compare
Move fast-checks out of the static setup workflow in config.yml into the generated config: generate_config.sh now emits it only when the diff against main touches a file that make check-fmt or make check-sh covers (formatter extensions or shell scripts), or when base.yml's fast-checks section itself changed. Doc-only and .gitignore-only changes therefore run no job beyond setup and the no-op all-checks. The job still runs on skiplabs/skip:latest, which ships every check tool including skfmt, so no alternative image or install step is needed. The merge-base now falls back to origin/main for checkouts without a local main branch (e.g. new worktrees) and fails loudly if neither exists, instead of diffing against an empty base. Also stop forcing PRETTIER_LOG_LEVEL=debug in make check-fmt. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
6ae9b17 to
6871c3f
Compare
Summary
Single commit (squashed from the earlier iteration). Reworks how the
fast-checksCI job is scheduled:setupworkflow in.circleci/config.yml..circleci/generate_config.shnow emits it (job defined inbase.yml) only when the diff againstmerge-base main HEADtouches a file thatmake check-fmt(skfmt / clang-format / prettier / black extensions, per the Makefile and.prettierignore) ormake check-sh(*.sh) covers, or whenbase.yml's ownfast-checkssection changed (so edits to the job are still tested). Doc-only and.gitignore-only changes — including pushes of a new worktree branch that sits at main — now schedule nothing beyondsetupand the no-opall-checks.generate_config.shfalls back toorigin/mainwhen there is no localmain(single-branch clones, new worktrees) and fails with a clear fetch hint if neither exists — previously an empty base made everygit diffexit 128, so every path looked changed and all jobs were scheduled.make check-fmtno longer forcesPRETTIER_LOG_LEVEL=debug; it runs at the defaultwarn(the pre-commit hook keeps its opt-inPRETTIER_LOG_LEVEL=debug git commit).The job itself is unchanged: it still runs on
skiplabs/skip:latest, which ships every check tool including skfmt, so no alternative image or install step is needed. (An earlier iteration of this PR tried a smallercimg/baseimage when the diff had no.skfiles, but installing the tools there took longer than the image pull saved, so that idea was dropped.)fast-checksis added toall-checks' requires, so the format/shell gate is covered by the single required status context (ci/circleci: ci/all-checks); build jobs report unprefixed contexts, soci/circleci: fast-checksis unchanged. Note the tradeoff: fast-checks now starts aftersetupcompletes instead of in parallel with it (the price of making it conditional).Motivation
Every pipeline — including pushes of new worktree branches with empty or doc-only diffs — paid for a pull of the large
skiplabs/skipimage plus a whole-treemake check-fmtrun, and the job log was flooded with prettier debug output.Validation
bash -nandshellcheckclean on.circleci/generate_config.sh;.circleci/config.ymland.circleci/base.ymlparse as YAML.generate_config.sh: doc-only → nofast-checks;.ts-only →fast-checksscheduled and required byall-checks;bin/*.sh-only → scheduled (check-shcovers it);base.ymlfast-checks section edit → scheduled via the section rule; no localmain→ falls back toorigin/main; neither → exit 1 with a clear error.AI disclosure
This PR was implemented with Mistral Vibe (Mistral Vibe CLI); the commit carries the corresponding Co-Authored-By trailer.