mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 12:09:56 +08:00
* ci(build-all): seed ccache only for chip families with cold caches Measured across recent runs, the seeder stage contributes nothing in steady state: all 264 build-job cache restores in the 8 most recent successful runs came from group-level caches, zero from seeder caches, yet the stage gates the build matrix for ~3.4 min of every run's critical path and burns ~22 8cpu-runner-minutes warming caches nobody reads. Its fail-fast value is similarly thin: 2 of the last 40 failed runs failed at seed stage; the other 34 passed seeding and failed in the matrix anyway. Probe each family's ccache namespace in the RunsOn cache bucket from the group_targets job and emit only cold families into the seed matrix. Warm runs skip the stage entirely (the matrix starts right after the scan); a cold family still seeds first and gates the matrix, which is the one case the warmup pays for. The probe fails open: if the bucket env, the listing, or the assumed object layout is wrong, every family reads as cold and the workflow behaves exactly as before. Assisted-by: Claude:claude-fable-5 Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci(build-all): fail open when seeder probe output is unparseable The has_cold computation ran unguarded under bash -e: malformed probe output would fail the whole workflow instead of falling back to the full seeder matrix. Guard it so every failure path degrades to seeding everything, on RunsOn and on downstream forks without it alike. Assisted-by: Claude:claude-fable-5 Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci(build-all): move seeder probe logic into the helper script The probe step carried fail-open shell logic inline in the workflow. Move output writing, has_cold computation, and all fail-open handling into filter_cold_seeders.py; the workflow step is now a single script invocation. The script always exits zero and degrades every failure (missing bucket env, aws error, unparseable input) to the full seeder matrix. Assisted-by: Claude:claude-fable-5 Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci(build-all): probe the magic cache's real object layout The first probe guessed cache/{key} for the magic-cache object layout and read every family COLD, degrading to unconditional seeding. The real layout is cache/v1/{org}/{repo}/{ref}/{version-hash}/{cache-key}; the version hash is the actions/cache digest and not knowable a priori, so list the default-branch scope once (main-scope caches are visible to every ref) and match cache-key basenames. Verified locally against the live bucket: all 10 families read warm and the seed stage skips. Assisted-by: Claude:claude-fable-5 Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci(build-all): single-source ccache key roots in the matrix generator The ccache key convention was encoded three times: hand-assembled in the workflow's restore/save steps, again in the seeder's cache-key-prefix argument, and a third time in the probe script. Drift between them is silent thanks to the probe's fail-open design: a renamed key scheme would read every family COLD forever and quietly revert to unconditional seeding. Mint the namespace root once in generate_board_targets_json.py as cache_prefix on every group and seeder matrix entry, with seeders occupying the reserved 'seeder' group inside their family namespace. The workflow composes {cache_prefix}-{group}-{ref}-{sha} from matrix fields only, and the probe greps the root it is handed, knowing nothing of the format. Composed keys are byte-identical to the old scheme (asserted for all 33 groups and 10 seeders), so no cache is invalidated. Assisted-by: Claude:claude-fable-5 Signed-off-by: Ramon Roche <mrpollo@gmail.com> --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com>