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

build: gha: always use GHA cache for Linuxkit Cache in hopes of diminishing DockerHub pull-rate limits trouble #230

Merged

Conversation

rpardini
Copy link
Contributor

build: gha: always use GHA cache for Linuxkit Cache in hopes of diminishing DockerHub pull-rate limits trouble

  • previously, it only used GHA cache for builds running on GH-hosted runners
  • this now enables it for all builds, even on self-hosted runners
  • next few builds might still fail, but further ones will have a cache (we've save-always: true) and should eventually work

Signed-off-by: Ricardo Pardini ricardo@pardini.net

…ishing DockerHub pull-rate limits trouble

- previously, it only used GHA cache for builds running on GH-hosted runners
- this now enables it for all builds, even on self-hosted runners
- next few builds might still fail, but further ones will have a cache (we've `save-always: true`) and should eventually work

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
@rpardini
Copy link
Contributor Author

Alternatively to this, we could remove the vars CI_RUNNER_LK_ARM64 and CI_RUNNER_LK_AMD64, and thus let LK builds run on GitHub-hosted runners -- then those will have a cache.

The original logic was to disable cache for self-hosted runners as those are (usually/by default) not ephemeral, and always run in the same dir in the host, thus the cache dir should survive across GHA jobs -- this is somehow not happening here @jacobweinstock any idea why?

@rpardini
Copy link
Contributor Author

the cache dir should survive across GHA jobs -- this is somehow not happening here

Oh damn. I always forget about this -- actions/checkout defaults to clean: true (and fetch-depth: 1!) and thus obliterates the local cache away. Adding with: { clean: false, fetch-depth: 0 } to all the action/checkout calls should also make the cache effective (and git pulls much faster over time) also on self-hosted runners.

Let me know which you prefer -- and if there's something on the runners to make them ephemeral somehow.

@rpardini
Copy link
Contributor Author

Alternative to this: #231

@jacobweinstock
Copy link
Member

Hey @rpardini , lets try this one! Thanks!

@jacobweinstock jacobweinstock marked this pull request as ready for review June 19, 2024 22:24
@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Jun 19, 2024
@mergify mergify bot merged commit 30bbf4a into tinkerbell:main Jun 19, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants