Skip to content

Switch Windows to containers running in WSL - #38

Merged
danielmarbach merged 9 commits into
mainfrom
wsl
Jul 31, 2026
Merged

Switch Windows to containers running in WSL#38
danielmarbach merged 9 commits into
mainfrom
wsl

Conversation

@danielmarbach

@danielmarbach danielmarbach commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

This pull request significantly refactors the action to remove all dependencies on Azure Container Instances for Windows runners. Instead, it now runs PostgreSQL inside a WSL2-based Docker container on Windows runners, aligning the approach with Linux runners and simplifying the setup and cleanup processes. The documentation and input parameters have been updated to reflect these architectural changes.

Major architectural changes:

  • Replaced the use of Azure Container Instances on Windows runners with WSL2-based Docker containers. The scripts now install and manage Docker inside a WSL2 distribution, launch the PostgreSQL container there, and ensure the WSL instance remains alive for the duration of the job. (Ffa4187eL15R15, cleanup.ps1L15-R17)
  • Removed all Azure login and resource group management steps from the workflow, scripts, and documentation. [1] [2] [3] [4]

Input and interface changes:

  • Removed the tag input parameter from the action (action.yml, index.js, setup.ps1, and related workflow/example usages). The action interface is now simpler, and the documentation has been updated to indicate that only the connection string name is required. [1] [2] [3] [4] [5] [6] [7]

Documentation and usage updates:

  • Updated the README.md to clarify that on Windows runners, PostgreSQL runs inside WSL2 and no Azure resources are needed. Simplified setup and cleanup instructions, and removed references to Azure-specific environment variables and steps. [1] [2] [3] [4]

Script and reliability improvements:

  • Added logic to automatically install and configure WSL2 distributions, constrain VM resources, and keep the WSL instance alive using a D-Bus session. Improved error handling and output for these steps. (Ffa4187eL15R15)
  • Changed the PostgreSQL connectivity check to use a version-agnostic SELECT 1 query instead of --list, improving compatibility with different server/client versions.

These changes make the action easier to use, more consistent across operating systems, and remove the requirement for Azure access on Windows runners.

@danielmarbach danielmarbach changed the title Try WSL with linux containers Switch Windows to containers running in WSL Jul 28, 2026
@danielmarbach
danielmarbach marked this pull request as ready for review July 28, 2026 20:03
Comment thread modules/WslTools/WslTools.psd1 Outdated
Comment thread modules/WslTools/WslTools.psd1 Outdated
Comment thread modules/WslTools/WslTools.psd1 Outdated
Comment thread modules/WslTools/WslTools.psd1 Outdated
Co-authored-by: Daniel Marbach <daniel.marbach@openplace.net>
@danielmarbach
danielmarbach merged commit 7db603a into main Jul 31, 2026
5 checks passed
@danielmarbach
danielmarbach deleted the wsl branch July 31, 2026 09:02
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.

2 participants