fix: unblock Modal image builds and function deployment - #1837
Conversation
Terraform Validation Results
Pushed by: @ColeMurray, Action: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe change copies ChangesSandbox runtime image copying
Debian temporary directory setup
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This restores runtime inclusion in Modal function images and sticky-bit /tmp permissions before Debian package installation. The targeted safeguards cover both build contracts, with no remaining merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
There was a problem hiding this comment.
Thermo-nuclear code quality audit complete. No blocking findings.
Both fixes are located at the narrow canonical boundaries: the shared Debian installer restores the system /tmp invariant immediately before APT, and the Modal function image explicitly bakes local runtime source before the subsequent image layer. They add no branching, wrapper, optionality, cross-layer leakage, or file-size regression. The source-level regression guards are focused and proportionate to these declarative build contracts.
Validation performed:
uv run --extra dev pytest tests/test_deploy.py -q(13 passed)uv run --extra dev pytest tests/test_bundle.py -q(26 passed)- Ruff lint and format checks for all changed Python files
bash -n install/os/debian.shgit diff --check- Confirmed the installed Modal API requires
copy=Truebefore subsequent image build steps - All completed GitHub CI checks pass
There was a problem hiding this comment.
Summary
PR #1837, fix: unblock Modal image builds and function deployment, by @ColeMurray updates 4 files (+13/-1). The changes correctly restore the shared /tmp permissions required by APT and bake sandbox_runtime into the Modal function image before the subsequent image step. No blocking or non-blocking defects were found.
Critical Issues
None.
Suggestions
None.
Nitpicks
None.
Positive Feedback
install -d -m 1777 /tmpis a minimal, idempotent repair that runs before both APT update operations.copy=Truematches Modal 1.4.3's image API contract and preserves the intended runtime import path while allowing the following.env(...)operation.- Focused regression guards cover both deployment contracts. All 238 Modal infrastructure tests and all 55 sandbox-image tests pass; Ruff lint/format, Bash syntax, and diff whitespace checks also pass.
Questions
None.
Verdict
Approve: Ready to merge.
Summary
Port the two Modal deployment fixes validated in production after the shared sandbox-image consolidation (#1816):
/tmpto mode1777before Debian/Ubuntu APT operations. The staged Modal image can leave it owned by root with mode0755, preventing APT's unprivileged_aptuser from creating temporary files and causing misleading repository-signature errors.copy=Truewhen addingsandbox_runtimeto the Modal function image. This bakes the source into the image so the subsequent.env(...)build step is valid; Modal rejects build steps after a runtime-onlyadd_local_dirmount.No provider selection, deployment configuration, credentials, or unrelated production changes are included.
Validation
git diff --check.These same runtime changes were previously verified through a successful production Modal image build, fresh-sandbox smoke verification, and function deployment. This public port does not trigger a new manual production deployment.
Summary by CodeRabbit
Bug Fixes
/tmpwith shared, secure permissions before package installation.Tests
/tmpsetup occur in the correct build order.