-
Notifications
You must be signed in to change notification settings - Fork 24
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 conda-forge based CI #133
Conversation
Needs changes in conda/conda#12350 |
@costrouc I'll need some help debugging the errors in |
I can reproduce this test with the following locally (am running on a x86 machine in the unlikely case this would be why @jaimergp could not reproduce it). docker run --rm -it \
-v /home/costrouc/p/conda/conda:/opt/conda-src \
-v /home/costrouc/p/conda/conda-libmamba-solver:/opt/conda-libmamba-solver-src \
-e TEST_SPLITS=3 \
-e TEST_GROUP=1 \
-e CONDA_SOLVER=libmamba \
ghcr.io/conda/conda-ci:main-linux-python3.10-conda-forge \
bash Then running sudo env CONDA_SOLVER=classic /opt/conda/condabin/conda install -p /opt/conda --file /opt/conda-libmamba-solver-src/dev/requirements.txt
/opt/conda/bin/python -m pip install /opt/conda-libmamba-solver-src --no-deps -vvv
source /opt/conda-src/dev/linux/integration.sh I am next going to try to narrow this down. |
Okay can reproduce with a single test. sudo env CONDA_SOLVER=classic /opt/conda/condabin/conda install -p /opt/conda --file /opt/conda-libmamba-solver-src/dev/requirements.txt
/opt/conda/bin/python -m pip install /opt/conda-libmamba-solver-src --no-deps -vvv
# taken from dev/linux/integration.sh
git config --global --add safe.directory /opt/conda-src
sudo su root -c "/opt/conda/bin/conda install -yq conda-build"
sudo /opt/conda/bin/conda install --quiet -y --file tests/requirements.txt
eval "$(sudo /opt/conda/bin/python -m conda init --dev bash)"
conda-build tests/test-recipes/activate_deactivate_package tests/test-recipes/pre_link_messages_package
conda info
export TMP=$HOME/pytesttmp
mkdir -p $TMP
# run single test
pytest tests/test_create.py::IntegrationTests::test_conda_pip_interop_conda_editable_package From the docker image. The logs are attached logs.txt |
When using (Pdb) unlink_precs
IndexedSet([PrefixRecord(_hash=919153346818182340, name='urllib3', version='1.19.1', build='dev_0', build_number=0, channel=Channel("<develop>"), subdir='pypi', depends=('python 2.7.*',), constrains=('cryptography >=1.3.4', 'idna >=2.0.0', 'pyopenssl >=0.14', 'pysocks !=1.5.7,<2.0,>=1.5.6'), package_type='virtual_python_egg_link', files=(), paths_data=PathsData(paths_version=1, paths=()))])
(Pdb) link_precs
IndexedSet([PackageRecord(_hash=6144791784308069146, name='urllib3', version='1.20', build='py27_1', build_number=1, channel=Channel("conda-forge/linux-64"), subdir='linux-64', fn='urllib3-1.20-py27_1.tar.bz2', md5='0507cc609938ad8fc81c18f818b80f52', url='https://conda.anaconda.org/conda-forge/linux-64/urllib3-1.20-py27_1.tar.bz2', sha256='139f41180aebfbb75161e313daecc29bd34c5b914ac27948e6ba62d7ae8ab2ca', depends=('python 2.7*',), constrains=('python_abi * *_cp27mu',), track_features=(), license='MIT', timestamp=0, size=130718)])
(Pdb) unlink_precs[0]
PrefixRecord(_hash=919153346818182340, name='urllib3', version='1.19.1', build='dev_0', build_number=0, channel=Channel("<develop>"), subdir='pypi', depends=('python 2.7.*',), constrains=('cryptography >=1.3.4', 'idna >=2.0.0', 'pyopenssl >=0.14', 'pysocks !=1.5.7,<2.0,>=1.5.6'), package_type='virtual_python_egg_link', files=(), paths_data=PathsData(paths_version=1, paths=()))
(Pdb) unlink_precs[0].is_unmanageable
True
(Pdb) unlink_precs[0].package_type
<PackageType.VIRTUAL_PYTHON_EGG_LINK: 'virtual_python_egg_link'>
(Pdb) from conda.models.enums import PackageType
(Pdb) unlink_precs[0].package_type in PackageType.unmanageable_package_types()
True
(Pdb) self.specs_to_add
IndexedSet([MatchSpec("urllib3=1.20")])
(Pdb) self.prefix
'/home/test_user/pytesttmp/0b0a abdecf'
(Pdb) os.listdir(self.prefix + '/lib/python2.7/site-packages/')
['certifi-2020.6.20-py3.6.egg-info', 'README', 'urllib3.egg-link', 'wheel-0.37.1-py3.9.egg-info', 'setuptools-44.0.0.post20200106-py2.7.egg-info', 'wheel', 'pip-10.0.1-py2.7.egg-info', 'setuptools', 'easy-install.pth', 'pkg_resources', 'pip', 'certifi', 'easy_install.py', 'easy_install.pyc']
(Pdb) subprocess.check_output('ls -la "/home/test_user/pytesttmp/0b0a abdecf/lib/python2.7/site-packages/urllib3.egg-link"', shell=True)
b'-rw-r--r-- 1 test_user test_user 51 Feb 27 03:34 /home/test_user/pytesttmp/0b0a abdecf/lib/python2.7/site-packages/urllib3.egg-link\n' |
Awesome! Thanks @costrouc. Look how fun this is getting now:
# should raise an error
with pytest.raises(PackagesNotFoundError):
# TODO: This raises PackagesNotFoundError, but the error should really explain
# that we can't install urllib3 because it's already installed and
# unmanageable. The error should suggest trying to use pip to uninstall it.
stdout, stderr, _ = run_command(Commands.INSTALL, prefix, "urllib3=1.20", "--dry-run") # <<< THIS ONE The TODO note says that we should actually see a different exception... which is the one we are getting 😂 :
However, at no point I see the Which branches are checked out in |
Yeah if I look at the context around the sovler being used in the test
conda conda/conda@598bc26e4 (main) conda-libmamba-solver 02423c3 (conda-forge-ci) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaimergp looks like all test are passing and I can confirm that all packages from the base
environment do come from conda-forge
which was the goal of this PR. I've created an issue linked above which details the test that was disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With conda/conda#12297 being merged, it might be useful to adopt the same pattern to build the test matrix via the exclude statement.
We still need conda/conda#12389 |
Added #143 to track deselected upstream tests. |
Well, we won't need to worry about that py37 error anymore because we are not supporting it anyway. See conda/conda#12436 for details. |
|
Re-running failed jobs to see if the packaging issue was fixed. |
@jezdez - can you take another look? This is ready for review / merge on my end, I think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs slight tweaks to the test matrix still, right?
.github/workflows/upstream_tests.yml
Outdated
- default-channel: 'conda-forge' | ||
python-version: '3.9' | ||
test-type: 'unit' | ||
test-group: '1' | ||
- default-channel: 'conda-forge' | ||
python-version: '3.9' | ||
test-type: 'unit' | ||
test-group: '2' | ||
- default-channel: 'conda-forge' | ||
python-version: '3.9' | ||
test-type: 'unit' | ||
test-group: '3' | ||
- default-channel: 'defaults' | ||
python-version: '3.9' | ||
test-type: 'integration' | ||
test-group: '1' | ||
- default-channel: 'defaults' | ||
python-version: '3.9' | ||
test-type: 'integration' | ||
test-group: '2' | ||
- default-channel: 'defaults' | ||
python-version: '3.9' | ||
test-type: 'integration' | ||
test-group: '3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should follow the same pattern as upstream, since this isn't testing the integration on conda-forge and not testing the unit tests on defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh god it changed again in conda/conda#12413 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know :( I thought you knew about this already, I'm sorry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad timing 😂 Sync'ed again, let's see how it goes.
Description
Checklist - did you ...
news
directory (using the template) for the next release's release notes?Comes from #120, using conda/conda#12335