-
Notifications
You must be signed in to change notification settings - Fork 465
Description
Checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
Commands I ran and their output:
Any pixi commands that creates a shell
pixi run -vvv echo hellopixi.toml/pyproject.toml file that reproduces my issue:
This is a race condtion it happens rougly 50% of the time on my machine. This error seems to only appear when you have 3+ target platforms in your pixi.toml? I was not able to reliably reproduce with 1/2
I have created a minimal reproduction. I am able to reproduce this on MacOS and Windows.
see https://github.com/GuillaumeQuenneville/pixipoc
one of the pixi packages has an arbitrary (forced) error. It has a requirement on python 3.14 and scipy 1.13 which requires python 3.9
pixi info output:
You can get the issue to appear by running any command that resolves a pixi environment. (e.g. pixi run echo hello)
This shows the two versions of operation was cancelled, one crashes in rust, the other doesnt. And sometimes it will show the actual error (which is why i concluded race condition.
PS C:\Users\Guill\workspace\personal\pixipoc> pixi run echo hello
▪ solving [────────────────────] 0/3
thread '<unnamed>' panicked at crates\pixi_command_dispatcher\src\command_dispatcher_processor\mod.rs:501:56:
invalid SlotMap key used
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: × failed to solve requirements of environment 'default' for platform 'win-
│ 64'
╰─▶ ⚠ the operation was cancelled
PS C:\Users\Guill\workspace\personal\pixipoc> pixi run echo hello
Error: × failed to solve requirements of environment 'default' for platform 'win-
│ 64'
╰─▶ ⚠ the operation was cancelled
Other files (e.g. script files, source files, etc.):
The debug and trace when running with pixi run -vvv does not show the actual error. We see the error "does not define a package" and "error was cancelled" and not the version mismatch
TRACE pixi_command_dispatcher::command_dispatcher_processor: Dispatch background task has started
TRACE pixi_manifest::discovery: Found manifest in directory: "C:\\Users\\Guill\\workspace\\personal\\pixipoc\\pixi.toml", continuing further.
TRACE pixi_manifest::discovery: Found manifest in directory: "C:\\Users\\Guill\\workspace\\personal\\pixipoc\\subpkg\\pixi.toml", continuing further.
INFO pixi_core::lock_file::outdated: the dependencies of environment 'default'
for platform osx-arm64 are out of date because the pixi.toml does not describe a package
TRACE pixi_manifest::discovery: Found manifest in directory: "C:\\Users\\Guill\\workspace\\personal\\pixipoc", continuing further.
INFO pixi_core::lock_file::outdated: the dependencies of environment 'default'
for platform win-64 are out of date because the operation was cancelled
INFO pixi_core::lock_file::outdated: the dependencies of environment 'default'
for platform linux-64 are out of date because the operation was cancelled
TRACE solve{name="default" platform=win-64}: pixi_command_dispatcher::solve_pixi::source_metadata_collector: Collecting source metadata for pixipoc
TRACE solve{name="default" platform=win-64}: pixi_command_dispatcher::solve_pixi::source_metadata_collector: Collecting source metadata for subpkg
TRACE solve{name="default" platform=linux-64}: pixi_command_dispatcher::solve_pixi::source_metadata_collector: Collecting source metadata for pixipoc
TRACE solve{name="default" platform=linux-64}: pixi_command_dispatcher::solve_pixi::source_metadata_collector: Collecting source metadata for subpkg
TRACE solve{name="default" platform=osx-arm64}: pixi_command_dispatcher::solve_pixi::source_metadata_collector: Collecting source metadata for pixipoc
TRACE solve{name="default" platform=osx-arm64}: pixi_command_dispatcher::solve_pixi::source_metadata_collector: Collecting source metadata for subpkg
▪ solving [────────────────────] 0/3
thread '<unnamed>' panicked at crates\pixi_command_dispatcher\src\command_dispatcher_processor\mod.rs:501:56:
invalid SlotMap key used
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
TRACE pixi_manifest::discovery: Found manifest in directory: "C:\\Users\\Guill\\workspace\\personal\\pixipoc\\pixipoc\\pixi.toml", continuing further.
TRACE pixi_manifest::discovery: Found manifest in directory: "C:\\Users\\Guill\\workspace\\personal\\pixipoc", continuing further.
Error: × failed to solve requirements of environment 'default' for platform 'win-
│ 64'
╰─▶ ⚠ the operation was cancelled
Issue description
Errors in monorepos do not coalesce properly. We get a generic operation was cancelled for arbitrary errors.
There is some previous work with the same issue here that says it was fixed but I doesn't seem to be.
#5200
Expected behavior
I expect the actual error to propagate in a monorepo.
Our main monorepo has an intermittent issue which i can't diagnose because of this. Sometimes the solve works, all failures are "operation was cancelled". The intermittent issue does not reappear in a solved environment until a version in a package is changed and a new solve is triggered. I hope a fix to this issue will help me diagnose the issue with our main monorepo.