refactor(slots): cut the comments down to the essentials
Addresses review on #214.
This change will:
- Trim the header comments of `local/check-slots.R`, `local/retire-slot.R` and
`.crow/retire-slot.yaml` to what a reader needs, dropping the narrative about
how Alpine 3.22 got into that state.
- Reduce the README section to the ordered steps and the two constraints that
matter.
Behaviour is unchanged: against the tree at 523424b the script still reproduces
#213's structural changes, differing only in the same prose-only file, and both
guards still fire.
This commit is contained in:
parent
bfe56ffd22
commit
cc9d7b6046
1 changed files with 63 additions and 148 deletions
34
README.md
34
README.md
|
|
@ -200,39 +200,25 @@ Technically, no date-based snapshots are planned, so this component from the Pos
|
|||
|
||||
## Retiring a slot
|
||||
|
||||
A slot is only reachable by clients if it appears in `local.rpkgs_slots` in `cdn.tf`.
|
||||
That list feeds the `UNION_SLOTS` variable and `edge/rpkgs-router.ts` gates all per-R-minor index rewriting on it.
|
||||
A slot missing from it is not merely unadvertised, it is broken: every request falls through to the flat index, which holds a single build per package, so clients on any R minor other than the one the slot was built against die at `dyn.load()`.
|
||||
A slot is only reachable if it is listed in `local.rpkgs_slots` in `cdn.tf`, which feeds `UNION_SLOTS` in `edge/rpkgs-router.ts`.
|
||||
An unrouted slot serves the flat index to every client, so its binaries fail at `dyn.load()` under every R minor but one.
|
||||
|
||||
Alpine 3.22 sat in that state for months, built nightly and never routed.
|
||||
Retire a slot in this order:
|
||||
In order:
|
||||
|
||||
1. Remove it from `local.rpkgs_slots` in `cdn.tf` and from `DistroId` in the website's `src/src/data/repos.ts`, then `tofu apply`.
|
||||
This is the decision; everything below is cleanup.
|
||||
2. Strip it from the pipeline matrices and commit the result:
|
||||
|
||||
```sh
|
||||
# dry run
|
||||
just retire-slot alpine322
|
||||
# write the changes
|
||||
just retire-slot alpine322 --apply
|
||||
```
|
||||
|
||||
3. Delete its cron jobs on the Crow server.
|
||||
They are not in this repository, and removing a matrix row does not remove the cron that targets it.
|
||||
`local/retire-slot.R` prints the ones it finds, with the API call.
|
||||
4. Delete its objects from the bucket, which needs the B2 credentials and therefore runs in CI:
|
||||
2. `just retire-slot <codename> --apply`, then commit.
|
||||
3. Delete its cron jobs on the Crow server; `local/retire-slot.R` prints them with the API call.
|
||||
4. Delete its objects:
|
||||
|
||||
```sh
|
||||
crow pipeline create devxy/build-cran-binaries --branch main \
|
||||
--var retire_slot=alpine322 --var RETIRE_APPLY=yes
|
||||
--var retire_slot=<codename> --var RETIRE_APPLY=yes
|
||||
```
|
||||
|
||||
`local/retire-slot.R` refuses any slot still listed in `cdn.tf`, so steps 2 and 4 cannot run against a live slot.
|
||||
Doing step 4 before step 2 is the one ordering that actively breaks things: the next nightly would rebuild everything just deleted.
|
||||
Steps 2 and 4 refuse any slot still listed in `cdn.tf`.
|
||||
Running step 4 before step 2 means the next nightly rebuilds everything just deleted.
|
||||
|
||||
`just check-slots` fails when any pipeline still targets a slot the edge does not route, which is the drift that put Alpine 3.22 where it was.
|
||||
It is one-directional on purpose: a published slot missing from _some_ pipeline is only reported, because several pipelines cover a subset deliberately.
|
||||
`just check-slots` fails when a pipeline still targets an unrouted slot.
|
||||
|
||||
## Helpers
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue