-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] I think I am running into PATH length limits or symlink(ntfs links) issues #309
Comments
I have the same issue. Even though operating system supports LongPaths, this task cannot process paths longer that 260 chars. e.g. this piece of github actions reproduces the issue - name: Create directory path longer than 260 characters
shell: pwsh
run: |
# first: check if system supports long paths
$longPathsEnabled = (Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled
if($longPathsEnabled -ne 1 )
{
throw "Long paths are not supported on this operating system: (longPathsEnabledValue:$($longPathsEnabled))"
}
Write-Host "OK: Long paths are supported on this system"
$paths = [System.Collections.Generic.List[string]]::new();
$length = 0;
for($i = 0; $i -le 60; $i++)
{
$dirName = "dir_${i}"
$length += $dirName.Length
$paths.Add($dirName);
if($length -ge 260 ){
break
}
}
$generatedDirs = [string]::Join("/", $paths);
write-host "Generated path length is $($generatedDirs.Length)"
$tempDir = [System.IO.Path]::GetTempPath()
$baseDir = Join-Path $tempDir "baseDir"
$fullDir = Join-Path $baseDir $generatedDirs
Write-Host "full dir length: $($fullDir.Length)"
# create directory
New-Item -Path $fullDir -ItemType Directory
# set directory path as environment variable to be used in next step
Add-Content -Path "$env:GITHUB_ENV" -Value "DIRECTORY_WITH_LONG_PATH=${fullDir}"
- name: Store artifacts
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: 'some artifact name'
path: ${{env.DIRECTORY_WITH_LONG_PATH}}/
|
I think this is the issue reported here:
the noejs issue is closed but it is unclear how/if this fixes the issue with the upload .. |
Are there any updates? THis currently renders the action useless as it can only reliable be used on linux :-\ |
For those wondering, an obvious workaround is to move the files you want to upload as artifacts to a separate folder under a short path. |
What happened?
Creating artifact from directory blows up
What did you expect to happen?
The folder to be packed up correctly.
How can we reproduce it?
Create an anaconda env with tensorflow, package it up with electron and try to get the directory put into an artifact.
Anything else we need to know?
No response
What version of the action are you using?
v3
What are your runner environments?
window
Are you on GitHub Enterprise Server? If so, what version?
No response
The text was updated successfully, but these errors were encountered: