Consider making `cache: when: always` the default
@sytses
said:
Cache on failure https://release-13-5.about.gitlab-review.app/releases/2020/10/22/gitlab-13-5-released/index.html#optional-caching-for-failed-pipelines make it the default? GitLab should be fast by default.
What's this issue all about?
Caching only when the job/pipeline succeeds is the default. In 13.5 we've allow users to change this behavior and allow caching on failure. The comment from Sid was to explore the option of changing this default behavior from Caching on succeeds to cashing on failure
Considerations
We'll need to think about the cases where an incomplete cache is generated due to a failure.
A common use case is bundling dependencies, and users may not want to cache incomplete dependencies that would cause subsequent pipelines to fail.
Since the current behavior before the release of 13.5 is to the only cache when the job/pipeline succeeds, it might be unexpected for users if the behavior suddenly changes. Users will need to know to clear the cache to get certain pipelines running manually.
- Is this change useful for our existing users?
- Is this change useful for new users?
- Is this change breaking change ?
Let's discuss in this issue. @dhershkovitch @thaoyeager