Cache is missing files between jobs if shared using a SMB network share
Issue description
I am currently working on setting up new runners on Windows Server 2016, sharing their cache using an SMB network share. As there is no possibility (at least that I'm aware of - --cache-path does nothing) to change the cache directory path, I've created a symbolic link to the UNC path like C:\gitlab-runner\cache => \\myshare\gitlab-runner-cache\. This works so far, that occasionally files seem to get lost between subsequent jobs. After a few retries, the broken jobs will work again. It seems the runner does not wait for the cache to be fully written to disk before starting the next job. Or maybe an issue unpacking the .zip file correctly? This applies particularly to jobs running in parallel. The log does not give away anything.
Also, there are a few similar issues with distributed cache:
Update
There seems to be an issue with cache in general. We also tried a S3 configuration using minio with the same results.
Potential future workaround
Sicking runners to pipelines as described in the following issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/29447
Runner version
Version: 11.6.1
Git revision: 8d829975
Git branch: 11-6-stable
GO version: go1.8.7
Built: 2019-01-15T15:20:10+0000
OS/Arch: windows/amd64
Example configuration:
listen_address = ":9252"
concurrent = 8
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "GLAB-PRD-CI01"
limit = 8
url = "https://mygitlab.tld"
token = "mytoken"
executor = "shell"
shell = "powershell"
[runners.cache]
Shared = true
[runners.cache.s3]
[runners.cache.gcs]