Skip to content
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

Use shorter working directory path on Windows runners #6385

Closed
3 of 11 tasks
Piedone opened this issue Oct 11, 2022 · 2 comments
Closed
3 of 11 tasks

Use shorter working directory path on Windows runners #6385

Piedone opened this issue Oct 11, 2022 · 2 comments

Comments

@Piedone
Copy link

Piedone commented Oct 11, 2022

Description

This is not so much a bug per se, but a suggested improvement to work around Windows long path limitations.

Despite app-specific workarounds like git longpaths, and despite Windows kind of supporting long paths for a while (and this being enabled in the runner image), there are still some apps that'll break in various ways with long (>260 character) paths. Thus, every letter counts, especially since the repository name is also added to the path, twice. My suggestion is to make the working directory's path under Windows as short as possible.

Now, today long paths shouldn't be an issue for any app out of the box, but decades of the path limitation being in place caused the ecosystem to also rely on it.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20221002.2

Is it regression?

No

Expected behavior

The working directory has a path as short as possible, like D:\a.

Actual behavior

The working directory's path includes the repository's name, twice, making it potentially really long.

This is a real pain if you have a repository name like https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions. Here, the working directory will be D:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions (or under the C drive on larger runners). This leaves us with 183 characters to work with, to stay on the safe side of the 260-character limit. After our prior tests, it seems that pretty much the only option is changing the repo name (what we'd like to avoid).

Repro steps

This is not specific to one build or app. Two examples that I've bumped into:

  • Git checkout failing. Can be worked around with git longpaths.
  • SQLite operations failing from under .NET with "SQLite Error 14: 'unable to open database file'".
@al-cheb
Copy link
Contributor

al-cheb commented Oct 11, 2022

This issue is not related to Windows runners. You should open an issue at the repo - https://github.com/actions/checkout

@al-cheb al-cheb closed this as completed Oct 11, 2022
@Piedone
Copy link
Author

Piedone commented Oct 11, 2022

Ah is it? I thought this was a more general runner thing, but OK then. Opened here: actions/checkout#955

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants