Repository navigation
Conversation
Code Review ✅ Approved 🟡 Medium riskDisabling mise caching in three config actions changes their install behavior; callers may download helper tools each run, adding a bounded runtime cost. Sets Verification Rules 1/1 met Repos 1 inspected · PRs 4 inspectedFunctional validation No results Rules 1 passed 5 not applicable
Broader impact Repos 1 inspected PRs 4 inspectedCross-repo 1 repository inspected 0 open impacts
Cross-PR 4 PRs inspected 0 open impacts
Auto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



What
Backport to the
v1branch of #395. Setcache: falseon thestep-security/mise-actionstep ofconfig-poetry,config-uvandconfig-npm, and add a contract test (spec/mise-cache-owner_spec.sh) that fails if any of these steps stops disabling the cache.Why
A job that installs mise first (for example with
SonarSource/mise-action-wrapper, which restores its own cache into the mise data directory) and then callsconfig-poetryrestores two different caches into the same directory:step-security/mise-actioninconfig-*restores its defaultmise-v1-...cache withtar -xf ... -Pover the same directory.The older tarball overwrites files with the same name and keeps the others, so the tree becomes a mix of two installs and the pinned
misebinary is replaced. With a cold first cache (new key, new tool set) the fresh install pulls today's dependencies and the old tarball is overlaid. For poetry this produced a venv holdingfilelock4.2.x and 4.3.x files at once, andpoetry version -sfailed with an import or metaclass error.Only one cache should own the mise data directory.
config-*actions move the caller's mise files aside and only install helper tools (jfrog-cli, plusjqfor npm), so their own cache is the one to drop.Design choices and rejected alternatives
cache: falseon the step rather than a differentcache_key_prefix: a second prefix would still extract a second tarball over a live install.filelock: hides one package; any dependency whose layout changes between the cached and fresh install fails the same way.config-*actions: they install helper tools only, so losing their cache costs one small download.build-poetry,build-npm,build-yarn,promoteandupdate-release-channelinstall the caller's own tools (or AWS CLI) and may be the only mise cache for callers that do not use the wrapper. They are follow-ups (table below), not changed here.cache: falseis a documented input of the pinnedstep-security/mise-actionv5.1.2 (if false, action will not read or write to cache; default key prefixmise-v1).Impact on other workloads
All callers of
config-poetry,config-uv,config-npmand of thebuild-*actions that call them. Callers get a fresh install ofjfrog-cli(andjqfor npm) on each run instead of a cache restore: measured in the validation run: the step took about 3.5 s with the install versus about 3.2 s restoring the cache, so no visible change (one run each, so an estimate). No change for the caller's own tools.build-*actions still run their own mise step with caching, but that step now runs beforeconfig-*and no second cache lands on top of it.Separate, pre-existing and not changed here:
config-*pins its own miseversion, so afterconfig-*themisebinary is that pinned version, not the one chosen by an earlier step (validation log:mise already installed (2026.10.2), but different version requested (2026.5.9)).Per-action decision
config-poetryjfrog-clicache: false(this PR)config-uvjfrog-clicache: false(this PR)config-npmjfrog-cli,jqcache: false(this PR)build-poetry,build-npm,build-yarnjfrog-cliconfig-*the non-writer)promotejfrog-cli(plus any caller mise config, since it does not move it aside)update-release-channelmise_tomlmise-v1familyRollback
Revert this commit; behaviour returns to the previous double restore.
Cost
No new infrastructure. Slightly fewer cache reads and writes; a few seconds of runner time per
config-*call. No measurable monthly change.Validation
Throwaway runs in
SonarSource/sonar-scanner-pythonon a cold wrapper cache key with a stalemise-v1cache available (same shape as the failing jobs):config-poetryfrom thev1branch:Cache hit for: mise-v1-linux-x64-ubuntu24-2026.5.9-...,tar -xf ... -P, thenpoetry version -sfails with an import/metaclass error. Run: https://github.com/SonarSource/sonar-scanner-python/actions/runs/47352342672 (job 145107760114).mise-v1restore,Configure poetrysucceeds,poetry --versionprints 2.2.1. Same run, job 145107759583.v1line reproduces the failure.shellspec spec/mise-cache-owner_spec.shfails without the change and passes with it;pre-commit run --all-filespasses.Follow-ups
build-*,promoteandupdate-release-channelactions.config-*with the version callers choose.