Long paths aren't enabled on Windows image
Jenkins and plugins versions report
Environment
N/A
What Operating System are you using (both controller, and any agents involved in the problem)?
N/A
Reproduction steps
Long paths aren't currently enabled on Windows images.
Doc: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#registry-setting-to-enable-long-paths
Expected Results
Long paths are enabled on Windows images.
Actual Results
Long paths are not enabled.
Ref:
- https://github.com/jenkins-infra/helpdesk/issues/4574#issuecomment-2698486862
Anything else?
Note that enabling this won't directly allow using long paths with Windows images since it's broken in Git for Windows since its v2.48.1. Ref:
- https://github.com/git-for-windows/git/issues/5476#issuecomment-2733088835
But at least it will be enabled for when a new version of Git for Windows will be released.
I've opened a PR to add a test checking long paths in #962, confirmed passing with Git for Windows v2.47.0, and failing with newer Git for Windows versions (up to v2.49.0 at the moment). Keeping that PR in draft until a new Git For Windows version restores the functionality.
Additionally, we could add to the README that long paths are broken for Windows images as known issues.
Are you interested in contributing a fix?
Yes.
See https://github.com/jenkins-infra/packer-images/pull/2011 which might help once delivered
https://github.com/jenkinsci/docker-agent/releases/tag/3309.v27b_9314fd1a_4-5
- To be reopened on #1006 merge 😅
- To be reopened on Revert Git version on Windows from
2.50.0.windows.1to2.49.0.windows.1#1006 merge 😅
Good point! Thanks! (reopening in advance)
We can close now: https://github.com/jenkinsci/docker-agent/issues/1005#issuecomment-3031082440