Repository navigation
Run all samples on a Windows runner from Git Bash - #48
Draft
paolosalvatori wants to merge 10 commits into
Draft
paolosalvatori wants to merge 10 commits into
paolosalvatori wants to merge 10 commits into
Conversation
A manual run with the new windows input, instead of the Linux matrix, creates the AKS cluster, then deploys and tests the Cosmos DB and Blob Storage samples on windows-latest from Git Bash, with MSYS_NO_PATHCONV=1 set as the README asks Windows users to do. The emulator is a Linux image and Docker on the Windows runner runs Windows containers, so the job runs it in Docker Engine inside an Ubuntu WSL 2 distribution, which the Windows docker CLI, lstk and kubectl reach over ports WSL forwards to localhost. yq, which the runner image lacks, comes from a pinned release checked against its SHA-256. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
This was referenced Oct 23, 2026
…ged one
Installing docker.io in the WSL distribution already starts a Docker daemon on the Unix socket alone, so the daemon the job started with TCP port 2375 exited at once ("process with PID 1063 is still running"), the readiness check passed against the packaged daemon, and the Windows docker CLI found nothing on the port.
The step now stops the packaged daemon (its systemd units, or its PID file without systemd), starts its own, and waits on the TCP endpoint.
The Docker Engine log step runs only once WSL is set up, since its wsl-bash shell does not exist before that.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
The Windows job takes its matrix from the setup job, which on a manual run with the windows input selects every app, and the Linux matrix stays out of that run. It now provides what the remaining apps need, as the Linux job does: sqlcmd for the Azure SQL Database sample (the Go sqlcmd release, pinned with its SHA-256) and the answers to the Azure Files sample's provisioning menus; on failure it prints the same cluster state. lstk 1.4.0 cannot register its Azure CLI cloud on Windows when the CLI sits under C:\Program Files: cmd.exe cuts the command line that carries the cloud configuration's JSON at that space. A junction without spaces, first on the PATH, works around it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Missing PostgreSQL client setup and incompatible curl output handling prevent the Windows matrix from completing its intended checks.
2 open issues
What changed in this PR
Adds on-demand Windows coverage for the AKS samples, exercising deployment and end-to-end checks from Git Bash alongside the existing Linux workflow.
Changes:
- Adds a manual
windowsinput that selects every sample and skips the Linux matrix. - Runs the emulator through Docker Engine in WSL 2, with Windows-side tooling and an Azure CLI path workaround.
- Reuses cluster creation, sample deployment, tests, and failure diagnostics on Windows.
| File | Description |
|---|---|
.github/workflows/samples.yml |
Adds Windows job selection, environment setup, and sample validation. |
Review effort: Balanced
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
The PostgreSQL and App Configuration samples seed their databases with psql; the Windows runner image installs PostgreSQL with psql off the PATH, where the Linux runner image has the client on it, so five apps stopped with "psql is not installed on the host". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
…the README asks The README asks Windows users for set -o igncr and export SHELLOPTS. Exporting SHELLOPTS in a step would also hand the step's own -e and pipefail to the sample scripts, so the job turns the option on for every bash through BASH_ENV instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
With DNS tunneling, on by default, the containers of the Docker Engine in WSL could not reach the 10.255.255.254 resolver WSL configures, so their lookups timed out: the Docker Engine log held dozens of "failed to query external DNS server" errors, and the Container Apps runtime could not pull the sample's image (ImagePullBackOff). Without tunneling, WSL hands out the NAT device on the host as the DNS server, which containers reach too (https://learn.microsoft.com/windows/wsl/troubleshooting#common-issues). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
#47 asks Windows users of Git Bash and MSYS2 to export
MSYS_NO_PATHCONV=1and adapts the scripts to it, but the samples workflow runs only on Linux, so nothing checks that the scripts work from Git Bash.This adds a Windows job that runs every app there end to end, on demand, as a reproduction of that setup.
It is stacked on #47 and will be retargeted to
mainonce that pull request merges.Fixes SMF-981
Changes
windowsinput of the manual run starts the newwindowsjob instead of the Linux matrix. The setup job then selects every app, whateverrun_modesays.windows-latestand uses Git Bash, the defaultbashshell of Windows runners, withMSYS_NO_PATHCONV=1set as the README asks. For each app it creates the AKS cluster withscripts/01-system-assigned-managed-identity.sh, deploys the app with its numbered scripts and checks it withtests/test-vacation-planner.sh, as the Linux job does, with the same answers to the Azure Files sample's menus and the same cluster state on failure.Vampire/setup-wsl) and runs the emulator there withdocker run. The Windows docker CLI,lstkandkubectlreach it through ports WSL forwards to the runner's localhost. Installingdocker.ioalready starts a daemon on the Unix socket alone, so the job stops it and starts one that also listens on TCP, and waits on the TCP endpoint.set -o igncr), turned on for every bash throughBASH_ENV, since exportingSHELLOPTSin a step would hand the step's own-eandpipefailto the sample scripts.lstk1.4.0 cannot register its Azure CLI cloud on Windows when the CLI sits underC:\Program Files: it passes the cloud configuration's JSON toaz.cmd, andcmd.executs that command line at the space ('C:\Program' is not recognized). A junction without spaces, first on the PATH, works around it untillstkpasses the JSON another way.yq, which the Windows runner image lacks, comes from a pinned release checked against its SHA-256, and the Azure SQL Database app gets the Gosqlcmdrelease, pinned the same way.psql, which the image installs off the PATH, goes on it for the PostgreSQL and App Configuration apps.Tests
actionlintwithshellcheckon the workflow and on each bash step, and the repository's pre-commit hooks (zizmor,gitleaks).lstkcloud registration above.psqloff the PATH (fixed here) and curl's-o /dev/null, which stopped the end-to-end test with exit code 23 (fixed in Run the scripts from Git Bash and MSYS2 on Windows #47).Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01DhZ2ojsEXd2SGMo7s9uiZh