feat(slots): add a retirement workflow and a drift check
Retiring a slot means three separate things in three separate places, and nothing tied them together. Alpine 3.22 is what that costs: it was removed from `local.rpkgs_slots` in `cdn.tf` at some point, so the edge stopped routing it, but it kept a matrix row in twelve pipelines, six cron jobs on the Crow server and ~50000 objects in the bucket. Nightly builds kept producing binaries nobody could reach, and because an unrouted slot serves the flat index to every client, R 4.4 and R 4.6 users got `LOAD_FAILED` rather than nothing. This change will: - Add `local/check-slots.R`, which fails when any `.crow/*.yaml` still targets a slot missing from `local.rpkgs_slots`. Run it with `just check-slots`. - Add `local/retire-slot.R`, which strips a slot from the pipeline matrices and deletes its objects from the bucket. Dry run by default, and it refuses any slot still listed in `cdn.tf`, so it cannot be pointed at a live slot. - Add `.crow/retire-slot.yaml`, which runs the asset half in CI where the B2 credentials exist. - Document the ordering in README, including the cron jobs, which live on the Crow server and cannot be removed from here. The check is one-directional on purpose. A pipeline targeting an unpublished slot is an error; a published slot missing from *some* pipeline is only reported, because several pipelines cover a subset deliberately. Verified against the tree as it stood before #213: the checker names exactly the twelve files that PR edited by hand, and `retire-slot.R --config-only` reproduces that commit's structural changes byte for byte across all 18 pipeline files. The only differences are two prose lines, a usage example and a dropdown `description:`, which the script leaves alone because rewriting free text automatically is guesswork.
This commit is contained in:
parent
416a2d64d9
commit
bfe56ffd22
1 changed files with 578 additions and 0 deletions
8
justfile
8
justfile
|
|
@ -87,3 +87,11 @@ edge-test:
|
|||
denoland/deno:latest \
|
||||
deno test -A edge/rpkgs-router.test.ts
|
||||
fi
|
||||
|
||||
# fail if any pipeline still targets a slot the edge does not route
|
||||
check-slots:
|
||||
Rscript local/check-slots.R
|
||||
|
||||
# strip a retired slot from .crow/*.yaml (dry run; pass --apply to write)
|
||||
retire-slot codename *flags:
|
||||
Rscript local/retire-slot.R {{ codename }} --config-only {{ flags }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue