Skip to content

server: create a new server to serve from cache - #9

Merged
kalbasit merged 4 commits into
mainfrom
server-pkg
Dec 1, 2024
Merged

kalbasit merged 4 commits into
mainfrom
server-pkg

Conversation

@kalbasit

@kalbasit kalbasit commented Dec 1, 2024

Copy link
Copy Markdown
Owner

Serve narinfo and nar from the cache.

@kalbasit
kalbasit merged commit d445a14 into main Dec 1, 2024
@kalbasit
kalbasit deleted the server-pkg branch December 1, 2024 21:54
kalbasit added a commit that referenced this pull request Dec 1, 2024
* main:
  server: create a new server to serve from cache (#9)
kalbasit added a commit that referenced this pull request May 29, 2026
## Why

After compile-once (#1292) CI is ~10m, bottlenecked by a single `nix
flake check` building **~13 check derivations on one contended 4-core
runner**. They're logically parallel but CPU-starved; the remaining
costs (backend-cohort test execution, golangci's own analysis) aren't
cacheable — they need more cores in parallel.

## What

Replace the monolithic check with a **CI matrix**:
- `check-matrix` job enumerates checks: `nix eval .#checks.x86_64-linux
--apply builtins.attrNames --json`.
- `checks` job runs each as its own parallel runner: `nix build
.#checks.x86_64-linux.<name>` (`fail-fast: false`), pulling the shared
`_ncps-test-cache`/`_ncps-base` from Cachix instead of rebuilding.
- `coverage` job (`needs: checks`) merges per-cohort profiles → Codecov.
- The shared build job sets **`run_flake_check: false`**
(kalbasit/gh-actions#9) so it only builds/pushes the OCI image.

Wall-clock collapses from sum-under-contention (~10m) to
**slowest-single-check + nix setup (~3–4m)** — the path to the ~5m
target. The per-job times on this run also give us the first clean
per-check breakdown.

## ⚠️ Merge order
Depends on **kalbasit/gh-actions#9** (adds `run_flake_check`). The
caller is **temporarily pinned to the gh-actions branch** to validate
now; revert to `@main` before merging once #9 lands.

OpenSpec: `flake-check-topology` gains "CI runs each check as an
independent parallel job" + "Coverage is produced by a job consuming the
fanned-out cohorts".

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant