Hello Community,
We are currently facing a challenge with our self-hosted Windows runner used in our CI/CD pipelines. Our setup involves using Gitman to manage dependencies, which includes creating symlinks within the working directory. Specifically, these symlinks point to other folders within the same working directory. It appears that the cleanup issues occur when the target folder of a symlink is deleted before the symlink itsel (?), leading to NoSuchFileException
errors- subsequently to an unhealthy state of the runner.
Here’s a snippet of the log showing the issue:
[2024-07-29 22:15:13,432] Appending log line to main log.
[2024-07-29 22:15:13,763] Tearing down directories.
[2024-07-29 22:15:14,083] An error occurred whilst tearing down directories.
java.nio.file.NoSuchFileException: C:\<path_to_symlink_in_working_dir>\BurDefaultLibraries...
Currently, we manually delete the symlinks in the after-script section of our pipeline, which is a workaround but not an ideal solution. It adds complexity and reduces the readability of our pipeline code.
Has anyone else encountered similar issues with symlinks in self-hosted runners? Any insights or recommendations on how to handle or prevent these errors more gracefully would be greatly appreciated.
Thank you in advance for your help and suggestions!