Skip to content

Remove OneLoc PAT dependencies - #17455

Merged
missymessa merged 6 commits into
dotnet:mainfrom
missymessa:missymessa/oneloc-pat-fallback-cleanup
Sep 8, 2026
Merged

missymessa merged 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 <[email protected]>

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.

@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

@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 <[email protected]>

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

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!

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 Documentation/OneLocBuild.md Resolved
@missymessa missymessa changed the title Avoid downloading unused OneLoc PATs Remove OneLoc PAT dependencies Sep 3, 2026
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

@mmitche mmitche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you also need a release/11.0 backport

@missymessa
missymessa merged commit b3efecc into dotnet:main Sep 8, 2026
12 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 9, 2026
kubaflo added a commit to dotnet/maui that referenced this pull request Sep 23, 2026
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

## Description

Updates only `Microsoft.DotNet.Arcade.Sdk` from `10.0.0-beta.26454.107`
to `10.0.0-beta.26461.103` using dotnet/dotnet BAR build `331699`
(`20260911.3`) so MAUI's generated Arcade common files include the
completed OneLoc credential migration.

The generated `eng/common/core-templates/job/onelocbuild.yml`:
- removes the unused `GithubPat` / `BotAccount-dotnet-bot-repo-PAT`
fallback;
- removes the `OneLocBuildVariables` variable-group reference;
- requires the project-scoped Ceapex WIF service connection; and
- retains short-lived GitHub App authentication for localization PRs.

This deliberately does **not** update the .NET SDK, runtime, `10.0.13`
libraries, Helix SDK, or other toolsets. Those remain at the versions
currently on `main`, preserving the availability fix from #38732. This
is generated dependency-flow content; `eng/common` was not edited
directly.

## Validation

- `darc update-dependencies --id 331699 --name
Microsoft.DotNet.Arcade.Sdk --dry-run`
- Confirmed no `GithubPat`, `BotAccount-dotnet-bot-repo-PAT`, or
`OneLocBuildVariables` references remain under MAUI build configuration.
- Preserved the existing `darc-pub-dotnet-dotnet-11741c8` source
required by the unchanged `10.0.113` SDK; its feed contains
`Microsoft.NET.ILLink.Tasks 10.0.13`. The filtered Darc update otherwise
removed this still-required source.
- Confirmed the net PR diff leaves `Microsoft.NET.Sdk`, runtime/library
packages, Helix, and other toolsets unchanged.
- `git diff --check`
- Reviewed the complete narrowed diff for correctness.
- `darc verify` reports the same three pre-existing failures on clean
`main`: duplicate `TizenUIExtensions`, duplicate `XUnitAnalyzers`, and
the existing XHarness casing mismatch.

## Tracking

-
[AB#12313](https://dev.azure.com/dnceng/internal/_workitems/edit/12313)
- Source Arcade change: dotnet/arcade#17455
- Source dotnet/dotnet integration:
dotnet/dotnet@bb8cc76

Co-authored-by: Jakub Florkowski <[email protected]>
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