I have a matrix job that is configured with:
Archive the artifacts: bsoe/publish/*.bsfw.sha1.txt
Not all of the matrix combinations are expected to generate artifacts. The build log for one that does not contains:
The error message is expected because the bsoe/publish directory is empty. However, I don't expect it to take ~4 minutes to discover that it needs to report that. If I run strace on the Java thread that appears to be busy during this time I can see it attempting to open (what looks like) every single file in the workspace with O_DIRECTORY and failing because the file is not a directory. If it successfully opens a directory then it calls fstat and getdents a few times before closing it. It looks like the glob pattern matcher has gone wild.
If I make the job create a dummy file that does match the pattern then the error goes away and archiving is quick.
(To be clear, the filenames I see in the strace output are not underneath bsoe/publish, they are elsewhere in the workspace.)
Expected behaviour: Archiving no artifacts should take negligible time.
Actual behaviour: Archiving no artifacts takes several minutes with a large workspace.