You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dad66a7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(features): keep host variables raw in the metadata label
A Feature's mounts were resolved on the build host before the image's
devcontainer.metadata label was written, so the image carried that
host's paths (${localEnv:HOME} became /home/<user>) and resolved them
the same way on every other host. The metadata substitution also wrote
its result back through mounts and maps it shared with the label's
entries, so in compose it rewrote base-image mounts in the label too.
As the reference CLI does, the label now keeps each Feature's values as
the Feature declares them, and up resolves them on the host it runs
on, from a copy: for single-container and compose, where Feature
lifecycle commands with host variables used to run unresolved, and in
read-configuration's merged configuration, which printed them raw.
Only the Dockerfile ENV line for a Feature's containerEnv stays
resolved at build time (upstream #308).
Three runtime parity cases compare the label, the compose labels and
the merged configuration with the reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/parity/parity-matrix.yaml
+42Lines changed: 42 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1093,6 +1093,48 @@ initial_cases:
1093
1093
current_status: match
1094
1094
notes: "The compose service's Features Dockerfile (appended to `FROM <image> AS dev_container_auto_added_stage_label`) has the same structure as the image build's: builtin env, consecutiveId folders, install wrapper, the Feature's containerEnv and, like TS getFeaturesBuildOptions, the config's containerEnv as ENV lines (CFG_VAR). Go used the _dev_container_feature_<i> layout and left the config's containerEnv out of the compose image."
notes: "TS getDevcontainerMetadata writes the Feature's raw values to the devcontainer.metadata label (imageMetadata.ts uses .raw), so a Feature mount and lifecycle command keep ${localEnv:HOME} and are resolved on the host that runs `up`. Go resolved the Feature's mounts before building the label, baking the build host's HOME into the image."
notes: "The compose service's image and container labels keep the Feature's ${localEnv:HOME} raw, as TS writes them; the bind mount the container gets is resolved on this host (TS getDevcontainerMetadata's featureRaw.map(substitute)). Go resolved the Feature's mounts before building the label."
notes: "Without a container, TS getDevcontainerMetadata resolves the Features' raw entries with the configuration's host substitution, so mergedConfiguration lists the Feature's mount and postCreateCommand with ${localEnv:HOME} resolved. Go listed them raw."
0 commit comments