Skip to content

Fix OneLoc v3 builds from Azure Repos mirrors - #17711

Closed
missymessa wants to merge 3 commits into
mainfrom
users/mjanecke/oneloc-v3-mirror-13198
Closed

missymessa wants to merge 3 commits into
mainfrom
users/mjanecke/oneloc-v3-mirror-13198

Conversation

@missymessa

@missymessa missymessa commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

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: gitHub and MirrorRepo is 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 supported repoRoot/locProj inputs, and artifact collection to the same directory.

Direct-GitHub consumers without MirrorRepo and 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

  • YAML and PowerShell syntax checks passed.
  • Local authenticated checkout preserved the exact commit and original checkout, selected the public GitHub origin, and left no persistent Git authentication header.
  • Actual internal pipeline preview passed for GitHub mirrors, direct GitHub, and Azure DevOps-native template configurations. Only the mirror configuration includes the new checkout.
  • First runtime attempt 3110009 successfully fetched the exact source commit with the existing App token and generated LocProject.json. OneLoc then failed before host initialization because its LCL-copy code rejects a mixed-separator Windows repoRoot. Corrected all new repository paths to Windows-native separators in 7adc3d21.
  • Corrected runtime mirror validation passed: internal official CI 3110046, validation commit 915ce3a178a70d8abe9e6a2604978eff7e718e62. The authenticated checkout preserved that exact commit. OneLoc 3.1.3572200 logged Git remote URL: https://github.com/dotnet/arcade.git and Using 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.
  • Scope limit: Arcade reported 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.
  • Current-head public PR CI 1641308 passed, including Linux/Windows builds and tests, source-build, and Helix monitoring. Its validation merge commit 680d85e4a000befb334a25ddbd7068c01f32875d has PR head 7adc3d21ef16a10e367f331f6aae42d9b451e9ec as 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 - Latest availability still require merging the fix and a successful subsequent official main build. PR readiness and reviewer assignment have been left unchanged.

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
Copilot AI balanced review requested due to automatic review settings October 19, 2026 23:02

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.

🔵 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

@missymessa
missymessa requested a review from mmitche October 19, 2026 23:06
@missymessa
missymessa marked this pull request as ready for review October 19, 2026 23:07
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
Copilot AI balanced review requested due to automatic review settings October 19, 2026 23:20

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.

🔵 Needs a closer look

Corrected mirror runtime validation remains pending, and the shared-template change still awaits human review.

No open issues 🎉

Review effort: Balanced

@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.

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

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