Repository navigation
chore(deps): update actions/checkout digest to df4cb1c - #1322
Merged
Merged
Conversation
4 tasks done
kalbasit
added a commit
that referenced
this pull request
Jun 4, 2026
## Summary Fixes the flaky `TestCDCBackends/.../Mixed_Mode` failure seen in CI (e.g. on #1322) — `error fetching the nar from the store: not found`. The root cause is a TOCTOU race in the NAR read path. When a whole-file NAR is served while CDC is enabled, `GetNar` triggers a **background** NAR→chunks migration that deletes the whole file, then *synchronously* serves from that same store. If the delete wins the race after `serveNarFromStorageViaPipe` chose the store branch (`total_chunks` still observed as `0`) but before `getNarFromStore` opens the file, the read 404s — even though the NAR is fully available as chunks. In production this surfaces as spurious 404s on freshly-migrated NARs. Because the migration commits the chunks **before** deleting the whole file, the NAR is always retrievable from chunks at that point. The fix: when a store read returns `ErrNotFound` while CDC is enabled and the request is uncompressed, fall back to `getNarFromChunks`. - The chunk result is adopted **only on success**; if chunks are also absent, the original store `ErrNotFound` is preserved (genuine not-found semantics unchanged). - Compressed requests are excluded — chunks are stored uncompressed, so a `.nar.xz` request keeps returning `ErrNotFound` and falls back upstream. ## Test plan - [x] New deterministic regression test reproduces the race via a `narStore` wrapper (RED → GREEN; RED reproduced the exact CI error) - [x] Added coverage for the compressed-request and genuinely-absent edges; documented the race in `testCDCMixedMode` - [x] `TestCDCBackends` + new tests pass under `-race` (repeated runs) - [x] `task fmt`, `task lint` (0 issues), `task test`, and full integration suite (`task test:auto`, real Postgres/MySQL/Redis) pass ## Spec Adds the `cdc-chunking` requirement "Serving a whole-file NAR MUST be resilient to a concurrent background migration" (4 scenarios), and archives the OpenSpec change under `openspec/changes/archive/2026-06-03-fix-flaky-cdc-mixed-mode-test/`. --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
renovate
Bot
force-pushed
the
renovate/actions-checkout-digest
branch
from
June 4, 2026 03:59
06a6290 to
58dfba2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
de0fac2→df4cb1cConfiguration
📅 Schedule: (UTC)
* 0-3 * * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.