Fallback to solved record filename to find the downloaded tarball in get_upstream_pins
#5037
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #4991
After quite some effort debugging this issue, this is what we've found:
default_channels
orchannel_alias
, or both.conda clean -pt
)In this situation, the
get_upstream_pins
calculation is forced to download the package on the spot to extract it and retrieve itsrun_exports
metadata.The problem is caused by a small divergence in the indices (parsed repodatas) as loaded by libmamba and conda, respectively. With customized
default_channels
andchannel_alias
values, thechannel
attribute of eachPackageRecord
in theconda-build
index is set differently than inlibmamba
.For example, with this configuration:
, the offending block tries to match these two records:
conda-forge::python-3.11.6-h43d1f9e_0_cpython
(provided by libmamba, the solver)defaults::python-3.11.6-h43d1f9e_0_cpython
(calculated by conda-build's index, which is built separately but not used in practice)They are the same package with different channel. Since
conda-build
loads the repodata on its own, it interprets that theconda-forge
channel should be calleddefaults
given the config indefault_channels
. However that's a multichannel and libmamba doesn't handle those well and it prefers to use the actual channel behind the multichannel abstraction (e.g.pkgs/main
for the defaultdefaults
). Hence the divergence.I was going to try fix this in conda-libmamba-solver so the indices match, but:
PackageRecord
. I am only adding it as a fallback if not found in theconda-build
index as an abundance of caution.run_exports.json
support (via CEP-11).Checklist - did you ...
news
directory (using the template) for the next release's release notes?