Skip to content

Refactor compose mount handling: unify mount definition and disable implicit workspace mounts#94

Merged
jooh merged 2 commits into
mainfrom
codex/fix-docker-compose-workspace-mount-parity-issue
Jun 8, 2026
Merged

Refactor compose mount handling: unify mount definition and disable implicit workspace mounts#94
jooh merged 2 commits into
mainfrom
codex/fix-docker-compose-workspace-mount-parity-issue

Conversation

@jooh

@jooh jooh commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Simplify and unify how compose mount entries are represented and rendered by consolidating to a single mount definition type.
  • Stop implicitly injecting a host workspace mount into compose override files for compose-based flows.
  • Remove ad-hoc "short" mount syntax handling in favor of always using a normalized mapping shape.

Description

  • Replaced the ComposeVolumeEntry enum and short-syntax handling with a single ComposeMountDefinition struct and updated APIs to return Vec<ComposeMountDefinition> from compose_additional_volumes and related helpers.
  • Removed implicit workspace mount inclusion from compose_additional_volumes and removed compose_workspace_volume usage in override_file so workspace mounts are no longer added by default for compose flows.
  • Updated YAML rendering functions in override_yaml to accept ComposeMountDefinition and render mapping entries directly, removing special-case short entry rendering.
  • Adjusted mount parsing helpers in override_mounts to return the unified mount definition type and merged parsing/merging logic accordingly.
  • Changed remote_workspace_folder_for_args in workspace.rs to prefer a configured workspaceFolder for compose flows and to ignore workspaceMount when determining the remote folder for compose-based flows.
  • Updated unit tests and test expectations to reflect the new behavior and types, including renaming tests that assert workspace mounts are not added by default.

Testing

  • Ran the updated unit test suites covering cmd/devcontainer/src/runtime/compose and cmd/devcontainer/src/runtime/context including mount parsing, YAML rendering, and compose override generation; all tests passed.
  • Executed the modified tests that previously expected implicit workspace mounts to ensure they now assert the absence of those mounts and succeeded.

Codex Task

@jooh

jooh commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jooh jooh merged commit 0730595 into main Jun 8, 2026
5 checks passed
@jooh jooh deleted the codex/fix-docker-compose-workspace-mount-parity-issue branch June 8, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant