-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError
in some conda-build cases
#386
Comments
If you are finding this bug when you use Linux / macOS: CONDA_SOLVER=classic conda build ... Windows set "CONDA_SOLVER=classic"
conda build ...
set "CONDA_SOLVER=" |
I'm debugging live things in the only reproducer I could find: conda-forge/stackvana-feedstock#158 Interesting findings so far:
So I have two working theories:
What I'm doing next:
|
So, the debugging results show that only some keys are missing, and this is different every time.
Why would some packages be absent in the conda-build index but present in the channel repodata.json? Do they get dropped at some point? It could sound like a conda-build bug that didn't get noticed because the same index with those potentially missing records would be used by the classic solver. The most interesting part is that the dummy build does pass, so are we seeing a bad eviction thing? Memory pressure? 🤷 |
Oh woooow, I think got it! 😂 The missing records are missing in the conda-build index because they are too new! The build script takes so long that by the time the solver reloads the repodata, it finds a new one, downloads it, and maybe gets a new package record that conda-build didn't see when it built the in-memory index! This would explain why the dummy build does pass: it takes less that one second to run, so by the time the solver solves the test environment, the remote repodata is still relevant. I think the fix is to run conda-libmamba-solver offline when conda-build is calling? |
Wow that is impressive! Nice work Jaime 🥳 |
What I don't get is that we were using a cached IndexHelper for conda-build, so reloading should have never happened to begin with. So, either there's something funky going on with the passed channels that changes the signature and then it misses the cache and reloads, or there's a part of conda-build that calls the Solver without passing through |
More evidence to support the "repodata got updated during the build time" theory: ray-packages also fails with KeyErrors matching packages uploaded very recently (aiohttp-3.9.0, aws-crt-cpp, etc). |
Checklist
What happened?
Some conda-build recipes fail with
KeyError
exceptions in the test phase, viadisplay_actions
. See conda-forge/stackvana-feedstock#158.The full traceback is:
Conda Info
Conda Config
Conda list
Additional Context
A similar error can be seen in the conda-build test suite, only on Windows:
Good platform coverage :P
The text was updated successfully, but these errors were encountered: