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

Change github actions caching #13253

Merged
merged 1 commit into from
Dec 12, 2020
Merged

Conversation

mshima
Copy link
Member

@mshima mshima commented Dec 12, 2020

Github actions cache limit is 5gb.
Each test creates ~500mb cache, with ~40 tests, the limit is reached by a lot.
So github cache approach is doing too many overwrites, making unstable.

Change to:

  • Schedule a full build to create the cache.
  • Change to 1 cache per related technology.

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@pascalgrimaud
Copy link
Member

That's what I said, few weeks ago, about the cache limit is 5gb, but I didn't correctly explain my idea, so my fault :-)

Maybe NPM is too big. What do you think about keeping cache only for backend?
As I'm not sure if NPM cache is used, as locally, I always download Internet when doing npm ci...

@mshima
Copy link
Member Author

mshima commented Dec 12, 2020

Github actions cache became unstable some weeks ago.

ngx-mysql-es-noi18n-mapsid build:

  • NPM: Cache Size: ~154 MB (161752912 B)
  • Maven: Cache Size: ~218 MB (228606993 B)
  • Cypress: Cache Size: ~164 MB (171914793 B)

ngx-gradle-fr build:

  • NPM: Cache Size: ~154 MB (161714493 B)
  • Maven: Cache Size: ~98 MB (102499987 B)
  • Gradle: Cache Size: ~262 MB (274586907 B)
  • Cypress: Same

Only maven/gradle would take ~300mb.
5gb is not enough for 1 cache per job.
The only solution is to have 1 cache for maven, 1 cache for gradle, 1 cache for cypress and 1 daily cache for npm.
Not sure how to accomplish this.
Anyway I think it's better to have an incomplete cache than no cache at all.

@pascalgrimaud
Copy link
Member

Anyway I think it's better to have an incomplete cache than no cache at all.

Totally agree

@mshima
Copy link
Member Author

mshima commented Dec 12, 2020

Not sure how to accomplish this.

I mean that I don't know an easy way to create a more complete cache.
With this PR the first job will write the cache, and every other job will use that cache.

@pascalgrimaud pascalgrimaud merged commit 614d96e into jhipster:main Dec 12, 2020
@pascalgrimaud pascalgrimaud added this to the 7.0.0-beta.0 milestone Dec 18, 2020
@mshima mshima deleted the skip_ci_caching branch January 18, 2021 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants