Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Conversation

@robrix
Copy link
Contributor

@robrix robrix commented Jan 28, 2020

This PR should allow us to cache updates to dependencies even in the presence of test failures, reducing iteration time.

🎩 @joshmgross for the suggestion.

@joshmgross
Copy link

One of the things to test/be careful for is if the dependencies/build somehow gets corrupted, causing the build failures. I haven't tested this personally, but I think you could run into a situation where you have a new cache, something fails the build, and then you store that corrupted/failed build dependency into the cache.

@patrickt
Copy link
Contributor

@joshmgross Yeah, we’re encountering that unhappy eventuality in this patch already 😭

@joshmgross
Copy link

Also looks like none of the post cache actions ran, there might be a bug with how we treat always() and post actions. I'll follow up with the relevant team.

@robrix
Copy link
Contributor Author

robrix commented Jan 28, 2020

Doesn’t look like it wrote to the cache after failing to build dependencies, FWIW?

@joshmgross
Copy link

The cache action defines a post-if (https://github.com/actions/cache/blob/master/action.yml#L21) in the action.yml

Turns out this will override anything defined in the main if

@robrix
Copy link
Contributor Author

robrix commented Jan 28, 2020

Turns out this will override anything defined in the main if

Guessing that’s not something we can really do anything about from this end, then. At the very least, it doesn’t appear that the post-if key is accepted on our step here, which makes sense cos it is not itself the post-action.

@joshmgross
Copy link

@robrix Yep, sorry about that, I thought this scenario would work. You could fork the action and modify that action.yml.

Feel free to file an issue on https://github.com/actions/cache for full feature support

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants