Skip to content

Fix CodeQL flag scope across pipeline templates - #10856

Merged
akoeplinger merged 1 commit into
mainfrom
akoeplinger-codeql-build-settings-followup
Nov 10, 2026
Merged

akoeplinger merged 1 commit into
mainfrom
akoeplinger-codeql-build-settings-followup

Conversation

@akoeplinger

@akoeplinger akoeplinger commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #10854. In build 3131515, the root isCodeqlActive variable 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.TeamProject are 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 isCodeqlActive explicitly 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.

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]>
@akoeplinger
akoeplinger requested review from a team as code owners November 10, 2026 10:50
Copilot AI balanced review requested due to automatic review settings November 10, 2026 10:50
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 isCodeqlActive from 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

@akoeplinger
akoeplinger merged commit 18d9842 into main Nov 10, 2026
3 of 11 checks passed
@akoeplinger
akoeplinger deleted the akoeplinger-codeql-build-settings-followup branch November 10, 2026 11:12
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.

3 participants