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

CI: enabling easy caching in gitlab CI. #11504

Open
VannTen opened this issue Sep 4, 2024 · 4 comments
Open

CI: enabling easy caching in gitlab CI. #11504

VannTen opened this issue Sep 4, 2024 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@VannTen
Copy link
Contributor

VannTen commented Sep 4, 2024

What would you like to be added

the cache keyword in gitlab CI don't work out of the box, we're hitting warning like:

Checking cache for pre-commit-all-3-non_protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted. 
WARNING: Cache file does not exist                 
Failed to extract cache

We should set-up the different runners so that it works out of the box

Why is this needed

It would improve performance of the CI significantly (IMO) and avoid some problems like rate-limiting we face regularly (see #11485 )

/cc @ant31

@VannTen VannTen added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 4, 2024
@ant31
Copy link
Contributor

ant31 commented Sep 9, 2024

For shared cache we would need something like S3.
The alternative is to use a local storage. It can work fine because we're using a limited number of fixed nodes.

Configuration is here:
https://github.com/kubespray/kspray-infra/blob/main/apps/base/cicd/gitlab-ci/gitlab-runner/manifests/configs/config.template.toml
Maintainers can do a PR; once merged, it's deployed to the CI cluster.

@VannTen
Copy link
Contributor Author

VannTen commented Sep 9, 2024

I'll take a look 👍

@VannTen
Copy link
Contributor Author

VannTen commented Sep 10, 2024

@ant31 From the prometheus it seems there is about 2TB of storage on each node, is that right ?
I guess we could put a minio using the local-provisioner and use that as an S3 cache ? I don't know much about minio resources consumption, would that take much capacity from the CI itself ?

@ant31
Copy link
Contributor

ant31 commented Oct 29, 2024

minio is deployed and ci uses cache in: #11671
The boxes are not fetched from internet anymore if the cache exists.

Cache can be used on all jobs (e.g pip install etc), to be configured overtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants