Repository navigation
Enable OneLoc GitHub App authentication by default - #17258
Conversation
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
There was a problem hiding this comment.
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
UseGitHubAppAuthenticationtotruein the core OneLocBuild job template (effective fordnceng/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.
|
The GitHub App identity triggers
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) |
|
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? |
|
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. |
Summary
dnceng/internalGitHub OneLoc builds.UseGitHubAppAuthentication: falseas an explicit temporary opt-out to the existing PAT path.Behavior
The App path remains limited to
RepoType: gitHubbuilds in theinternalAzure 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: falseif they need to select the PAT path during migration.Follow-up to #17219.