-
Notifications
You must be signed in to change notification settings - Fork 2
feat(devcontainer): add devcontainer-lock.json lockfile support #724
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
286828d
feat(devcontainer): add devcontainer-lock.json lockfile support
skevetter 3246528
test(e2e): validate generated lockfile contents and reject bogus pins
skevetter 825af6f
test(e2e): assert exact lockfile digest for a served tarball feature
skevetter 44faf50
feat(lockfile): add --no-lockfile opt-out, mutually exclusive with --…
skevetter 745a07d
chore: comment cleanup
skevetter 05edc8a
ci: free disk space to resolve runner storage flakiness
skevetter 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
9 changes: 9 additions & 0 deletions
9
e2e/tests/up-features/testdata/docker-features-lockfile-bad/.devcontainer-lock.json
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,9 @@ | ||
| { | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/git:1": { | ||
| "version": "1.0.0", | ||
| "resolved": "ghcr.io/devcontainers/features/git@sha256:0000000000000000000000000000000000000000000000000000000000000000", | ||
| "integrity": "sha256:0000000000000000000000000000000000000000000000000000000000000000" | ||
| } | ||
| } | ||
| } |
7 changes: 7 additions & 0 deletions
7
e2e/tests/up-features/testdata/docker-features-lockfile-bad/.devcontainer.json
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,7 @@ | ||
| { | ||
| "name": "Test Lockfile Bad Pin", | ||
| "image": "ghcr.io/devsy-org/test-images/base:ubuntu", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/git:1": {} | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
e2e/tests/up-features/testdata/docker-features-lockfile/.devcontainer.json
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,8 @@ | ||
| { | ||
| "name": "Test Lockfile", | ||
| "image": "ghcr.io/devsy-org/test-images/base:ubuntu", | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/git:1": {} | ||
| }, | ||
| "postStartCommand": "git version" | ||
| } |
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
Oops, something went wrong.
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Document both supported lockfile filenames consistently.
The lockfile is named
.devcontainer-lock.jsonfor.devcontainer.jsonconfigurations, so naming onlydevcontainer-lock.jsoncan mislead users preparing frozen builds.cmd/workspace/build.go#L113-L117: update build help to mention both names or say “the applicable devcontainer lockfile.”pkg/provider/workspace.go#L294-L300: update theCLIOptionscomments with the same neutral/both-name wording.cmd/workspace/up/up_flags.go#L73-L77: update up-command help with the same wording.📍 Affects 3 files
cmd/workspace/build.go#L113-L117(this comment)pkg/provider/workspace.go#L294-L300cmd/workspace/up/up_flags.go#L73-L77🤖 Prompt for AI Agents