Repository navigation
Fix CodeQL flag scope across pipeline templates - #10856
Merged
Merged
Conversation
Pass the CodeQL flag explicitly through stage and job template parameters so CodeQL builds use the intended timeouts and skip tests, validation, and final asset publishing. Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the CodeQL parameter propagation changes.
No open issues 🎉
What changed in this PR
This follow-up to #10854 replaces the root CodeQL variable with an explicit boolean parameter passed through the VMR pipeline templates, making CodeQL-specific settings available during template expansion.
Changes:
- Passes
isCodeqlActivefrom the official pipeline through stage and job templates. - Uses the parameter to select longer CodeQL timeouts and skip tests, validation stages, and final asset publishing.
- Leaves non-CodeQL defaults, intermediate artifacts, and diagnostic logging unchanged.
| File | Description |
|---|---|
eng/pipelines/templates/stages/vmr-verticals.yml |
Forwards the CodeQL flag to build jobs and uses it for build tagging. |
eng/pipelines/templates/stages/vmr-build.yml |
Propagates the flag and gates publishing and validation stages. |
eng/pipelines/templates/stages/source-build-stages.yml |
Forwards the flag to source-build stages. |
eng/pipelines/templates/stages/source-build-and-validate.yml |
Passes the flag to build jobs and gates source-only validation. |
eng/pipelines/templates/jobs/vmr-build.yml |
Uses the flag for timeouts, test execution, and test-result collection and publishing. |
eng/pipelines/official.yml |
Computes CodeQL activation directly at the stage-template call. |
Review effort: Balanced
ViktorHofer
approved these changes
Nov 10, 2026
This was referenced Nov 11, 2026
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.
Follow-up to #10854. In build 3131515, the root
isCodeqlActivevariable was not visible where nested templates evaluated their compile-time conditions, so CodeQL builds kept the normal timeouts, tests, and validation/publishing stages.This is a template-expansion scope issue, not a blanket restriction on variables in template expressions. Predefined variables such as
System.TeamProjectare explicitly available in templates. The template-expression context documentation describes YAML-defined and predefined variables, but does not clearly document this nested-template edge case; Azure's server-side YAML preview reproduced the missing flag in our template hierarchy.Pass
isCodeqlActiveexplicitly as a boolean parameter through the stage and job templates so the CodeQL-specific timeouts and stage/test exclusions take effect, while preserving intermediate artifacts and diagnostic logs.