Check OneLocReleaseBranch at runtime instead of compile-time#7159
Merged
donnie-msft merged 6 commits intodevfrom Feb 20, 2026
Merged
Check OneLocReleaseBranch at runtime instead of compile-time#7159donnie-msft merged 6 commits intodevfrom
donnie-msft merged 6 commits intodevfrom
Conversation
donnie-msft
commented
Feb 20, 2026
jebriede
previously approved these changes
Feb 20, 2026
nkolev92
reviewed
Feb 20, 2026
Nigusu-Allehu
approved these changes
Feb 20, 2026
donnie-msft
added a commit
that referenced
this pull request
Feb 20, 2026
3 tasks
donnie-msft
added a commit
that referenced
this pull request
Feb 21, 2026
3 tasks
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.
Bug
Fixes: https://github.com/NuGet/Client.Engineering/issues/3647
Description
A recent change made to our loc process was to only run for
devand a release branch designated in theOneLocReleaseBranchpipeline variable.However, the YAML condition was written as a template expression, meaning runtime variables are not yet loaded by the ADO job. Therefore, the condition evaluated to false and did not pass
RunOneLocBuild.I've moved the check to the pipeline.yml with a runtime condition.
TryRunOneLocBuild: trueto inject the stage at compile-time, and then the stage itself will condition on the branches at runtime.This way, PR builds don't see the stage at all (just to waste time evaluating the branch name and ultimately skipping running OneLoc on PR builds).
Build.SourceBranchto theOneLocReleaseBranchand tries trimmingrefs/heads/in case someone puts that in the build variable at some point which would result in a localization issue otherwise.Tested by switching the variable to one of my branches and running to ensure it can read the ADO variable: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13359377&view=results
Will need cherry-pick to release-7.3.x.
PR Checklist
Added testsLink to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.