Skip to content

Enable OneLoc GitHub App authentication by default - #17258

Merged
missymessa merged 1 commit into
dotnet:mainfrom
missymessa:missymessa/oneloc-github-app-default
Aug 5, 2026
Merged

missymessa merged 1 commit into
dotnet:mainfrom
missymessa:missymessa/oneloc-github-app-default

Conversation

@missymessa

Copy link
Copy Markdown
Member

Summary

  • Enable the GitHub App installation-token path from Add GitHub App installation-token auth for OneLocBuild #17219 by default for dnceng/internal GitHub OneLoc builds.
  • Preserve UseGitHubAppAuthentication: false as an explicit temporary opt-out to the existing PAT path.
  • Update the OneLoc documentation and clearly state that App token minting or authentication failures do not automatically retry with the PAT.

Behavior

The App path remains limited to RepoType: gitHub builds in the internal Azure DevOps project. DevDiv and public builds continue selecting the PAT path.

There is no runtime PAT fallback after the App path is selected. A token-minting or App authorization failure fails the job; pipelines can explicitly set UseGitHubAppAuthentication: false if they need to select the PAT path during migration.

Follow-up to #17219.

Use the centralized dnceng GitHub App path by default for internal GitHub OneLoc builds while preserving explicit opt-out to the PAT path. Document that runtime App failures do not automatically fall back to the PAT.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 8d5c9824-be94-4260-a72c-605d0ce1294d
Copilot AI review requested due to automatic review settings August 5, 2026 20:41

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.

Pull request overview

This PR switches the OneLocBuild template to prefer GitHub App installation-token authentication by default for dnceng/internal GitHub-based localization check-in PRs, while keeping an explicit opt-out to the existing classic PAT path. It updates the OneLocBuild documentation to reflect the default behavior and clarify that failures in the App path do not automatically fall back to PAT.

Changes:

  • Default UseGitHubAppAuthentication to true in the core OneLocBuild job template (effective for dnceng/internal + RepoType: gitHub).
  • Update GitHub App authentication documentation to describe the new default and the explicit opt-out (UseGitHubAppAuthentication: false).
  • Clarify in docs that App token mint/auth failures fail the job (no automatic PAT retry).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
eng/common/core-templates/job/onelocbuild.yml Enables GitHub App auth path by default via template parameter default change.
Documentation/OneLocBuildGitHubApp.md Updates guidance from opt-in to default behavior and documents no PAT retry on App-path failure.
Documentation/OneLocBuild.md Updates parameter table to reflect the new default and opt-out behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@missymessa
missymessa requested a review from mmitche August 5, 2026 21:22
@missymessa

Copy link
Copy Markdown
Member Author

The GitHub App identity triggers license/cla because the PR actor is dotnet-oneloc-localization[bot], which is not yet preapproved or included in the .NET CLA bypass list. Opened both required policy changes:

The default-authentication change should wait for both exemptions to merge and for the CLA check to be rerun successfully on the test PR.

-- GitHub Copilot CLI (posted on behalf of @missymessa)

@agocke

agocke commented Aug 24, 2026

Copy link
Copy Markdown
Member

Looks like  dotnet OneLoc Localization  installation lacks effective Contents: write and Pull requests: write permissions, causing rolling builds to fail. @missymessa how do I enable that?

@missymessa

Copy link
Copy Markdown
Member Author

Root cause identified: the App permissions and dotnet/runtime repository selection are correct. After the App gained a second organization installation (microsoft plus dotnet), Get-GitHubAppToken.ps1 retained GitHub's installation response as one nested array. Filtering for dotnet therefore kept both records and token minting selected the first (microsoft) installation. Public reads of dotnet/runtime succeeded, but PR writes failed with 403 Resource not accessible by integration in every rolling build.

Fix: #17402

Validated against the live installations: the corrected logic selects only the dotnet installation (149883392), and its token successfully performed the same PR update that OneLoc was failing.

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.

4 participants