-
Notifications
You must be signed in to change notification settings - Fork 8
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
Cache isn't updated when adding new cache paths #12
Comments
@esteluk this is an intentional optimization to avoid uploading the same cache archives in every build, slowing down builds where the cache (key) doesn't change. Ideally, the cache key and the cached files should be in sync, do you think this is not the case here? By the way, PR #11 is only merged, but I did not create a new release of it on Friday, so you were testing the version without that PR I think. I'm creating a new release of the change now. |
Long time no see @esteluk 😄 👋 Yeah this was a bit of a pain while I was testing, because I had to delete the cache manually before re-running. I did think about how to solve this but concluded that it would be quite difficult to make sure that the cache key was in sync across restore/save steps in the event that a workflow used two different versions. Another idea was that maybe there could be an option for a custom I suppose that the easiest way to solve this moving forward would be to just recommend that people clear the cache in the release notes? It'll eventually happen over time as caches invalidate automatically/people modify their gradle.build files etc. |
Yeah that makes a lot of sense, but I could also see how explicitly adding new subfolders to the cache would be something that might (ideally) modify the key a little bit? Is it the expected behaviour that customers are manually deleting the cache in order to benefit from the 1.1.4 release? – I think the same issue also applied to 1.1.2. I guess that's fine if so, but like @liamnichols says it might be worth calling out in the release notes.
I tested against the
👋🏽 ;)
Yeah, keeping these in sync seems like enough manual effort that it might be a non-starter. If the steps were mature perhaps it would be worth considering making updates to the path a breaking change (which is probably what I'd need to be looking at the release notes), but I don't think that makes sense at the moment. |
Troubleshooting
Useful information
Issue description
I was trying to test the change that @liamnichols provided in #11 to see if it helped resolve some build slowdown that I was seeing.
It did, which was great! But I nearly didn't notice this because this step doesn't update the cache when paths are changed, and it's necessary to manually delete the cache from the Bitrise UI before the saved cache is updated.
I think this is because the cache key is completely independent of the paths included in the cache paths.
My naive expectation would be that when the cache paths get updated, the stored cache would also be updated.
Bitrise info
Steps to reproduce
[email protected]
save-gradle-cache@main
(or, presumably, 1.1.4 once this is released)What I expect to happen
What actually happens
The text was updated successfully, but these errors were encountered: