fix(relay): unbreak fly deploy#3791
Conversation
- Pin `bunx turbo@2.8.7` in the prune stage. Previously unpinned, so Docker fetched whatever was latest on npm (2.9.6) — that version produces a pruned bun.lock inconsistent with its own pruned package.jsons, causing `bun install --frozen-lockfile` to fail. Pinning to the project's turbo version eliminates the drift. - Drop dead `COPY patches patches` left over from #3509 (durable-streams patch removal). The directory hasn't existed since March, so any redeploy from a clean cache failed at this line. - Bump VM memory from 2gb to 4gb. Fly's `cpu_kind = "performance"` now requires ≥4096 MiB; the existing machine was grandfathered but new deploys are rejected.
📝 WalkthroughWalkthroughThese changes modify the relay app's deployment configuration by pinning the Turbo CLI version to 2.8.7 in the Docker build process, removing the patches directory copy step, and increasing the VM memory allocation to 4GB for the Fly.io deployment. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 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 |
Greptile SummaryThis PR fixes three independent breakages that prevented a clean Confidence Score: 5/5Safe to merge — all three fixes are targeted, verified end-to-end, and carry no risk of regression. No P0 or P1 findings. The turbo pin exactly matches the project's installed version (confirmed in root package.json), the dead COPY removal is clearly correct, and the memory bump satisfies a documented Fly requirement. Author reports successful end-to-end validation in production. No files require special attention.
|
| Filename | Overview |
|---|---|
| apps/relay/Dockerfile | Pins turbo to 2.8.7 (matches root package.json) and removes dead COPY patches patches — both correct, targeted fixes for build failures. |
| apps/relay/fly.toml | Bumps VM memory from 2 GB to 4 GB to satisfy Fly's minimum for performance-class CPUs — straightforward infrastructure fix. |
Reviews (1): Last reviewed commit: "fix(relay): unbreak fly deploy" | Re-trigger Greptile
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/relay/Dockerfile (1)
7-7: Turbo pin matches rootpackage.json— good fix.Pinning
bunx turbo@2.8.7here aligns the prune-stage CLI with the"turbo": "2.8.7"devDependency in the rootpackage.json, which is exactly what prevents the lockfile/manifest drift you described (unpinnedbunxwas resolving to 2.9.6 and producing abun.lockincompatible with the prunedpackage.jsons under--frozen-lockfile).One small maintenance hazard worth flagging: this version is now duplicated across
package.jsonand the Dockerfile, and there's nothing enforcing they stay in sync. If someone bumps turbo inpackage.jsonwithout touching the Dockerfile, builds will silently regress to the same drift class of failure. Consider a brief inline comment as a tripwire for future bumps.📝 Optional: add a sync-reminder comment
-RUN bunx turbo@2.8.7 prune `@superset/relay` --docker +# Keep this version in sync with `turbo` in the root package.json — version +# drift here produces a pruned bun.lock incompatible with --frozen-lockfile. +RUN bunx turbo@2.8.7 prune `@superset/relay` --docker🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/relay/Dockerfile` at line 7, Add a brief inline comment above the RUN bunx turbo@2.8.7 prune `@superset/relay` --docker line noting that the pinned turbo version must match the root package.json devDependency "turbo": "2.8.7"; this serves as a tripwire to update the Dockerfile whenever the root package.json turbo version is bumped to avoid lockfile/manifest drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@apps/relay/Dockerfile`:
- Line 7: Add a brief inline comment above the RUN bunx turbo@2.8.7 prune
`@superset/relay` --docker line noting that the pinned turbo version must match
the root package.json devDependency "turbo": "2.8.7"; this serves as a tripwire
to update the Dockerfile whenever the root package.json turbo version is bumped
to avoid lockfile/manifest drift.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c466c91d-3eb0-4803-a045-c7bc8e78fc50
📒 Files selected for processing (2)
apps/relay/Dockerfileapps/relay/fly.toml
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
Three independent breakages that all surfaced when redeploying the relay tonight to ship the org-scoped routing-key fix from #3784. Already validated end-to-end — the relay is live at v4 in
sjcrunning off this exact image+config (built with these fixes applied locally).bunx turbo@2.8.7in the prune stage. Previously unpinned, so the Docker build fetched whatever was latest on npm (2.9.6). That version generates a prunedbun.lockthat's inconsistent with its own prunedpackage.jsons, so the next stage'sbun install --frozen-lockfilefails with "lockfile had changes". Reproduced both with bun 1.3.11 and 1.3.12 inside the image — it's a turbo-prune bug, not a bun version issue. Pinning to the project's installed turbo version eliminates the drift.COPY patches patches. The directory hasn't existed since chore(deps): upgrade tanstack/db + electric, drop durable-streams patch #3509 dropped the durable-streams patch. Any redeploy from a clean Docker cache failed at thisCOPY.cpu_kind = "performance". The existing machine was grandfathered butfly deployrejects new configs that violate this. Keeping perf CPUs since the relay proxies WS tunnels and shared-CPU noise would hurt latency.Test plan
fly deployagainstsuperset-relaybuilds and rolls out cleanly with these changesstartedstate,/healthreturns 200package.json("turbo": "2.8.7")Summary by cubic
Fixes the relay Fly deploy by pinning the prune tool and updating VM settings. Prevents lockfile drift and meets Fly’s performance CPU memory requirement.
turboto2.8.7during Docker prune to stop pruned lockfile drift that brokebun install --frozen-lockfile.COPY patchesline; the directory no longer exists.cpu_kind = "performance".Written for commit c057555. Summary will update on new commits.
Summary by CodeRabbit