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

Add manual workflow for flushing CI cache #8097

Closed
wants to merge 1 commit into from

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented Apr 15, 2022

This is a massive hack but it looks like it's the best available option?!?


Please include the following checklist in your PR:

Please also shortly describe how you tested your change. Bonus points for added tests!

@fgaz fgaz force-pushed the flush-ci-cache branch 2 times, most recently from 94a000e to c0383e8 Compare April 15, 2022 16:42
@jneira
Copy link
Member

jneira commented Apr 15, 2022

wow, thanks for the workaround but I really hope there could be another way to evict a corrupted cache

did it happened recently?

@fgaz
Copy link
Member Author

fgaz commented Apr 15, 2022

did it happened recently?

yes, see #8089 and #8096

I really hope there could be another way to evict a corrupted cache

the other way is adding a version number to the cache key and raising it every time we want to "clear" the cache. and it looks like we will have to do that, because the cache isn't getting flushed (or it isn't getting flushed fast enough)!

$ curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/haskell/cabal/actions/cache/usage
{
  "full_name": "haskell/cabal",
  "active_caches_size_in_bytes": 41083004757,
  "active_caches_count": 45
}

@fgaz fgaz closed this Apr 15, 2022
@jneira
Copy link
Member

jneira commented Apr 15, 2022

if cache corruption is improbable, I would evict it via version bump. We need to bump it to clean unused entries in the cabal store sooner or later anyways, as you have detected
It cache corruption becomes a regular problem we would need to tackle the root cause I suppose

To avoid having to clean it regularly we would need to redesign it, using cabal freeze files or something alike

@fgaz
Copy link
Member Author

fgaz commented Apr 16, 2022

We need to bump it to clean unused entries in the cabal store sooner or later anyways, as you have detected

Actually 40 GB of the 41 come from this pr 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants