ci: fix CodeQL Python analysis failure — upgrade to v4 and set explicit source-root#2535
Merged
BrendanWalsh merged 1 commit intomasterfrom Mar 31, 2026
Merged
Conversation
… explicit source-root
The 'Analyze (python)' job fails during the pre-finalize step with:
A fatal error occurred: Invalid working directory:
/home/runner/work/SynapseML/SynapseML
The runner's actual checkout path is
/home/runner/work/microsoft-SynapseML/microsoft-SynapseML (reflecting
the repo's internal name), but CodeQL v3's pre-finalize script derives
the source root from the old directory name.
Changes:
- Upgrade github/codeql-action from v3 to v4 (also resolves the
Node.js 20 deprecation warning on runners)
- Explicitly set source-root to ${{ github.workspace }} so CodeQL
uses the correct checkout path regardless of directory naming
|
Hey @BrendanWalsh 👋! We use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
To test your commit locally, please follow our guild on building from source. |
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issues.github/workflows/codeql.yml
OpenSSF Scorecard
Scanned Files
|
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.
Problem
The Analyze (python) CodeQL job fails during the pre-finalize step:
The runner's actual checkout path is
/home/runner/work/microsoft-SynapseML/microsoft-SynapseML(reflecting the repo's internal directory name), but CodeQL v3's pre-finalize script derives the source root from the old path — causing a mismatch.The JavaScript analysis is unaffected because the JS extractor doesn't use the same pre-finalize script.
Fix
Upgrade
github/codeql-actionfromv3→v4— v4 has improved path resolution and also addresses the Node.js 20 deprecation warning that appears on every run.Explicitly set
source-root: \${{ github.workspace }}in the init step — ensures CodeQL uses the correct checkout path regardless of how the runner names the working directory.Evidence
The failure occurs when the runner assigns the
microsoft-SynapseMLdirectory name, which is becoming more common.