-
Notifications
You must be signed in to change notification settings - Fork 83
inheritDefaultEnv is not honored on IsolationSession or WSLc #1165
Copy link
Copy link
Labels
Backend-IsolationSessionWindows IsolationSession backend behavior or integration.Windows IsolationSession backend behavior or integration.Backend-WSLCWindows WSL Container backend behavior or integration.Windows WSL Container backend behavior or integration.In-PRThe issue has an associated pull request in progress.The issue has an associated pull request in progress.Issue-BugSomething is not working as intended.Something is not working as intended.OS-WindowsApplies specifically to Windows hosts or Windows behavior.Applies specifically to Windows hosts or Windows behavior.Priority2High-impact issue affecting key functionality; prioritize for the next appropriate release.High-impact issue affecting key functionality; prioritize for the next appropriate release.Release v1.0Issues tracked for the version 1.0 releaseIssues tracked for the version 1.0 release
Description
Activity
Metadata
Metadata
Assignees
Labels
Backend-IsolationSessionWindows IsolationSession backend behavior or integration.Windows IsolationSession backend behavior or integration.Backend-WSLCWindows WSL Container backend behavior or integration.Windows WSL Container backend behavior or integration.In-PRThe issue has an associated pull request in progress.The issue has an associated pull request in progress.Issue-BugSomething is not working as intended.Something is not working as intended.OS-WindowsApplies specifically to Windows hosts or Windows behavior.Applies specifically to Windows hosts or Windows behavior.Priority2High-impact issue affecting key functionality; prioritize for the next appropriate release.High-impact issue affecting key functionality; prioritize for the next appropriate release.Release v1.0Issues tracked for the version 1.0 releaseIssues tracked for the version 1.0 release
Relevant area(s)
Windows
Brief description of your issue
#1153 gave LXC, Bubblewrap, and Seatbelt the schema-0.9
process.inheritDefaultEnvcontract that #1120 shipped for the Windows ProcessContainer tiers. IsolationSession and WSLc were left out and still flatten the four states into two.The contract the other backends now honor:
process.envinheritDefaultEnv[]["FOO=bar"]false(default)["FOO=bar"]trueIsolationSession (
src/backends/isolation_session/common/src/process_options.rs:179-187) fetchesproc_options.Environment()and inserts into it, so it behaves as permanentlyinheritDefaultEnv: true. A caller who asks for a verbatim environment — which is the default — silently gets the session''s full default environment merged in.IMap::Clear()is available for the replace case.WSLc (
src/backends/wslc/common/src/wsl_container_runner.rs:1490,src/backends/wslc/common/src/container_steps.rs:404) guards the SDK call withif !effective_env.is_empty(), flattening omitted and[]together. WhetherWslcSetProcessSettingsEnvVariablesreplaces or augments the image environment is undocumented —wslcsdk.h:343has no comment — so that needs to be established first. If it augments,Explicitmay not be honorable and should be rejected rather than silently downgraded.Both backends currently use
ExecutionRequest::env_entries(), whose doc comment now names them as the remaining callers.Steps to reproduce
--features isolation_session.0.9.0-alphaconfig againstcontainment: "isolationsession"withprocess.envset to["FOO=bar"]and noinheritDefaultEnv.Expected behavior
Only
FOOis present — the environment is used verbatim, as it is on every other backend at 0.9.Actual behavior
FOOis present alongside the isolation session''s entire default environment.