Skip to content

List and inspect named volumes#14555

Merged
kvega005 merged 73 commits intomicrosoft:feature/wsl-for-appsfrom
kvega005:listAndInspectNamedVolumes
Apr 1, 2026
Merged

List and inspect named volumes#14555
kvega005 merged 73 commits intomicrosoft:feature/wsl-for-appsfrom
kvega005:listAndInspectNamedVolumes

Conversation

@kvega005
Copy link
Copy Markdown

!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->

Summary of the Pull Request

Adds two new volume management methods to the WSLA session interface, complementing the existing CreateVolume and DeleteVolume.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

IDL (wslaservice.idl)

  • Added WSLA_MAX_VOLUME_NAME_LENGTH constant (255) for volume name length limits
  • Added WSLAVolumeInformation struct
  • Added ListVolumes and InspectVolume methods to IWSLASession

Volume inspect schema (wsla_schema.h)

  • Added InspectVhdVolume struct with VHD-specific details (HostPath, SizeBytes)
  • Added InspectVolume struct with common fields (Name, Type) and an optional type-specific VhdVolume sub-object extensible for future volume types without exposing implementation details in the common fields

Validation Steps Performed

Added ListAndInspectNamedVolumesTest to validate changes.

kvega005 and others added 30 commits March 5, 2026 12:20
…4' of https://github.com/kvega005/WSL into feature/wsl-for-apps-named-volumes-merge-20260305-115914
…4' of https://github.com/kvega005/WSL into feature/wsl-for-apps-named-volumes-merge-20260305-115914
…re/wsl-for-apps-named-volumes-merge-20260305-115914
…4' of https://github.com/kvega005/WSL into feature/wsl-for-apps-named-volumes-merge-20260305-115914
Copilot AI review requested due to automatic review settings March 27, 2026 17:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class “named volume” management to the WSLA session API (list + inspect), with a VHD-backed implementation and container integration, plus Windows tests to validate behavior and recovery.

Changes:

  • Extend IWSLASession with CreateVolume/DeleteVolume/ListVolumes/InspectVolume and related IDL types/constants.
  • Implement VHD-backed volume lifecycle, metadata persisted via Docker volume labels, and session startup volume recovery.
  • Allow containers to mount named volumes and validate mounts during create/open; add test coverage for create/mount/delete/recovery and list/inspect.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/windows/WSLATests.cpp Adds named volume tests (create/mount/delete/recovery + list/inspect) and updates expected invalid-name error strings.
src/windows/wslasession/WSLAVolumeMetadata.h Defines JSON metadata schema/label used to tag Docker volumes with WSLA volume metadata.
src/windows/wslasession/WSLAVirtualMachine.h Adds Ext4Format() helper declaration.
src/windows/wslasession/WSLAVirtualMachine.cpp Implements Ext4Format() using mkfs.ext4.
src/windows/wslasession/WSLAVhdVolume.h Introduces internal VHD-backed volume implementation interface.
src/windows/wslasession/WSLAVhdVolume.cpp Implements VHD-backed volume create/open/delete/inspect + attach/mount management.
src/windows/wslasession/WSLASession.h Adds volume management COM methods, volume bookkeeping, and new volume lock.
src/windows/wslasession/WSLASession.cpp Implements volume APIs, volume recovery, name validation reuse, and passes volume set to container create/open.
src/windows/wslasession/WSLAContainer.h Plumbs session volume set into container create/open for named-volume validation.
src/windows/wslasession/WSLAContainer.cpp Adds named-volume mount processing for create and validation for recovered containers.
src/windows/wslasession/DockerHTTPClient.h Adds Docker volume management calls (create/remove/list).
src/windows/wslasession/DockerHTTPClient.cpp Implements Docker volume HTTP transactions.
src/windows/wslasession/CMakeLists.txt Builds the new WSLAVhdVolume.cpp implementation.
src/windows/service/inc/wslaservice.idl Adds volume constants/types and extends IWSLASession with volume APIs.
src/windows/inc/wsla_schema.h Adds JSON inspect schema for volumes (common + VHD-specific).
src/windows/inc/docker_schema.h Adds Docker volume schemas and mount Name field; includes mounts in container list parsing.
src/windows/common/WSLAContainerLauncher.h Adds test/SDK helper to attach named volumes to container options.
src/windows/common/WSLAContainerLauncher.cpp Implements named-volume option wiring to WSLAContainerOptions.
localization/strings/en-US/Resources.resw Adds/renames localized strings for invalid names and volume-related errors.

Copilot AI review requested due to automatic review settings March 27, 2026 17:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings March 27, 2026 23:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Copilot AI review requested due to automatic review settings March 30, 2026 18:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

@kvega005 kvega005 marked this pull request as ready for review March 31, 2026 19:56
@kvega005 kvega005 requested a review from a team as a code owner March 31, 2026 19:56
Copilot AI review requested due to automatic review settings March 31, 2026 22:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Copy link
Copy Markdown
Collaborator

@OneBlue OneBlue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kvega005 kvega005 merged commit 148545e into microsoft:feature/wsl-for-apps Apr 1, 2026
11 checks passed
@kvega005 kvega005 deleted the listAndInspectNamedVolumes branch April 1, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants