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

Simple reproducer for virtual PackageRecord error #408

Closed
maresb opened this issue May 18, 2023 · 7 comments
Closed

Simple reproducer for virtual PackageRecord error #408

maresb opened this issue May 18, 2023 · 7 comments

Comments

@maresb
Copy link
Contributor

maresb commented May 18, 2023

This is a lingering point of major breakage. Fails on both 1.4.0 and main.

Seems related to #202, #292, #381.

docker run --rm -it mambaorg/micromamba
micromamba install -y -c conda-forge mamba conda-lock git
mamba --version
# mamba 1.4.2
# conda 23.3.1
cat <<EOF > environment.yml
channels:
- conda-forge
dependencies:
- git
platforms:
- osx-64
EOF
conda-lock
pip install git+https://github.com/conda/conda-lock@4a667bd  # main, right after merging #290
conda-lock
STDERR:
PackageRecord(_hash=-2262511397987521167, name='__osx', version='0', build='0', build_number=0, channel=Channel("@"), subdir='osx-64', fn='__osx', md5='12345678901234567890123456789012', package_type='virtual_system')

Traceback (most recent call last):
  File "/opt/conda/bin/conda-lock", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1353, in lock
    lock_func(
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 1083, in run_lock
    make_lock_files(
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 408, in make_lock_files
    lock_content = lock_content | create_lockfile_from_spec(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 801, in create_lockfile_from_spec
    deps = _solve_for_arch(
           ^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_lock.py", line 723, in _solve_for_arch
    conda_deps = solve_conda(
                 ^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 168, in solve_conda
    dry_run_install = solve_specs_for_arch(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/conda_solver.py", line 355, in solve_specs_for_arch
    proc.check_returncode()
  File "/opt/conda/lib/python3.11/site-packages/conda_lock/_vendor/poetry/utils/_compat.py", line 168, in check_returncode
    raise CalledProcessError(
conda_lock._vendor.poetry.utils._compat.CalledProcessError: Command '['/opt/conda/bin/mamba', 'create', '--prefix', '/tmp/tmpfeqdnq88/prefix', '--dry-run', '--json', '--override-channels', '--channel', 'conda-forge', '--channel', 'file:///tmp/tmpekcnto8c', 'git']' returned non-zero exit status 1.
maresb added a commit to maresb/conda-lock that referenced this issue May 18, 2023
@maresb
Copy link
Contributor Author

maresb commented May 18, 2023

Workaround: pin conda to 22.9

@lesteve
Copy link
Contributor

lesteve commented May 25, 2023

I think the issue with the glibc virtual package has been fixed in conda/conda#12293. There is a very similar one with the osx virtual package though, I have opened conda/conda#12715 that hopefully will fix this.

@maresb
Copy link
Contributor Author

maresb commented May 25, 2023

Wonderful, thanks so much!!!

Once this is released, it seems to me like we should be checking the Conda version in use by Mamba, and warn if it's older.

@maresb
Copy link
Contributor Author

maresb commented Jul 26, 2023

Conda v23.7.0 just became available. I am hoping that this is now completely solved. Please try and report back.

@maresb
Copy link
Contributor Author

maresb commented Jul 31, 2023

This should be solved by using the latest version of Conda. Ref: sagemath/sage#35986 (comment)

@maresb maresb closed this as completed Jul 31, 2023
@lesteve
Copy link
Contributor

lesteve commented Aug 7, 2023

Just seeing this now, very nice to see this fixed!

@maresb
Copy link
Contributor Author

maresb commented Aug 7, 2023

Agreed, thank you @lesteve for fixing it!!!

maresb added a commit to maresb/conda-lock that referenced this issue Oct 19, 2023
maresb added a commit to maresb/conda-lock that referenced this issue Oct 19, 2023
maresb added a commit that referenced this issue Oct 19, 2023
Add test for GH #408 PackageRecord error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants