Repository navigation
Fix OneLoc v3 builds from Azure Repos mirrors - #17711
missymessa wants to merge 3 commits into
Conversation
Keep the Azure Repos checkout intact and run localization from the identical GitHub commit so OneLoc v3 selects the correct API host. Co-authored-by: Copilot <[email protected]> Copilot-Session: 062e4ad2-9169-47fb-8e49-a38ee214f96f
Build.Repository.Provider is not populated while the internal template expands; MirrorRepo and RepoType already explicitly identify GitHub mirror usage. Co-authored-by: Copilot <[email protected]> Copilot-Session: 062e4ad2-9169-47fb-8e49-a38ee214f96f
There was a problem hiding this comment.
🔵 Needs a closer look
End-to-end mirror validation remains pending, and the shared-template change still requires human confirmation.
No open issues 🎉
What changed in this PR
Fixes OneLoc v3 host selection for Azure Repos mirrors by using a separate GitHub checkout without modifying the original checkout.
Changes:
- Fetches the exact source commit using temporary GitHub App authentication.
- Routes localization generation, OneLoc inputs, and artifact collection through the selected checkout.
- Documents mirror commit availability and access requirements.
| File | Description |
|---|---|
| eng/common/core-templates/job/onelocbuild.yml | Adds isolated GitHub checkout and consistent localization paths. |
| Documentation/OneLocBuild.md | Documents mirror checkout behavior and prerequisites. |
Review effort: Balanced
The v3 LCL copy code uses Windows extended-length paths and fails on a repoRoot containing forward slashes. Keep the temporary checkout and task paths Windows-native. Co-authored-by: Copilot <[email protected]> Copilot-Session: 062e4ad2-9169-47fb-8e49-a38ee214f96f
mmitche
left a comment
There was a problem hiding this comment.
This looks like a bug on their side. The build appears to detect that this is github enterprise URI (https://dev.azure.com/dnceng/internal/_build/results?buildId=3109852&view=logs&j=6aa31087-d1b8-5ee1-af29-f0fe63353381&t=f5f0ecb8-e09a-5b29-99cb-311e048f2c1c&l=253), which isn't the case. In this case, it's not GHE, (it's github public). and the URI it detected as GHE is also an azdo URI.
https://dev.azure.com/api/v3
Why
Follow-up to #17706. Official Arcade CI failed OneLoc v3 initialization because the Azure Repos origin was interpreted as a GitHub Enterprise host (
https://dev.azure.com/api/v3): build 3109852.Tracking: dnceng/internal 13198.
Change
When
RepoType: gitHubandMirrorRepois configured, create a separate GitHub checkout pinned to the exact source commit. Authenticate the fetch using the existing short-lived GitHub App token without persisting it in Git configuration. Keep the Azure Repos checkout untouched. Route project generation, OneLoc's supportedrepoRoot/locProjinputs, and artifact collection to the same directory.Direct-GitHub consumers without
MirrorRepoand Azure DevOps-native consumers keep their existing checkout. Mirror commits must exist on GitHub; fetching the exact commit fails explicitly rather than substituting a moving branch tip. No new service connections or permission grants.Validation
7adc3d21.915ce3a178a70d8abe9e6a2604978eff7e718e62. The authenticated checkout preserved that exact commit. OneLoc3.1.3572200loggedGit remote URL: https://github.com/dotnet/arcade.gitandUsing public GitHub (github.com), completed initialization, and succeeded; mandatory SDL checks also passed. The isolated run had no product signing/publishing/promotion/deployment and targeted localization PRs only at its validation branch.0 resource files/No localized files to check-in. This verifies the failing mirror initialization and source-root integration, not a new branch/push/compare/PR lifecycle test.680d85e4a000befb334a25ddbd7068c01f32875dhas PR head7adc3d21ef16a10e367f331f6aae42d9b451e9ecas a parent. The separate Build Insights check is still processing; human review is still required.Runtime mirror initialization is now verified. Main publication and
.NET Eng - Latestavailability still require merging the fix and a successful subsequent official main build. PR readiness and reviewer assignment have been left unchanged.