[release/8.0] Remove OneLoc PAT dependencies - #17458
Conversation
Import the legacy variable group only when the Ceapex or GitHub PAT fallback can be selected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bc4e1c74-f3b4-4965-932e-5e63cff7e877
There was a problem hiding this comment.
🟢 Approval recommended
Pull request overview
Backports the OneLoc legacy-variable-group cleanup to the release/8.0 branch so that secret variable groups containing legacy PATs are only loaded when the pipeline will actually use PAT-based fallbacks, reducing unnecessary secret downloads.
Changes:
- Conditionally attach the
OneLocBuildVariablesvariable group only when Ceapex PAT fallback or GitHub PAT fallback may be used. - Apply the same conditional behavior to both the regular and “official” OneLocBuild job templates.
File summaries
| File | Description |
|---|---|
| eng/common/templates/job/onelocbuild.yml | Adds a conditional variable-group include to avoid downloading legacy PAT secrets unless a PAT fallback path is selected. |
| eng/common/templates-official/job/onelocbuild.yml | Mirrors the same conditional variable-group behavior for official templates. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@mmitche please take a lookt! |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new template “validation” uses an invalid-looking notIn(...)/'<message>': error pattern that is likely to break Azure Pipelines YAML compilation rather than producing a controlled failure.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Lite
| - ${{ if notIn(variables['System.TeamProject'], 'internal', 'DevDiv') }}: | ||
| - 'OneLocBuild is supported only in dnceng/internal and DevDiv/DevDiv.': error | ||
| - ${{ if eq(parameters.CeapexServiceConnection, '') }}: | ||
| - 'CeapexServiceConnection must identify a WIF service connection.': error |
| - ${{ if notIn(variables['System.TeamProject'], 'internal', 'DevDiv') }}: | ||
| - 'OneLocBuild is supported only in dnceng/internal and DevDiv/DevDiv.': error | ||
| - ${{ if eq(parameters.CeapexServiceConnection, '') }}: | ||
| - 'CeapexServiceConnection must identify a WIF service connection.': error |
| For GitHub repositories built in `dnceng/internal` or `DevDiv/DevDiv`, the template uses a | ||
| short-lived GitHub App installation token for localization check-in by default. The target | ||
| short-lived GitHub App installation token for localization check-in. The target | ||
| repository must be selected in the `dotnet OneLoc Localization` App installation, and the pipeline |
There was a problem hiding this comment.
🔵 Needs a closer look
The new templates use notIn(...) where the repo consistently uses notin(...), which risks Azure Pipelines template evaluation failures and should be made consistent.
Review details
Suppressed comments (2)
eng/common/templates/job/onelocbuild.yml:65
- The template expression uses
notIn(...), but this repo consistently uses the Azure Pipelinesnotin(...)function elsewhere (and in Documentation/OneLocBuild.md examples). Using a different casing/name risks a template evaluation error and is inconsistent with established usage in this repo.
- ${{ if notIn(variables['System.TeamProject'], 'internal', 'DevDiv') }}:
eng/common/templates-official/job/onelocbuild.yml:68
- The template expression uses
notIn(...), but this repo consistently uses the Azure Pipelinesnotin(...)function elsewhere (and in Documentation/OneLocBuild.md examples). Using a different casing/name risks a template evaluation error and is inconsistent with established usage in this repo.
- ${{ if notIn(variables['System.TeamProject'], 'internal', 'DevDiv') }}:
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
Summary
OneLocBuildVariablesvariable group torelease/8.0Backport of the main cleanup for AB#10151 and AB#12331.