Drillster / drone-volume-cache

Drone plugin for caching to a locally mounted volume
MIT License
109 stars 42 forks source link

Inconsistent failures #4

Closed francisdb closed 7 years ago

francisdb commented 7 years ago

This succeeds without errors

  volume-cache-rebuild:
    image: drillster/drone-volume-cache
    rebuild: true
    mount:
      - /drone/.coursier
      - /drone/.sbt
      - /drone/.ivy2
Rebuilding cache for /drone/.coursier...
rsync: change_dir "/drone/.coursier" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
Rebuilding cache for /drone/.sbt...
Rebuilding cache for /drone/.ivy2...

exit code 0

But if I put the non-existent folder as last mount entry the build step fails

...
Rebuilding cache for /drone/.coursier...
rsync: change_dir "/drone/.coursier" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

exist code 23

I would expect this to consistently fail or ignore however I define the mounts

mjwwit commented 7 years ago

Thanks for reporting this! This is definitely inconsistent and unwanted behavior. I don't think the absence of a folder when caching should lead to a failed build, I think ignoring is the way to go.

mjwwit commented 7 years ago

Mounts that do not exist when rebuilding cache will now also be removed from the cache (and they won't cause the build to fail anymore).

francisdb commented 7 years ago

great, thanks for the quick fix!