Skip to content

Conversation

Copy link

Copilot AI commented Feb 9, 2026

What This PR Contributes

Tests whether Windows CodeQL test failures are caused by shell/path differences by migrating the Windows workflow from PowerShell/CMD to bash.

  • Workflow shell migration: All run steps in ql-unit-tests-windows.yml now use shell: bash
    • CodeQL CLI setup and installation
    • QL pack installation
    • Node.js and npm verification
    • Test execution
  • CDS compilation: Switched from cds-compilation-for-actions.cmd to cds-compilation-for-actions.sh
  • Error handling improvements:
    • Portable JSON parsing using sed instead of grep -P
    • Explicit error handling for download/extraction failures
    • Process substitution for reliable variable scoping in loops

Hypothesis

The two failing Windows tests (HandlerParameterOfExposedService.ql and remoteflowsource.ql) expect forward-slash paths (e.g., srv/service1.js) but PowerShell produces backslash paths. Bash normalizes to forward slashes on all platforms.

Trade-offs

Git Bash is available by default on windows-latest runners but not guaranteed on arbitrary Windows systems. This is acceptable for CI/CD purposes.

Future Works

  • If successful, this becomes a temporary workaround until proper Windows path handling is implemented in CodeQL test infrastructure
  • If unsuccessful, investigate CodeQL CLI's path normalization behavior on Windows

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Address feedback by switching to bash scripts for Windows CodeQL tests Test bash shell on Windows for CodeQL query unit tests Feb 9, 2026
Copilot AI requested a review from data-douser February 9, 2026 20:36
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