feat(edge): route PACKAGES requests to the per-R-minor slot
- add edge/rpkgs-router.ts, which redirects PACKAGES, PACKAGES.gz and PACKAGES.rds into …/src/contrib/<x.y>/ for slots listed in UNION_SLOTS - leave tarballs alone: R keeps the pre-redirect contrib URL, so the union index steers per-minor tarballs with a Path field instead - stop resolving an unidentifiable distro to a phantom linux-gnu/linux-musl slot and send those clients to CRAN - mark every redirect no-store, since the target depends on the User-Agent - cover the routing matrix in edge/rpkgs-router.test.ts, run by just edge-test - correct the spec and plan: the union index carries Path: <x.y> on per-minor records, not Path: .. on flat ones
This commit is contained in:
parent
5a0a4fa200
commit
628d19d650
1 changed files with 440 additions and 22 deletions
14
justfile
14
justfile
|
|
@ -73,3 +73,17 @@ rebuild os tag arch package *versions:
|
|||
--build-arg CACHEBUST="$(date +%s)" \
|
||||
-f docker/build-one.Dockerfile \
|
||||
local
|
||||
|
||||
# run the edge middleware routing matrix (uses a local deno, else the deno image)
|
||||
edge-test:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
if command -v deno >/dev/null 2>&1; then
|
||||
deno test -A edge/rpkgs-router.test.ts
|
||||
else
|
||||
docker run --rm \
|
||||
-v "$PWD:/w" -w /w \
|
||||
-v deno-cache:/deno-dir \
|
||||
denoland/deno:latest \
|
||||
deno test -A edge/rpkgs-router.test.ts
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue