Skip to content

ci(s3): nightly canary that proves the cache bucket is reachable - #3867

Merged
zackees merged 3 commits into
masterfrom
ci/s3-canary
Nov 7, 2026
Merged

zackees merged 3 commits into
masterfrom
ci/s3-canary

Conversation

@zackees

@zackees zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member

Requirement: "make sure the S3 cache is used". Today it cannot even be observed.

The problem this addresses

build-project.yaml passes s3-bucket: forge-ci, s3-endpoint: nyc3.digitaloceanspaces.com, s3-region: nyc3, s3-cache-limit: 50G and both SOLDR_S3_CACHE_* secrets into zackees/setup-soldr at 11 callsites - and every one of them sets build-cache: false. .github/actions/cache/action.yml is an actions/cache wrapper with no S3 code. So the bucket is configured, credentialed, and never touched by a compile, and no workflow step reports a single byte about it.

What this adds

A nightly (and dispatchable) s3-cache-canary job in scheduled.yaml:

  1. write a small canary object to s3://forge-ci/ci-canary/<timestamp>.txt
  2. read it back and cmp it - proving write and read, not just credentials
  3. report the bucket via aws s3 ls --recursive --summarize: object count, bytes, GiB against the 50 GiB watermark
  4. delete the canary

continue-on-error: true and explicit "credentials missing" handling: this probe reports, it never blocks the nightly.

Why a canary before flipping build-cache

Flipping build-cache: true enables the compiler store transport, which can serve a stale artifact as a hit - the zccache#1943 class of false green. The canary proves endpoint + credentials + bucket state first, cheaply and reversibly, so the later flip is a smaller change against a known-good store.

Verified

  • yaml.safe_load parses the modified workflow
  • ci/test_ci_toml.py -> 47 tests OK (workflow policy: no new permissions needed, job inherits contents: read)

Not done here

  • build-cache: true on any lane. That is the next step, one lane at a time, measured by the ledger in ci: per-job cache ledger and baseline rollup #3831.
  • Reading the bucket from a workstation: SOLDR_S3_CACHE_* are write-only GitHub secrets and doctl has no Spaces listing, which is exactly why the answer has to come from a CI job.

Expected output after merge (next nightly)

### S3 cache canary
- write/read: ok (object ci-canary/2026-11-08T00:17:00Z.txt)
- bucket: forge-ci @ nyc3
- objects: N
- size: B bytes (G GiB of 50 GiB)

The S3 remote cache is configured on every setup-soldr callsite but every one
runs build-cache: false, so nothing exercises the bucket and nobody can answer
'is S3 being used?' from CI. This adds a scheduled probe: write a canary,
read it back, report object count and bytes against the 50G watermark.

continue-on-error: the probe reports, it never blocks the nightly. Missing
credentials print a warning and exit 0 with 'credentials missing'.
scheduled.yaml failed the workflow policy: ci/test_workflow_duplicate_keys.py rejects a
multi-line run block in that file. The probe now lives in ci/s3_cache_canary.sh and the
step is one line. Behaviour is unchanged: write, read back, summarise, delete, report;
missing credentials warn and exit 0.
ci/test_workflow_schedule_guard.py requires every root job of a scheduled workflow to
skip outside obs-rust/obs-studio (#1258), or a fork gets a failure email every night.
Added the standard guard.
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit f96b82e Nov 7, 2026
37 checks passed
@zackees
zackees deleted the ci/s3-canary branch November 7, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants