Repository navigation
fix(oci): write a tool with several versions once in the embedded config - #14200
Conversation
Co-authored-by: nitschSB <mario.melcher@seitenbau.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configuration
π Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. π WalkthroughWalkthroughThe embedded ChangesEmbedded configuration
Priority: β Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: βͺ Minimal Β· up to The change is mergeable after normal checks; no actionable risk remains identified. π₯ Pre-merge checks | β 4 | β 1β Failed checks (1 warning)β Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
<!-- entire-trail-link-start --> https://entire.io/gh/jdx/mise/trails/585 <!-- entire-trail-link-end --> ### π Features - **(bootstrap)** offer to install git and ssh before cloning a repository by @jdx in [#14188](#14188) - **(config)** allow local paths in include by @jdx in [#14178](#14178) - **(dotfiles)** add `mise dot save --re-encrypt` by @jdx in [#14210](#14210) - **(dotfiles)** show unsaved changes in `mise dot status` by @jdx in [#14209](#14209) - **(task)** include working-tree changes in --affected and drop the experimental gate by @jdx in [#14214](#14214) - **(vars)** ask once and remember [vars] answers per machine with mise vars prompt by @jdx in [#14190](#14190) ### π Bug Fixes - **(config)** do not panic for a config file at the filesystem root by @jdx in [#14182](#14182) - **(dotfiles)** don't say nothing is configured when history tracks entries by @jdx in [#14206](#14206) - **(dotfiles)** stop re-warning about approved plaintext files by @jdx in [#14204](#14204) - **(dotfiles)** ask the plaintext question only of a terminal by @jdx in [#14205](#14205) - **(dotfiles)** name the checkpoints rollback and undo restore and record by @jdx in [#14207](#14207) - **(dotfiles)** don't credit rollback to a checkpoint past a truncated change list by @jdx in [#14211](#14211) - **(dotfiles)** list every encrypted file a sync cannot unlock by @jdx in [#14208](#14208) - **(dotnet)** validate the SDK being installed, not the active one by @jdx in [#14189](#14189) - **(exec)** skip lazy tools that are not installed when resolving after an install by @jdx in [#14197](#14197) - **(go)** install tools whose published go.mod is not tidy by @JamBalaya56562 in [#14180](#14180) - **(npm)** raise the soft open-file limit at startup by @jdx in [#14174](#14174) - **(npm)** build the open-file limit raise on 32-bit targets by @jdx in [#14216](#14216) - **(oci)** write a tool with several versions once in the embedded config by @JamBalaya56562 in [#14200](#14200) - **(release)** fix Full Changelog base tag and cross-link changelog and release notes by @jdx in [#14199](#14199) - **(shim)** skip directories when resolving a tool's bin name by @jdx in [#14193](#14193) - **(shim)** skip other missing lazy tools when a lazy tool installs on first use by @jdx in [#14201](#14201) - **(upgrade)** skip remote lookups for missing lazy tools during auto_update by @jdx in [#14195](#14195) ### π Refactor - **(core)** return the macOS sandbox command as a tail expression by @jovial-liu in [#14184](#14184) ### π§ͺ Testing - **(upgrade)** cover auto_update from system config by @jdx in [#14185](#14185) ### π¦οΈ Dependency Updates - update jdx crates to v7 by @renovate[bot] in [#14203](#14203) ### Chore - **(ci)** lint workflows with jactionlint by @jdx in [#14191](#14191) - add OSS Scanner build files by @jdx in [#14212](#14212) ### Ci - add shared release fix notifications by @jdx in [#14196](#14196) ### New Contributors - @jovial-liu made their first contribution in [#14184](#14184) ## π¦ Aqua Registry Updates ### Updated Packages (1) - [`charmbracelet/crush`](https://github.com/charmbracelet/crush)
|
Thank you very much |
mise oci buildwrites the project's resolved tools into the image as/etc/mise/config.toml. A tool pinned to several versions got onename = "version"line per version. That is a duplicate key, so mise inside the container could not read its own config:became
and
mise toolsin the container failed withInvalid TOML in config file β¦ duplicate key.Now each tool is written once. A tool with several versions becomes an array, in the order they were resolved, because the first one takes precedence on PATH. A tool with one version is still a string, and the keys keep the short tool name, as before.
This takes over #12732 by @nitschSB, which pr-closer closed after 7 days of failing checks. Those were GitHub API rate limits on the fork run. They are credited as co-author, and the change is theirs. They later re-opened it as #13761, keyed by the full backend name instead (
core:java), and closed that one themselves. Greptile and CodeRabbit both flagged that variant: the image keeps installs under the short name's directory, so a full-name key would make mise look in the wrong place. This keeps #12732's short-name keys.Greptile's remaining finding on #12732 was that its tests built the grouped map by hand, so the grouping step itself went untested. The new
repeated_tool_versions_group_into_one_keytest feeds resolved tool versions through the grouping and checks two things: a repeated version collapses, and first-seen order holds.Validation
src/oci/builder.rs: a single version renders as a string, several versions render as an ordered array, and repeated resolved versions group into one key.jq = ["1.7.1", "1.6"]andmise oci build --from scratch --no-miseembeddedjq = "1.7.1"followed byjq = "1.6". The fixed build is covered by the unit tests above on CI; the end-to-end build was not run with it.AI-assisted β Tool: Claude Code; model: anthropic/claude-opus-5-5; version: unavailable.
π€ Generated with Claude Code
Summary by CodeRabbit