Skip to content
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

Fix channels_remap and add regression test for percent-encoded packages #909

Merged
merged 11 commits into from
Dec 5, 2024

Conversation

jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Dec 2, 2024

Description

Closes #908

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Dec 2, 2024
@jaimergp
Copy link
Contributor Author

jaimergp commented Dec 3, 2024

Trying to debug the use_channel_remap failures, I see they are not tied to the new conda-libmamba-solver release.

  • I can reproduce locally with both conda-libmamba-solver 24.9 and 24.11
  • The problem shows up for both conda-standalone 24.5 and 24.9
  • It does NOT show up for micromamba
  • The PathNotFound errors come from this command run as part of the installer (so the installer does get built):
+ CONDA_ROOT_PREFIX=/private/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/pytest-of-jrodriguez/pytest-632/test_example_use_channel_remap0/install-use_channel_remap-0.0.1-MacOSX-arm64-sh
+ CONDA_REGISTER_ENVS=true
+ CONDA_SAFETY_CHECKS=disabled
+ CONDA_EXTRA_SAFETY_CHECKS=no
+ CONDA_CHANNELS=
+ CONDA_PKGS_DIRS=/private/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/pytest-of-jrodriguez/pytest-632/test_example_use_channel_remap0/install-use_channel_remap-0.0.1-MacOSX-arm64-sh/pkgs
+ CONDA_QUIET=1
+ /private/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/pytest-of-jrodriguez/pytest-632/test_example_use_channel_remap0/install-use_channel_remap-0.0.1-MacOSX-arm64-sh/_conda install --offline --file /private/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/pytest-of-jrodriguez/pytest-632/test_example_use_channel_remap0/install-use_channel_remap-0.0.1-MacOSX-arm64-sh/pkgs/env.txt -yp /private/var/folders/1b/z374sygs1s96t_xxxv0hr3lr0000gn/T/pytest-of-jrodriguez/pytest-632/test_example_use_channel_remap0/install-use_channel_remap-0.0.1-MacOSX-arm64-sh --no-rc
  • That empty CONDA_CHANNELS is weird. Might come from the Jinja PR. Let me look into it because maybe it should not be empty? 🤔
  • Changing these lines to their https counterparts, results in a different error. The installation does get through but the assertions in the test do not pass AssertionError: assert 'pkgs/main' == 'private_repo'.

@jaimergp
Copy link
Contributor Author

jaimergp commented Dec 3, 2024

  • That empty CONDA_CHANNELS is weird. Might come from the Jinja PR. Let me look into it because maybe it should not be empty? 🤔

Nah, constructor 3.10 also does that:

CONDA_ROOT_PREFIX="$PREFIX" \
CONDA_REGISTER_ENVS="true" \
CONDA_SAFETY_CHECKS=disabled \
CONDA_EXTRA_SAFETY_CHECKS=no \
CONDA_CHANNELS="" \
CONDA_PKGS_DIRS="$PREFIX/pkgs" \
CONDA_QUIET="$BATCH" \
"$CONDA_EXEC" install --offline --file "$PREFIX/pkgs/env.txt" -yp "$PREFIX" $shortcuts --no-rc || exit 1
rm -f "$PREFIX/pkgs/env.txt"

And it also reproduces the error, btw.

@jaimergp
Copy link
Contributor Author

jaimergp commented Dec 3, 2024

Hm, in CI downgrading to CLS 24.9 does fix it! 🤔

@jaimergp jaimergp changed the title Add regression test for !-containing distribution names Fix channels_remap and add regression test for percent-encoded packages Dec 4, 2024
@jaimergp jaimergp marked this pull request as ready for review December 4, 2024 12:42
@jaimergp jaimergp requested a review from a team as a code owner December 4, 2024 12:42
@jaimergp jaimergp closed this Dec 4, 2024
@jaimergp jaimergp reopened this Dec 4, 2024
@jaimergp jaimergp mentioned this pull request Dec 4, 2024
3 tasks
Copy link
Contributor

@marcoesters marcoesters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update dependencies to not use libmamba 24.11.0?

@jaimergp
Copy link
Contributor Author

jaimergp commented Dec 4, 2024

Good idea. Probably worth a repodata patch too, althought it might be easier to mark as broken?

@marcoesters
Copy link
Contributor

Good idea. Probably worth a repodata patch too, althought it might be easier to mark as broken?

Patching is easier than marking it as broken because workflows may point to pinned versions of constructor. Marking it as broken can break these workflows.

Copy link
Contributor

@marcoesters marcoesters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to update pyproject.toml, too, for restricting libmamba?

LGTM if not

@jaimergp
Copy link
Contributor Author

jaimergp commented Dec 5, 2024

Ugh, true.

@jaimergp
Copy link
Contributor Author

jaimergp commented Dec 5, 2024

Ah, wait, there's no run_constrained equivalent. Too bad 😬.

@jaimergp jaimergp merged commit 0710405 into conda:main Dec 5, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Exclamation points in build numbers for packages are problematic
3 participants