fix(install): rebuild symlinks after partial installs#10470
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a ChangesDeferred install error propagation with split_install_result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Greptile SummaryThis PR fixes a partial-install regression where tools that succeeded in a parallel
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to the post-install rebuild gate, logic is correct, and the fix is covered by an extended e2e test. The new No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "refactor(install): share split_install_r..." | Re-trigger Greptile |
|
This PR currently has failing checks. If this continues for 7 days, it will be closed automatically. This is warning day 1 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
e7234cd to
1ac4791
Compare
Extract partial-install success handling into errors::split_install_result so install and upgrade use the same logic.
1ac4791 to
bf1778e
Compare
Fixes the follow-up reported in #9848 where successful tools from a partially failed
mise installcould be left without runtime version symlinks such asinstalls/bun/latest.What was wrong
Toolset::install_all_versions()already preserves partial success inError::InstallFailed { successful_installations, failed_installations }. However,mise installused?on that result, so any failed tool skipped the laterrebuild_shims_and_runtime_symlinks()call entirely. That meant tools that had already installed successfully during the same command could miss their runtime symlinks and shims until another successful install/rebuild path ran.This is an install partial-failure problem, not a
mise reshimproblem. Runtime version symlinks remain owned by the install/runtime-symlink rebuild flow.How this fixes it
mise upgradepattern: extractsuccessful_installationsfromInstallFailed, continue post-install rebuild work for those versions, then return the original install error.mise install <tools>and baremise installfrom config.e2e/cli/test_install_parallel_failureto assert that the successfully installed tool gets itslatestruntime symlink even though another tool failed.Testing
/home/risu/.cargo/bin/cargo fmt --all --checkgit diff --checkenv -u MISE_PROJECT_ROOT -u MISE_ORIGINAL_CWD mise run test:e2e e2e/cli/test_install_parallel_failureNot run: full local test suite.
Summary by CodeRabbit
Bug Fixes
Tests