feat(regression): R2 write backend for native baselines#732
Open
lewisjared wants to merge 3 commits into
Open
Conversation
Implement the Cloudflare R2 (S3-compatible) write backend so `ref test-cases mint`
can upload native baseline blobs to the shared object store, not just a local path.
Blobs are content-addressed with a flat, digest-keyed layout,
so each is served publicly at `{url}/{digest}` and reused across cases and re-mints.
The S3 endpoint and bucket are non-secret config (defaulting to the production R2 bucket);
write credentials are resolved at upload time only —
explicit `REF_NATIVE_STORE_ACCESS_KEY_ID` / `REF_NATIVE_STORE_SECRET_ACCESS_KEY`,
else a named `REF_NATIVE_STORE_PROFILE`,
else boto3's default credential chain — so secrets never land in the persisted config.
boto3 is an optional `aws` extra; the read and replay paths never need it.
Harden the minting developer experience:
- `mint` preflights the store (credentials and bucket reachability)
and fails fast with an actionable message before running any diagnostics.
- add `ref test-cases check-store` to verify connectivity without minting,
and `mint --dry-run` to preview scope after the preflight.
- `ref test-cases fetch` now regenerates the gitignored `catalog.paths.yaml`
when it is missing even if the committed catalog is unchanged,
so a plain fetch works on a fresh checkout (no `--force` needed).
Mint the example provider's native baselines to the production R2 bucket and author the `native` block in each test case's `manifest.json`. Remove the committed `annual_mean_global_mean_timeseries.nc` (now fetched from the store) and the retired `.catalog_hash` sidecars.
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Description
Implements the Cloudflare R2 (S3-compatible) write backend for the regression native-baseline store (RFC-005, so
ref test-cases mintcan upload native blobs to the shared object store instead of only a local path.Stacked on:
What's included
R2WriteStore— content-addressed, flat digest-keyed uploads (served at{url}/{digest}), idempotentput, hash-verifiedfetch. boto3 is an optionalawsextra, lazily imported, so the read/replay/CI paths never need it.REF_NATIVE_STORE_ACCESS_KEY_ID/REF_NATIVE_STORE_SECRET_ACCESS_KEY, else a namedREF_NATIVE_STORE_PROFILE, else boto3's default credential chain.mintnow preflights the store (credentials + bucket reachability) and fails fast with an actionable message before running any diagnostics.ref test-cases check-storeverifies connectivity without minting;mint --dry-runpreviews scope after the preflight.ref test-cases fetchregenerates the gitignoredcatalog.paths.yamlwhen it is missing even if the committed catalog is unchanged — a plainfetchnow works on a fresh checkout (no--forcerequired).annual_mean_global_mean_timeseries.nc(now served from the store) and the retired.catalog_hashsidecars.Checklist
Please confirm that this pull request has done the following:
changelog/