Conversation
✅ Deploy Preview for devsydev canceled.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
✅ Deploy Preview for images-devsy-sh canceled.
|
|
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
…ntics A workspace with an embedded devcontainer config and a legacy last-resolved path kept reading from the filesystem after profile selection was introduced; the last-path fallback now applies only when no embedded config exists, restoring the previous behavior. Workspace.DevContainerPath is now documented and used consistently as relative to the workspace folder (content root including the git subpath), while the last resolved path stays relative to the content root. The generic subpath-stripping shim corrupted persisted paths whose first segment matched the subpath; the exact conversion now applies only to the legacy last-path fallback. Both regressions are pinned by tests that fail without this change. Also drops the no-op DevContainerID pass-through in the build command (no flag can set it) and adds the missing nil guard on the git subpath lookup.
Splits the legacy last-config-path fallback out of effectiveDevContainerSelection to satisfy the cyclomatic complexity limit, names the repeated test subpath, and wraps lines golines flags.
14294f3 to
a204922
Compare
Summary
Fixes #1268.
Persist explicit
--devcontainer id:<profile>selection in workspace state and reuse it across lifecycle/config reconstruction. Effective selector precedence is current source/path/id, persisted source/path/id, last resolved config path for compatibility, then discovery. Selector replacements clear stale alternatives.Adds focused unit coverage and a minimal Docker Compose multi-profile lifecycle regression (
up id:max, stop, selector-free restart, delete).Validation
go test ./pkg/devcontainer/... ./pkg/workspace ./pkg/provider ./cmd/workspace/... ./cmd/ci/...task cli:lint:cigit diff --checkThe focused E2E body was blocked by the existing Docker provider setup (
provider addreturned no diagnostic); the repository E2E task also has a macOS ARM GoReleaser path mismatch (darwin_arm64_v1expected vsdarwin_arm64_v8.0produced). Pre-commit Go formatting was stopped after hanging for over four minutes;gofmtand CI-parity lint passed.