Skip to content
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 cleanup should not run for failed jobs #71

Closed
bigdaz opened this issue Mar 14, 2024 · 1 comment
Closed

Cache cleanup should not run for failed jobs #71

bigdaz opened this issue Mar 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working in:cache-cleanup
Milestone

Comments

@bigdaz
Copy link
Member

bigdaz commented Mar 14, 2024

When Gradle execution fails it is quite possible that some required downloads and assets in the Gradle User Home will be incorrectly flagged as "unused" and removed during cache cleanup. This is particularly the case when the job fails early (like during configuration).

We should only run cache cleanup in the case where the build successfully runs to completion.

@bigdaz bigdaz added the bug Something isn't working label Mar 14, 2024
@bigdaz
Copy link
Member Author

bigdaz commented Mar 14, 2024

I suspect that cleanup of one or more transformed jars is one factor resulting #47, although it should not produce the Immutable workspace contents have been modified error, so I think there's likely a bug in Gradle 8.6 as well.

@bigdaz bigdaz self-assigned this Mar 14, 2024
@bigdaz bigdaz added this to the v3.2 milestone Mar 14, 2024
@bigdaz bigdaz removed this from the v3.2 milestone Mar 19, 2024
@bigdaz bigdaz removed their assignment Apr 5, 2024
@bigdaz bigdaz self-assigned this Jul 15, 2024
@bigdaz bigdaz changed the title Cache cleanup should not run for cancelled or failed jobs Cache cleanup should not run for failed jobs Jul 17, 2024
bigdaz added a commit that referenced this issue Jul 18, 2024
Adds new 'cache-cleanup' parameter with 3 settings: 'never', 'on-success' and 'always'.
This gives users more control over whether cache cleanup should occur.

Fixes #71
@bigdaz bigdaz closed this as completed in 27dea2d Jul 18, 2024
@bigdaz bigdaz modified the milestones: v3.6.0, v4.0.0 Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in:cache-cleanup
Projects
None yet
Development

No branches or pull requests

1 participant