Skip to content

Remove OneLoc PAT dependencies - #17455

Open
missymessa wants to merge 6 commits into
dotnet:mainfrom
missymessa:missymessa/oneloc-pat-fallback-cleanup
Open

Remove OneLoc PAT dependencies#17455
missymessa wants to merge 6 commits into
dotnet:mainfrom
missymessa:missymessa/oneloc-pat-fallback-cleanup

Conversation

@missymessa

@missymessa missymessa commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • remove the OneLocBuildVariables variable group and its Ceapex and GitHub PAT dependencies
  • require short-lived Ceapex WIF and GitHub App tokens instead of preserving PAT fallback paths
  • support OneLocBuild in the provisioned dnceng/internal and DevDiv/DevDiv projects
  • update the OneLoc authentication documentation

Tracks AB#10151 and AB#12331.

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
@missymessa
missymessa requested review from mmitche and a lite review from Copilot August 31, 2026 16:11

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

Pull request overview

This PR updates the OneLocBuild job template to avoid attaching the OneLocBuildVariables variable group (and thereby hydrating legacy PAT secrets) when the pipeline configuration will use the newer Ceapex WIF/Entra token and/or GitHub App authentication paths instead of PAT fallback.

Changes:

  • Conditioned inclusion of the OneLocBuildVariables variable group so it’s only imported when Ceapex PAT fallback and/or GitHub PAT fallback may be used.
  • Preserved existing fallback behavior for scenarios that still require legacy PAT-based auth.
File summaries
File Description
eng/common/core-templates/job/onelocbuild.yml Conditionally imports the OneLoc variable group to avoid downloading unused legacy PAT secrets when modern auth paths are selected.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread eng/common/core-templates/job/onelocbuild.yml Outdated
@missymessa
missymessa enabled auto-merge (squash) September 1, 2026 13:31
Copilot AI review requested due to automatic review settings September 1, 2026 13:32

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

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Comment thread eng/common/core-templates/job/onelocbuild.yml Outdated
@missymessa

Copy link
Copy Markdown
Member Author

Simplified the condition in commit 6fac367f6. The variable group is needed in exactly three template-selected cases: (1) projects outside internal/DevDiv, where Ceapex still selects CeapexPat; (2) an explicit empty CeapexServiceConnection; or (3) a GitHub job with UseGitHubAppAuthentication disabled. The prior external-project GitHub clause was redundant because case 1 already imports the group. I also replaced the paired project comparisons with notIn(...). The simplified condition is truth-table equivalent to the previous expression across all 48 combinations. I'll hold the release backports until main is resolved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: bc4e1c74-f3b4-4965-932e-5e63cff7e877
@missymessa

Copy link
Copy Markdown
Member Author

Push completed after rebasing onto the latest PR branch; the simplification is now commit e50fb29.

Copilot AI review requested due to automatic review settings September 3, 2026 18:42

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.

🟡 Changes recommended

The new condition uses notIn() in a ${{ if }} template expression, which is not supported and is likely to break template expansion.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread eng/common/core-templates/job/onelocbuild.yml Outdated
Copilot AI review requested due to automatic review settings September 3, 2026 19:36

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

The change is a small, syntactically-correct YAML template adjustment that aligns with existing conditional auth selection logic and reduces unnecessary secret hydration without changing the selected auth paths.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@missymessa
missymessa requested a review from mmitche September 3, 2026 19:43
@missymessa

Copy link
Copy Markdown
Member Author

@mmitche please take a look!

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 19:58

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.

🟡 Changes recommended

The implementation removes opt-out/legacy fallback behaviors that the PR description still claims are preserved, and the docs should explicitly call out the newly enforced supported-project restriction.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread eng/common/core-templates/job/onelocbuild.yml
Comment thread Documentation/OneLocBuild.md Outdated
@missymessa missymessa changed the title Avoid downloading unused OneLoc PATs Remove OneLoc PAT dependencies Sep 3, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 20:06

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

The changes consistently remove PAT fallback paths, add clear enforcement for supported projects and required WIF inputs, and update documentation to match the new behavior.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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