Filename too long issues in https://ci.jenkins.io/ on Windows workers

39 views
Skip to first unread message

Victor Martinez

unread,
Sep 14, 2021, 11:54:12 AM9/14/21
to Jenkins Developers
Hi all,

Is there any specific configuration I could apply permanently to avoid the below error that happens in https://ci.jenkins.io/ when running the tests on Windows?

 > git.exe init C:\Users\jenkins\Work\workspace\gins_opentelemetry-plugin_PR-167\target\tmp\j h927479030425102413\workspace\co-3 # timeout=10
...
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
hudson.plugins.git.GitException: Command "git.exe checkout -f a1479a055ebb33d6abf48ce9238fb586edc97203" returned status code 1:
stdout:
stderr: error: unable to create file src/main/resources/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration/help-exportOtelConfigurationAsEnvironmentVariables.html: Filename too long

I've been shorting the pipeline names for the time being, but I think the workaround doesn't work anymore.

Thanks so much.

Mark Waite

unread,
Sep 14, 2021, 12:09:31 PM9/14/21
to jenkinsci-dev
I've not found a technique that resolves the issue for all cases.  Some of the techniques we've tried with varying levels of non-success have included:
  • Shorten the job name and file path as much as possible (C:\J instead of C:\Users\Jenkins\Work) (helps, but doesn't fix it, could be applied to ci.jenkins.io configuration and our Windows image generation)
  • Git config system level core.longpaths true (seems to help in some cases, but doesn't fix it in all cases) (this change could be applied in the Windows image generation for ci.jenkins.io, since we have that in code now)
  • Git config repository level core.longpaths true (helps in cases where the initial clone and checkout was successful but later operations failed, can be implemented in the tests of the plugin)
Some of the references that provide more information about the issue:

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/e9e92f22-2b38-48fb-86ac-7e216d67db61n%40googlegroups.com.

Slide

unread,
Sep 14, 2021, 12:53:20 PM9/14/21
to jenkin...@googlegroups.com
You could try this when building the images for Windows:

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1

This should enable long file names in the OS itself



--

Gavin Mogan

unread,
Sep 14, 2021, 1:22:22 PM9/14/21
to Jenkins Developers
Isn't all the advice specific to building locally? The problem was stated on CI.jenkins

So I'm guessing an infra ticket/pr to enable the Reg key?and maybe agents should be on the root instead of users Jenkins work?

Slide

unread,
Sep 14, 2021, 1:34:16 PM9/14/21
to jenkin...@googlegroups.com
Yes, it would need to be added to the images for the infra.



--

Tim Jacomb

unread,
Sep 14, 2021, 4:38:18 PM9/14/21
to jenkin...@googlegroups.com
Apart from the other suggestions shortening the name would help, from the above example you should be able to remove both Jenkins and plugin

The reg key fix would hopefully solve this though 

Daniel Beck

unread,
Sep 15, 2021, 2:21:45 AM9/15/21
to JenkinsCI Developers
On Tue, Sep 14, 2021 at 10:38 PM Tim Jacomb <timja...@gmail.com> wrote:
Apart from the other suggestions shortening the name would help, from the above example you should be able to remove both Jenkins and plugin


Likely to be already part of persisted configurations, so would need Xstream aliases, doesn't seem worth it.

Victor Martinez

unread,
Sep 15, 2021, 7:28:09 AM9/15/21
to Jenkins Developers
Thanks for the answers

Do you happen to know if the folder `tmp\j h927479030425102413\workspace` could be shorted dynamically in the tests? Something like injecting the property before running the JenkinsRule?
Reply all
Reply to author
Forward
0 new messages