Skip to content

Comments

Add container ID to WSLA_CONTAINER so the CLI doesn't require a WslaContainer reference during simple wslc container list#14243

Open
OneBlue wants to merge 3 commits intofeature/wsl-for-appsfrom
user/oneblue/list-id
Open

Add container ID to WSLA_CONTAINER so the CLI doesn't require a WslaContainer reference during simple wslc container list#14243
OneBlue wants to merge 3 commits intofeature/wsl-for-appsfrom
user/oneblue/list-id

Conversation

@OneBlue
Copy link
Collaborator

@OneBlue OneBlue commented Feb 21, 2026

Summary of the Pull Request

This change adds ID to the list of returned fields when listing a container, which fixes list for containers without names and allows a simpler implementation of the simple case for List()

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

Validation Steps Performed

…ontainer reference during simple wslc container list
@OneBlue OneBlue requested a review from a team as a code owner February 21, 2026 00:21
Copilot AI review requested due to automatic review settings February 21, 2026 00:21
Copy link
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

This PR extends the WSLA container listing data contract to include the container ID, allowing wslc to list containers (including unnamed ones) without opening/inspecting each container.

Changes:

  • Adds Id to the WSLA_CONTAINER struct returned by IWSLASession::ListContainers.
  • Populates WSLA_CONTAINER::Id in WSLASession::ListContainers.
  • Updates wslc’s ContainerService::List() to use the returned Id directly and updates tests to validate Id is present.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
test/windows/WSLATests.cpp Adds an assertion that returned WSLA_CONTAINER entries include a full-length ID.
src/windows/wslc/services/ContainerService.cpp Switches container listing to use WSLA_CONTAINER::Id instead of opening/inspecting containers.
src/windows/wslasession/WSLASession.cpp Fills the new Id field when constructing the WSLA_CONTAINER array.
src/windows/wslaservice/inc/wslaservice.idl Adds Id to WSLA_CONTAINER and relocates the WSLAContainerId typedef near container types.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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