fix(docker): pin submodule SHAs so deploy builds match committed sources#13
Conversation
`fly deploy` started failing this week because the Dockerfile cloned `rain.math.float` via `git submodule add` (always HEAD of upstream main). Upstream bumped `wasm-bindgen` past our pinned `=0.2.100`: rain-math-float v0.1.7 -> wasm-bindgen ^0.2.122 st0x-oracle-server -> wasm-bindgen =0.2.100 Cargo resolves the conflict by failing the build. Local builds were fine because we use the working-tree submodule pointer (currently 1cf3969 = v0.1.0), but the Docker build saw a totally different source tree on every run. Pin both submodules' SHAs as Dockerfile ARGs and `git checkout` them explicitly after the initial clone, then recursively init nested submodules. SHAs match what's in the working tree right now, which is what Cargo.lock was resolved against. Verified by running `docker build -t oracle-test .` end-to-end: pulls `rain-math-float v0.1.0` (correct) and the final image compiles. When the submodules need updating, bump the two ARGs in lockstep with the working-tree pointers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Dockerfile builder stage now pins Git submodule checkouts to specific commit SHAs provided as build-time arguments, replacing the previous unpinned ChangesPinned Submodule Checkouts
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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 |

fly deploystarted failing this week because the Dockerfile clonedrain.math.floatviagit submodule add(always HEAD of upstream main).Upstream bumped
wasm-bindgenpast our pinned=0.2.100:rain-math-float v0.1.7 -> wasm-bindgen ^0.2.122
st0x-oracle-server -> wasm-bindgen =0.2.100
Cargo resolves the conflict by failing the build. Local builds were fine
because we use the working-tree submodule pointer (currently 1cf3969 =
v0.1.0), but the Docker build saw a totally different source tree on
every run.
Pin both submodules' SHAs as Dockerfile ARGs and
git checkoutthemexplicitly after the initial clone, then recursively init nested
submodules. SHAs match what's in the working tree right now, which is
what Cargo.lock was resolved against.
Verified by running
docker build -t oracle-test .end-to-end: pullsrain-math-float v0.1.0(correct) and the final image compiles.When the submodules need updating, bump the two ARGs in lockstep with
the working-tree pointers.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
Summary by CodeRabbit