Repository navigation
Name the Snippets' Host Mount Paths and Give mktemp an Explicit Template - #3878
Conversation
Each devcontainer snippet gets a comment beside its mounts naming the host paths that must exist before the container starts, per the answer to #3754. The Python post-create drops `mktemp -t`, whose temp-dir choice differs across mktemp implementations, for an explicit template under ${TMPDIR:-/tmp}. The template ends in its X run, since BSD mktemp reads a suffix after it literally. Closes #1763 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes address the documented mount-path and temporary-file portability concerns while preserving installer behavior, with no active issues identified.
No open issues 🎉
What changed in this PR
Updates the canonical Python and .NET devcontainer snippets to document required host mount paths and improve mktemp portability for the Python installer.
Changes:
- Documents required host paths and Docker behavior when mount sources are missing.
- Replaces
mktemp -twith an explicitTMPDIR-aware template. - Preserves the existing installer execution and cleanup behavior.
| File | Description |
|---|---|
catalog/snippets/devcontainer/python/post-create.sh |
Uses an explicit portable temporary-file template for the uv installer. |
catalog/snippets/devcontainer/python/devcontainer.json |
Documents required host paths for Python container mounts. |
catalog/snippets/devcontainer/dotnet/devcontainer.json |
Documents required host paths for .NET container mounts. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3878 +/- ##
========================================
Coverage 83.31% 83.31%
========================================
Files 29 29
Lines 9956 9956
========================================
Hits 8295 8295
Misses 1661 1661
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…an Explicit Template (#3879) ## Summary Promotes #3878 to `main`. Closes #1763. - **Host mount paths.** Each devcontainer snippet has a one-line JSONC comment above `mounts`. It names the host paths that must exist and says why: Docker either refuses an absent source or creates an empty directory in its place. This is the maintainer's answer to #3754. - **`mktemp` template.** The Python post-create step uses `mktemp "${TMPDIR:-/tmp}/uv-install.XXXXXX"` in place of `mktemp -t uv-install.XXXXXX.sh`. It still honors `TMPDIR` and behaves the same across mktemp implementations. Verified by running the new `mktemp` line in `debian:bookworm-slim` and `busybox:1.36`, with `TMPDIR` unset and with it set. #3878 had two local strict review passes, which found one problem between them, now fixed, and a Copilot round with no findings. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
This finishes the two points still open on #1763. Its
HOMEandUSERPROFILEpart was split out into #3852, which is closed.mounts. It names the host paths that must exist and says why: Docker either refuses an absent source or creates an empty directory in its place. This is option 1 of the maintainer's answer to Decide: Should the three host bind mounts in catalog/snippets/devcontainer/{python,dotnet}/devcontainer.json (~/.ssh/id_ed25519.pub,~/.config/git/allowed_signers,~/.config/gh), where a missing source? #3754. The comment cites no hub-only doc, because the snippets are copied into other repositories.mktemptemplate. The Python post-create step usedmktemp -t uv-install.XXXXXX.sh. It now usesmktemp "${TMPDIR:-/tmp}/uv-install.XXXXXX", an explicit template that still honorsTMPDIR. The template ends with its run ofXs, because BSDmktempwould read anything after them literally. The step runs the file withsh "$installer", so it never needed the.shsuffix.The
commentslabel is needed for the added comment lines.Verification
mktempline indebian:bookworm-slim(the snippet's image family) and inbusybox:1.36, withTMPDIRunset and with it set. It created the file under the expected directory each time.tests/test_cli_usage.pypassed.c0113cf7. Pass 2 found nothing.prose_lintreported no violations.The promotion PR will carry the
Closes #1763line.🤖 Generated with Claude Code