Skip to content

Random warning: failed to remove ***: Directory not empty

Summary

Gitlab-Runner job fails because it is unable to delete old files on Windows.

Steps to reproduce

The issue is not determinist. But basically, just launch jobs.

Actual behavior

Randomly, job files because it is unable to delete old files on Windows. It doesn't fail with all files. The issue only happens on Windows.

Maybe, it happens when CI switches from different remotes (like a fork to upstream) for the same project.

A click on retry, solves the issue.

Expected behavior

Gitlab-Runner deletes old files with success

Relevant logs and/or screenshots

gre

Environment description

Are you using shared Runners on GitLab.com? Or is it a custom installation? Which executors are used? Please also provide the versions of related tools like docker info if you are using the Docker executor.

  • Custom GitLab
  • Gitlab Runner 10.6.0 (same issue with Gitlab Runner 10.5.0)
  • Windows 7
  • Powershell executor

Used GitLab Runner version

Running with gitlab-runner 10.6.0 (a3543a27)
   on Windows 7 442f1c76

Similar issues not solved : #1839, #2180, #3070 (closed)