fix(ci): cache mise tool installs to reduce GitHub API rate limit usage#1117
Open
palootcenas-outreach wants to merge 1 commit intomainfrom
Open
fix(ci): cache mise tool installs to reduce GitHub API rate limit usage#1117palootcenas-outreach wants to merge 1 commit intomainfrom
palootcenas-outreach wants to merge 1 commit intomainfrom
Conversation
Add ~/.local/share/mise to CircleCI save_cache paths so installed tool binaries and shims are persisted across builds. This eliminates redundant GitHub API calls for version resolution on every CI run. Bump cache key prefix from v1 to v2 on all daily-cache and toggle-cache keys to force a fresh cache write that includes the new path.
Author
Validation Results ✅Tested in [internal-repo] using a dev orb ( Cold cache run (job
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.local/share/miseto CircleCIsave_cachepaths so installed mise tool binaries and shims are persisted across buildsv1tov2on all daily-cache and toggle-cache keys to force a fresh cache write that includes the new pathProblem
Every CI run re-installs mise tool binaries because
~/.local/share/mise/(where installed binaries live) is not in the cached paths. Only~/.cache(downloaded archives) was cached. Eachmise installhitsapi.github.com/repos/.../releasesfor everygithub:backend tool, consuming shared GitHub API rate limits (~18 API URLs per build). With concurrent CI builds across all repos sharing the same 15,000 req/hour token pool, this is the primary driver of rate limit exhaustion causing CI failures and devenv provisioning failures org-wide.Fix
orbs/shared/jobs/save_cache.yaml~/.local/share/misetosave_cachepaths; bumpv1→v2on daily-cache save key (line 81), toggle-cache restore key (line 63), and toggle-cache save key (line 87)orbs/shared/commands/setup_environment.ymlv1→v2on daily-cache restore key (line 40)With mise installs cached, subsequent CI runs find tool binaries already installed.
mise installbecomes a no-op for already-installed tools, skipping GitHub API calls entirely.Risk Assessment
v3to invalidate if needed~/.local/share/miseadds ~500MB-1GB; CircleCI supports up to 3GB per cache keyRollout
Once merged and released, all repos pick this up automatically when they restencil (devbase version bumps via
stencil.lock→.bootstrap/syncs new orb version).Notes
{{ epoch }}key pattern (existing, not introduced here) means every build writes a new cache entry. CircleCI auto-evicts after 15 days. A future optimization could key offchecksum("mise.toml")-checksum("mise.lock")instead of epoch to deduplicate cache entries.v1-node-client-cache-*keys are unrelated and intentionally left unchanged.Rovo Dev code review: Rovo Dev couldn't review this pull request
Something went wrong while reviewing this pull request.
Troubleshoot code review errors