Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions eng/common/pipelines/templates/steps/docs-metadata-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ parameters:
CloseAfterOpenForTesting: false

steps:
- pwsh: |
if ($IsWindows) {
REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /f /v LongPathsEnabled /t REG_DWORD /d 1
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a big fan of manually enabling long path on windows as it is pretty unreliable for general usage. Is there any way to fix the paths such that we don't hit the long file paths? If not then is there a way to make this template only run on non-windows?

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't run on developer workstations so I think the blast radius of this change is contained. Enabling this flag in Windows is probably less painful then having someone stand up a Linux machine if they need to debug/test manually.

Copy link
Member Author

@scbedd scbedd Dec 10, 2020

Choose a reason for hiding this comment

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

Exactly this. The reason I'm submitting this PR is to make certain that nobody hits it in the future. One possible solution definitely would be to swap the Java build phase to use ubuntu.

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with this as a stop gap. Do we know if there is anyway to stop the long path files from being created to begin with?

git config --system core.longpaths true
}
else {
Write-Host "This script is not executing on Windows, skipping registry modification."
}
displayName: Enable Long Paths if Necessary

- pwsh: |
git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo

Expand Down