Repository navigation
fix(conda): preserve cross-platform lock data - #11946
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughConda resolution failures now propagate as lock errors. Lock processing distinguishes fatal failures from unresolved skips. Empty resolutions preserve existing platform and dependency data. Dependency versions and regression tests were updated. ChangesConda lock resolution
Estimated code review effort: 3 (Moderate) | ~25 minutes Mergeability Score: ⚪ Minimal · up to The conda lockfile behavior change is supported by targeted tests and manual validation, and no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant LockCLI
participant CondaBackend
participant Lockfile
LockCLI->>CondaBackend: resolve lock information
CondaBackend-->>LockCLI: platform data or fatal resolution error
LockCLI->>Lockfile: apply lock result
Lockfile-->>LockCLI: preserve existing platform data
LockCLI-->>LockCLI: classify results and report deferred errors
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Greptile SummaryThe PR updates the coordinated rattler dependency set and adjusts conda lock resolution so failures are propagated while empty metadata cannot erase existing cross-platform lock data.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the provided follow-up-review scope. No blocking failure remains. Important Files Changed
Reviews (5): Last reviewed commit: "fix(lock): reject unresolved platform up..." | Re-trigger Greptile |
56e733f to
4f147c2
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lockfile.rs`:
- Around line 2629-2631: Update the Conda error path in the lock-resolution flow
around resolve_conda_packages and LockResolutionResult so Err(e) preserves and
returns the package-resolution error instead of replacing it with an empty
BTreeMap; keep error_is_fatal true for BackendType::Conda. Add a regression test
verifying explicit lock reports Failed and does not persist incomplete package
data when Conda parsing or solving fails.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: d893feb7-7e2e-46ac-b3cb-248cf2161bbe
📒 Files selected for processing (2)
src/cli/lock.rssrc/lockfile.rs
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4b9ff1c. Configure here.

Summary
CONDA_OVERRIDE_*variables when resolving conda lock metadatamise lockwhen conda parsing or solving failsRoot cause
rattler_virtual_packages4.1.0 seeded foreign Linux solves with__glibc=0, which made packages such as ffmpeg unsolvable. The conda backend then converted that solve failure into an empty successfulPlatformInfo. Applying the empty result preserved the artifact URL and checksum but clearedconda_deps, after which lockfile cleanup removed all now-unreferenced conda package records.This updates to the coordinated rattler releases containing conda/rattler#2646, propagates genuine conda resolution errors, and makes the shared lock-result application path skip empty metadata rather than merging it into an existing entry.
Fixes the behavior reported in discussion #11944.
Validation
mise run lint-fixcargo test --locked --bin mise backend::conda::testscargo test --locked --bin mise lockfile::tests::empty_resolution_preserves_existing_conda_dependenciescargo test --locked --bin mise cli::lock::testsmise run test:e2e e2e/lockfile/test_lockfile_conda_cross_platformlinux-x64andmacos-arm64CONDA_OVERRIDE_GLIBC=0solve failure exits 1 and leaves the lockfile byte-for-byte unchangedAI-assisted — Tool: Codex; model: openai/unavailable; version: unavailable.
Note
Medium Risk
Changes lockfile merge semantics and conda solve/error handling across platforms; mitigated by targeted rattler fix, regression tests, and preserving data on partial failure.
Overview
Fixes cross-platform conda lockfiles losing
conda_depsand package records when a foreign-platform solve fails or returns empty metadata.Dependency bump: Coordinated rattler upgrades (
rattler_virtual_packages5,rattler_repodata_gateway0.32,rattler_package_streaming0.27) so foreign Linux solves get sane virtual-package defaults instead of__glibc=0.Conda backend: Virtual-package detection now uses
VirtualPackageOverrides::from_env()(e.g.CONDA_OVERRIDE_*), a cache path, and propagates errors; lock resolution no longer turns parse/solve/missing-main-package failures into silent emptyPlatformInfo.Lock pipeline: Resolution tuples carry
error_is_fatal(true for conda);mise lockclassifies those as Failed and surfaces them after writing the lockfile.apply_lock_resultskips merging emptyPlatformInfointo existing platform entries so prior URLs, checksums, andconda_depsstay intact; conda package resolution errors are returned fatally instead of logged and ignored.Adds unit tests and an e2e regression (
CONDA_OVERRIDE_GLIBC=0must exit non-zero without mutating the lockfile).Reviewed by Cursor Bugbot for commit b477e68. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Bug Fixes
Tests