Repository navigation
Let the telemetry check of the web app and API Management samples run on Windows - #159
Merged
paolosalvatori merged 1 commit intoDec 4, 2026
Conversation
… on Windows In Git Bash, curl is a Windows program, and MSYS_NO_PATHCONV=1, which the README asks Windows users to set, keeps Git Bash from converting the /tmp/... path that mktemp returns, so curl could not open the files query-telemetry.sh gave it. The .NET web apps answered 400 to every new activity, whose post arrived without the antiforgery cookie curl had failed to save, and the API Management script read status 000 from a curl that could not open its --dump-header file. The 15 query-telemetry.sh scripts that hand curl a temporary file now convert its path with native_path, the cygpath -m function validate.sh and call-api.sh already use; on Linux and macOS the path is unchanged. Fixes SMF-1296 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FvNuJJKcAASYSAqWH2cusA
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the Windows temporary-file path handling changes.
No open issues 🎉
What changed in this PR
Fixes Windows temporary-file handling in the telemetry checks introduced by #154, allowing curl to access cookie and response-header files when MSYS_NO_PATHCONV=1.
Changes:
- Adds
native_pathusingcygpath -mwhen available, leaving paths unchanged otherwise. - Converts curl’s cookie-file paths in 14 web app scripts and its header-file path in the API Management script.
| File | Description |
|---|---|
| samples/web-app-sql-database/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-sql-database/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-postgresql-flexible-server/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-postgresql-flexible-server/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-mysql-flexible-server/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-mysql-flexible-server/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-managed-identity/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-managed-identity/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-cosmosdb-nosql-api/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-cosmosdb-nosql-api/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-cosmosdb-mongodb-api/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-cosmosdb-mongodb-api/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-app-configuration/python/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/web-app-app-configuration/dotnet/scripts/query-telemetry.sh | Converts curl cookie-file paths. |
| samples/api-management-function-app/python/scripts/query-telemetry.sh | Converts curl’s response-header file path. |
Review effort: Balanced
paolosalvatori
deleted the
smf-1296-samples-the-telemetry-check-fails-on-windows-for
branch
December 4, 2026 10:52
This branch was previously deployed
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
In Samples CI run 47263761045, the first Windows run since #154, 28 of the 99 Windows jobs failed; all 136 Linux jobs passed.
26 of them failed in the
query-telemetry.shscripts, which hand curl a temporary file made withmktemp. In Git Bash, curl is a Windows program, andMSYS_NO_PATHCONV=1, which the README asks Windows users to set, keeps Git Bash from converting the/tmp/...path, so curl cannot open it:web-app-*/dotnetjobs. curl could not save the antiforgery cookie of the app's form, so the post that adds an activity arrived without it, and ASP.NET Core answered 400 to all 30 attempts. The Python apps check no such token, so they passed.api-management-function-app/pythonjobs. curl could not open the--dump-headerfile and gave up before sending the request, so the script read status000.The other 2,
servicebus/java/scriptsandcontainer-apps-blob-storage/python/scriptswithMANAGED_IDENTITY_TYPE=UserAssigned, never ran a sample. Their runner stopped answering while WSL 2 was being set up, a hypervisor fault GitHub reproduced on Windows Server 2025 runners (actions/runner-images#14938). A re-run lands on another VM.Fixes SMF-1296
Changes
query-telemetry.shscripts that hand curl a temporary file, in the 14 web app samples (.NET and Python) and in API Management, convert its path withnative_path, thecygpath -mfunctionvalidate.shandcall-api.shalready use. On Linux and macOS, which have nocygpath, the path is unchanged.Tests
MSYS_NO_PATHCONV=1. Thepost_activityandcall_apifunctions of all 15 scripts ran against a local server that requires the antiforgery cookie and, like the gateway, answers 429 withRetry-Afterbefore 200. Before the change, every post got 400 and the gateway call000. After it, every post got 302 with the cookie, and the gateway call got 429, waited, then 200.function-app-storage-http/python/scripts, lost its runner while WSL 2 was being set up (actions/runner-images#14938) and passed when re-run.query-telemetry.sh, run from Windows Git Bash withMSYS_NO_PATHCONV=1and the Windows Azure CLI, passed in all 15.Related
query-telemetry.shscripts.🤖 Generated with Claude Code
https://claude.ai/code/session_01FvNuJJKcAASYSAqWH2cusA