Skip to content

cache: Implement GetNar() and GetNarInfo() - #8

Merged
kalbasit merged 18 commits into
mainfrom
cache-use-upstream
Dec 1, 2024
Merged

kalbasit merged 18 commits into
mainfrom
cache-use-upstream

Conversation

@kalbasit

@kalbasit kalbasit commented Dec 1, 2024

Copy link
Copy Markdown
Owner

cache.GetNar() and cache.GetNarInfo() return files from the store, if the files are not found then first pull them from an upstream and then return them.

@kalbasit
kalbasit merged commit 9e61223 into main Dec 1, 2024
@kalbasit
kalbasit deleted the cache-use-upstream branch December 1, 2024 09:28
kalbasit added a commit that referenced this pull request Dec 1, 2024
* main:
  cache: Implement GetNar() and GetNarInfo() (#8)
  helper: Add a helper to compute path of narInfo and nar (#7)
  cache: take in upstream caches and sort them by priority (#6)
kalbasit added a commit that referenced this pull request May 29, 2026
## Why CI got slow and flaky

CI averages ~20 min, often exceeds 30, and fails roughly half of runs —
so a PR takes several attempts to merge. Root cause (measured on run
`26653285682`):

| `build` matrix leg | Duration | Result |
|---|---|---|
| `x86_64-linux` | 17.4 min | ✅ |
| `aarch64-linux` | 25.7 min | ❌ (Postgres cohort timeout) |

The shared `build` job fans out over `["x86_64-linux","aarch64-linux"]`
and runs the **entire** `nix flake check` — all integration cohorts
(Garage/Postgres/MySQL/Redis) — on **both** legs. The aarch64 leg runs
on slower ARM runners where the Postgres cohort times out, making it
both the long pole *and* the dominant failure. Integration tests are
architecture-independent, so the aarch64 run buys no signal — only wall
clock and flaky reruns.

## What this does

Passes `test_systems: '["x86_64-linux"]'` to the shared
`kalbasit/gh-actions` workflow so `nix flake check` + coverage run on
**x86_64 only**. The `aarch64-linux` leg still builds and pushes its OCI
image (the lean, test-free `packages.ncps`), so the **multi-arch
manifest is unchanged** — it just no longer re-runs the integration
suite.

## ⚠️ Merge order

Depends on **kalbasit/gh-actions#8** (adds the `test_systems` input).
Since this repo consumes `gh-actions/.github/workflows/ci.yml@main`,
**#8 must merge first** — until then this PR's `shared` job will fail
with an unknown-input error. Re-run CI here after #8 lands.

## Scope / non-goals

Per the OpenSpec change `speed-up-ci`: this kills the flakiness and
removes the ~26-min aarch64 critical path. It does **not** rework the
dd9622c per-backend cohort split (the secondary ~8m→~14m flake-check
regression) — that's a deferred, separate lever toward the eventual
~5-min target.

OpenSpec: `openspec/changes/speed-up-ci/`.

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
@kalbasit kalbasit mentioned this pull request May 29, 2026
2 of 3 tasks
kalbasit added a commit that referenced this pull request May 29, 2026
## Summary

The release workflow (`v*.*.*` tag builds) called `build.yml`
**without** `test_systems`, so it re-ran the full `nix flake check` +
coverage on **both** x86_64 and aarch64 — including the slower, flaky
aarch64 Postgres path that the CI workflow (#1291) already learned to
avoid.

- `releases.yml`: pass `test_systems: '["x86_64-linux"]'` to the shared
build workflow. The integration suite + coverage now run on x86_64 only;
the aarch64 leg still **builds and pushes** its OCI image, so the
multi-arch manifest is unchanged. `run_flake_check` stays at its default
(`true`) so releases still gate on the full suite.
- Mirrors the CI workflow's scoping.
- `flake-check-topology` spec: the "Integration cohorts validated on a
single CI architecture" requirement now covers **both** `ci.yml` and
`releases.yml`, with a new release-tag scenario.

Independent of the fan-out PR (#1293); branched off `main`. Relies on
the `test_systems` input already on `kalbasit/gh-actions@main` (merged
in #8).

## Test plan

- [x] `actionlint .github/workflows/releases.yml` — exit 0
- [x] `task fmt` clean; pre-commit hooks pass
- [ ] Confirm on the next release tag that the aarch64 leg builds the
image but skips `nix flake check`

---------

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