fix(storage): boot sidecar-free config for registry interface collection - #232
Conversation
The storage worker spawns a rustfs sidecar at startup whenever its config declares a `provider: local` bucket. The default config.yaml declares one (`scratch`), so the prebuilt release binary -- which bundles no rustfs and runs with $RUSTFS_BIN unset and rustfs off PATH -- exits on boot with LOCAL_BACKEND_BIN_NOT_FOUND before it registers with the engine. The publish job's interface-collection step then sees a dead process and fails, so POST /publish never runs. Add storage/config.collect.yaml (one dummy S3 bucket, no local bucket -> needs_local=false -> no sidecar spawn) and teach _publish-registry.yml to launch with `--config config.collect.yaml` when a worker ships one. The registered interface (4 functions + 2 trigger types) is config-independent, so the collected manifest is identical.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a sidecar-free ChangesInterface collection configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
skill-check — worker0 verified, 14 skipped (no docs/).
Four for four. Nicely done. |
The `interface boot smoke` job in ci.yml is the PR-side mirror of the publish interface collection: it builds each changed Rust worker from source and boots it to read back its registered interface. Like the publish flow, it booted the worker with its default config — so storage crashed on startup with LOCAL_BACKEND_BIN_NOT_FOUND (default config.yaml declares a local bucket that spawns a rustfs sidecar unavailable in CI). Apply the same config.collect.yaml convention here: launch with `--config config.collect.yaml` when a worker ships one. Kept in lockstep with _publish-registry.yml so the smoke check keeps mirroring the publish boot.
|
Follow-up: the first push surfaced a second boot path with the same root cause — the |
Problem
The
storageworker's registry publish fails (run 27064591120) at Start local worker for interface collection — never reachingPOST /publish.Worker log from the failed run:
Root cause
storagespawns arustfssidecar at startup whenever its config declares aprovider: localbucket (src/main.rsneeds_local). The defaultconfig.yamldeclares one (scratch). The prebuilt release binary bundles norustfs, and in CI$RUSTFS_BINis unset withrustfsoffPATH— so the worker exits before it connects/registers with the engine. The publish job then sees a dead process and fails.This is unique to
storage(only worker with a boot-time sidecar) and surfaced on its first publish. Everywhere elsestorageruns (e2e),rustfsis provisioned externally viarun-tests.sh::ensure_rustfs()— the publish workflow had no equivalent.Fix
Interface collection only needs the worker to connect and register its functions/trigger types — not a working backend. Those registrations are config-independent.
storage/config.collect.yaml— sidecar-free collection config: one dummy S3 bucket, nolocalbucket →needs_local=false→ norustfsspawn. Passes config validation (requires ≥1 bucket) and builds a lazy S3 client with no network call at startup..github/workflows/_publish-registry.yml—release-binaryandcargo-runpaths now launch with--config config.collect.yamlwhen a worker ships one. Opt-in and generic; onlystoragehas the file today.Test plan
Verified locally with
rustfsabsent and$RUSTFS_BINunset (identical to CI):config.yamlexit=1→LOCAL_BACKEND_BIN_NOT_FOUND(reproduces CI)config.collect.yamlrustfstouched,backend ready … provider="s3",storage registered 4 functions and 2 trigger typesThe fix run connected to a live engine and registered fully, then shut down cleanly on SIGTERM — i.e. interface collection would now succeed.
Notes
storage, cut a new tag (e.g.storage/v0.1.3) or re-createstorage/v0.1.2after merge so the job picks up both files.rustfsreaches a real deployment — the e2e auto-fetch is test-only, so a user installingstoragewith the default local bucket would hit the same crash unlessrustfsships with it orRUSTFS_BINis set.Summary by CodeRabbit