You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openserverless.apache.org by "domiwar (via GitHub)" <gi...@apache.org> on 2026/07/24 11:32:30 UTC

[PR] Stop the Windows build driver destroying the user's WSL distribution [openserverless]

domiwar opened a new pull request, #212:
URL: https://github.com/apache/openserverless/pull/212

   ## What
   
   `build-and-test-windows.ps1` unregisters and rebuilds its WSL distribution on
   every run. It defaulted to the distro named `Ubuntu` — the default name for a
   stock WSL install — and ran `wsl --unregister` on it with **no confirmation**.
   `--unregister` deletes the distribution's virtual disk and cannot be undone.
   
   I hit this personally: running the script would have destroyed my main
   `Ubuntu` WSL distribution and everything in it.
   
   ## Changes
   
   - Default to a dedicated distro name (`openserverless-build`) instead of one a
     developer is likely using. Image and distro name are now separate settings
     (`WSL_IMAGE` / `WSL_DISTRO`), via `wsl --install -d <image> --name <distro>`.
   - Write an ownership marker during provisioning; refuse to unregister a distro
     that lacks it without a typed confirmation. `-Force` skips the prompt for CI.
   - Pin the image to `Ubuntu-24.04` (the bare `Ubuntu` alias tracks latest LTS).
   
   Also fixes Docker never actually installing inside the distro: WSL appends the
   Windows PATH, so `command -v docker` matched Docker Desktop's `docker.exe` and
   the install was skipped. Now strips `/mnt/*` from PATH, sets
   `appendWindowsPath=false`, downloads the installer to a file instead of
   `curl | sh`, enables the docker service, and waits for the daemon.
   
   ## Testing
   
   Ran `.\build-and-test-windows.ps1` to completion on Windows 11 / WSL 2.6.3:
   all build-and-test scripts reported SUCCESS. Ownership-guard logic verified
   against real distros (correctly refuses `Ubuntu`, rebuilds the marked distro).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Stop the Windows build driver destroying the user's WSL distribution [openserverless]

Posted by "sciabarracom (via GitHub)" <gi...@apache.org>.
sciabarracom closed pull request #212: Stop the Windows build driver destroying the user's WSL distribution
URL: https://github.com/apache/openserverless/pull/212


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Stop the Windows build driver destroying the user's WSL distribution [openserverless]

Posted by "sciabarracom (via GitHub)" <gi...@apache.org>.
sciabarracom commented on PR #212:
URL: https://github.com/apache/openserverless/pull/212#issuecomment-5345593809

   I understand ... but how this is supposed to work? What this patch does?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Stop the Windows build driver destroying the user's WSL distribution [openserverless]

Posted by "sciabarracom (via GitHub)" <gi...@apache.org>.
sciabarracom commented on PR #212:
URL: https://github.com/apache/openserverless/pull/212#issuecomment-5525205072

   cleaned in the new build


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@openserverless.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org