Repository navigation
Add dotfiles environment defaults #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1df03f2
Add dotfiles environment defaults
jooh 1db190b
Document dotfiles environment defaults
jooh 421d7e1
Provision full devcontainer test toolchain
jooh 80c137b
Support test caches and relative worktrees in devcontainer
jooh 0732340
Install upstream tooling in devcontainer
jooh f0aa5e7
Exercise devcontainer provisioning in test gate
jooh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| if [[ $# -ne 1 || ! -x "$1" ]]; then | ||
| echo "usage: $0 <standalone-binary-path>" >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| binary="$1" | ||
| repository_root="$(git rev-parse --show-toplevel)" | ||
| tmp_dir="$(mktemp -d)" | ||
| workspace="$tmp_dir/workspace" | ||
| result_file="$tmp_dir/up.json" | ||
| container_id="" | ||
|
|
||
| cleanup() { | ||
| if [[ -n "$container_id" ]]; then | ||
| docker rm --force "$container_id" >/dev/null 2>&1 || true | ||
| fi | ||
| rm -rf "$tmp_dir" | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| if ! command -v docker >/dev/null 2>&1; then | ||
| echo "docker is required for the devcontainer provisioning smoke test" >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| git clone --quiet --local --no-hardlinks "$repository_root" "$workspace" | ||
|
|
||
| "$binary" up --workspace-folder "$workspace" >"$result_file" | ||
| if ! grep -Fq '"outcome":"success"' "$result_file"; then | ||
| echo "devcontainer creation did not report success" >&2 | ||
| cat "$result_file" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| container_id="$(sed -n 's/.*"containerId":"\([^"]*\)".*/\1/p' "$result_file")" | ||
| if [[ -z "$container_id" ]]; then | ||
| echo "devcontainer creation did not return a container id" >&2 | ||
| cat "$result_file" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| "$binary" exec --workspace-folder "$workspace" /bin/bash -lc ' | ||
| set -euo pipefail | ||
| test -d node_modules | ||
| git --version | ||
| node --version | ||
| corepack --version | ||
| COREPACK_ENABLE_PROJECT_SPEC=0 corepack yarn --cwd upstream --version | ||
| rustc --version | ||
| cargo --version | ||
| cargo deny --version | ||
| cargo llvm-cov --version | ||
| uv --version | ||
| ' | ||
|
|
||
| echo "[devcontainer-provision] devcontainer built, provisioned, and exposed the required tools." |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the new Corepack/Yarn setup is invalid or fails to install usable upstream dependencies, this check still passes because it only compares the command text and never builds the devcontainer or executes
postCreateCommand; the added Containerfile tools are likewise not exercised by this checker. Add a smoke test that creates the devcontainer, completes post-create setup, and invokes the required tools somake testsverifies the claimed behavior.AGENTS.md reference: AGENTS.md:L51-L51
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
devcontainer-provision-smoketo the documented phony targets and the fullmake testsverification gate. MakefileL25-L47fa8b02f(Exercise devcontainer provisioning in test gate).package-lock.jsonwas left untouched.originremote and the requiredmake_prtool is unavailable in the environment.Testing
node build/check-devcontainer-config.jsbash -n scripts/standalone/devcontainer-provision-smoke.shgit diff --checkuv tool run --from shellcheck-py shellcheck scripts/standalone/devcontainer-provision-smoke.sh(the environment could not connect to PyPI to obtainshellcheck-py)make devcontainer-provision-smoke(the release build passed, but Docker is not installed in this environment)make tests(802 Rust tests passed, but the pre-existingcommands::configuration::tests::upgrade::upgrade_feature_update_reports_config_write_errorstest failed because it returned exit code 0 instead of the expected exit code 1)git push origin HEAD(the checkout has no configuredoriginremote)make_pr --title "Exercise devcontainer provisioning in test gate" ...(the requiredmake_prexecutable/tool is unavailable)View task →