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

Add package_type = "virtual_system" to FakePackage #241

Merged
merged 4 commits into from
Sep 19, 2022

Conversation

maresb
Copy link
Contributor

@maresb maresb commented Sep 18, 2022

I hope that this solves #202.

The tests are taking forever when I run locally.

They finally finished and apart from one concerning error, it looks like I just have to update some of the expected hash values.

The concerning error
./tests/test_conda_lock.py::test_run_with_channel_inversion Failed: [undefined]conda_lock.vendor.poetry.utils._compat.CalledProcessError: Command '['/home/mares/micromamba/condabin/mamba', 'create', '--prefix', '/tmp/tmpuglh4xow/prefix', '--dry-run', '--json', '--override-channels', '--channel', 'rapidsai', '--channel', 'nvidia', '--channel', 'conda-forge', '--channel', 'file:///tmp/tmpe6vs4lv8', 'cudf', 'conda-forge::cuda-python']' returned non-zero exit status 1.
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f4f823d6e30>
channel_inversion = PosixPath('/tmp/pytest-of-mares/pytest-10/test_run_with_channel_inversio0/environment.yaml')
mamba_exe = PosixPath('/home/mares/micromamba/condabin/mamba')

    def test_run_with_channel_inversion(
        monkeypatch: "pytest.MonkeyPatch", channel_inversion: Path, mamba_exe: str
    ):
        """Given that the cuda_python package is available from a few channels
        and three of those channels listed
        and with conda-forge listed as the lowest priority channel
        and with the cuda_python dependency listed as "conda-forge::cuda_python",
        ensure that the lock file parse picks up conda-forge as the channel and not one of the higher priority channels
        """
        monkeypatch.chdir(channel_inversion.parent)
>       run_lock([channel_inversion], conda_exe=mamba_exe, platforms=["linux-64"])

/home/mares/repos/conda-lock/tests/test_conda_lock.py:692: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/mares/repos/conda-lock/conda_lock/conda_lock.py:950: in run_lock
    make_lock_files(
/home/mares/repos/conda-lock/conda_lock/conda_lock.py:389: in make_lock_files
    lock_content = lock_content | create_lockfile_from_spec(
/home/mares/repos/conda-lock/conda_lock/conda_lock.py:738: in create_lockfile_from_spec
    deps = _solve_for_arch(
/home/mares/repos/conda-lock/conda_lock/conda_lock.py:689: in _solve_for_arch
    conda_deps = solve_conda(
/home/mares/repos/conda-lock/conda_lock/conda_solver.py:169: in solve_conda
    dry_run_install = solve_specs_for_arch(
/home/mares/repos/conda-lock/conda_lock/conda_solver.py:356: in solve_specs_for_arch
    proc.check_returncode()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = CompletedProcess(args=['/home/mares/micromamba/condabin/mamba', 'create', '--prefix', '/tmp/tmpuglh4xow/prefix', '--dr...kage cuda-python-11.7.1-py39h1eff087_0 is excluded by strict repo priority\n\n{\n    "success": false\n}\n', stderr='')

    def check_returncode(self):
        """Raise CalledProcessError if the exit code is non-zero."""
        if self.returncode:
>           raise CalledProcessError(
                self.returncode, self.args, self.stdout, self.stderr
            )
E           conda_lock.vendor.poetry.utils._compat.CalledProcessError: Command '['/home/mares/micromamba/condabin/mamba', 'create', '--prefix', '/tmp/tmpuglh4xow/prefix', '--dry-run', '--json', '--override-channels', '--channel', 'rapidsai', '--channel', 'nvidia', '--channel', 'conda-forge', '--channel', 'file:///tmp/tmpe6vs4lv8', 'cudf', 'conda-forge::cuda-python']' returned non-zero exit status 1.

/home/mares/repos/conda-lock/conda_lock/vendor/poetry/utils/_compat.py:168: CalledProcessError

Let's see how it looks on the CI...

@netlify
Copy link

netlify bot commented Sep 18, 2022

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit 210d1c3
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/6327666ccaea280009a92a7b
😎 Deploy Preview https://deploy-preview-241--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@maresb
Copy link
Contributor Author

maresb commented Sep 18, 2022

The "concerning error" above occurs also without package_type = "virtual_system".

@maresb maresb marked this pull request as ready for review September 18, 2022 19:15
@maresb
Copy link
Contributor Author

maresb commented Sep 18, 2022

@mariusvniekerk looks like I got it!!! 🎉

Closes #202, fixing broken tests

This was referenced Sep 18, 2022
@mariusvniekerk mariusvniekerk merged commit 8b88287 into conda:main Sep 19, 2022
@maresb maresb deleted the patch-1 branch July 31, 2023 08:19
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

Successfully merging this pull request may close these issues.

2 participants