-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storing relative paths in the .cache archive #11
Comments
I was looking at the code a bit and I'd have two proposal for this. 1. Remove the path normalization and just use the paths as they are given on the command line
This would break the current behavior, which always saves absolute paths. 2. Add a new command line option to
|
@wagdav I do like the idea of relative paths, moreover I was sure someone would eventually ask for it, but I didn't implement it initially since there was need for it, but now that there interest in that feature, I'll be happy to accept a PR and provide help with it if necessary. As far as your suggested options, I would say that I definitely don't like the first one, since it is NOT backwards compatible and could break current deployments, which is no bueno.
Whenever restoring files, all paths that had absolute paths are naturally restored where suppose to and ones with relative paths, would be restored into current directory. What do you think, does that solution fit your use case? Just a side note to this solution. It would be impossible to save paths that are relative to different base paths, but nothing prevents a user to invoke |
@lehins I like your proposition, I'll give it a try to code it up. |
Thanks @lehins for the fast release! Tomorrow we're deploying the new version 😃 |
First, thanks for making cache-s3. It's a really useful tool!
I'm using
cache-s3
on a compilation cache database (created with clcache on Windows). My builds are running on a node in a temporary directory assigned randomly by the CI system. My compilation cache is a subfolder of the working directory.If I do two consecutive builds, I'm assigned two different working directories, so that the build artifacts won't interfere. But since cache-s3 stores absolute paths I cannot restore the cache from the previous build.
In short, the first build
Now a consecutive build
What would you suggest in this case? Would it be possible to save the cache content using relative paths?
The text was updated successfully, but these errors were encountered: