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

Fixing recent CI failures since 23.3.0 release #187

Merged
merged 10 commits into from
Apr 21, 2023
Merged

Conversation

costrouc
Copy link
Contributor

@costrouc costrouc commented Apr 14, 2023

Investigates #186

There are several failures in CI that occurred at the same time this is a PR to resolve those issues.

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Apr 14, 2023
@@ -1,4 +1,5 @@
# Copyright (C) 2019 QuantStack and the Mamba contributors.
# Copyright (C) 2022 Anaconda, Inc
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jaimergp and @jezdez is it appropriate to add this line since I checked the git blame history and @jaimergp did make modifications after the QuantStack/Mamba work. I also excluded this file since it was causing precommit to fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's ok :)

@costrouc
Copy link
Contributor Author

costrouc commented Apr 14, 2023

Diving into one of the CI tests which is failing

CONDA_SOLVER=libmamba pytest /opt/conda-src/tests/core/test_solve.py::test_force_remove_1

I can verfiy this passes without the conda solver being specified and using classic. This test looks like it is failing for older versions of conda-libmamba-solver ... leading me to think this may have to do with libmamba. Looking into.

The versions of things:

conda origin/main
conda-libmamba-solver origin/main
libmamba                  1.4.2                hcea66bb_0    conda-forge
libmambapy                1.4.2           py310h1428755_0    conda-forge

I tried the test with libmamba 1.4.1 and it passes. Here is my environment now that I can sudo /opt/conda/bin/conda install libmambapy==1.4.1 --solver=libmamba.

$ conda info
     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /home/test_user/.condarc
 populated config files : /opt/conda/.condarc
          conda version : 0.0.0.dev0+placeholder
    conda-build version : 3.24.0
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=6.1.15=0
                          __unix=0=0
       base environment : /opt/conda  (read only)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /opt/conda/pkgs
                          /home/test_user/.conda/pkgs
       envs directories : /home/test_user/.conda/envs
                          /opt/conda/envs
               platform : linux-64
             user-agent : conda/0.0.0.dev0+placeholder requests/2.28.2 CPython/3.10.10 Linux/6.1.15 debian/11 glibc/2.31
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False

(base) test_user@2eb23210041c:/opt/conda-src$ conda config --set solver libmamba
(base) test_user@2eb23210041c:/opt/conda-src$ conda info

     active environment : base
    active env location : /opt/conda
            shell level : 1
       user config file : /home/test_user/.condarc
 populated config files : /opt/conda/.condarc
                          /home/test_user/.condarc
          conda version : 0.0.0.dev0+placeholder
    conda-build version : 3.24.0
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.31=0
                          __linux=6.1.15=0
                          __unix=0=0
       base environment : /opt/conda  (read only)
      conda av data dir : /opt/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /opt/conda/pkgs
                          /home/test_user/.conda/pkgs
       envs directories : /home/test_user/.conda/envs
                          /opt/conda/envs
               platform : linux-64
             user-agent : conda/0.0.0.dev0+placeholder requests/2.28.2 CPython/3.10.10 Linux/6.1.15 debian/11 glibc/2.31 solver/libmamba conda-libmamba-solver/23.3.1.dev8+g006b977 libmambapy/1.4.1
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False

Going to repeat for testing purposes. I may restrict in CI the libmamba version for testing purposes.

Tested several times and the tests indeed pass in 1.4.1 libmamba but not 1.4.2.

Between commits:

Compare mamba-org/mamba@libmambapy-1.4.1...libmambapy-1.4.2

@costrouc costrouc changed the title Adding incomplete news Fixing recent CI failures since 23.4.1 release Apr 14, 2023
@costrouc
Copy link
Contributor Author

I can reproduce

CONDA_SOLVER=libmamba pytest tests/cli/test_main_clean.py::test_clean_all_mock_lstat

Getting the following error

FAILED tests/cli/test_main_clean.py::test_clean_all_mock_lstat[False] - AssertionError: assert 'WARNING:' in ''

These are the lines https://github.com/conda/conda/blob/main/tests/cli/test_main_clean.py#L326-L327

@costrouc
Copy link
Contributor Author

costrouc commented Apr 14, 2023

I cannot reproduce

CONDA_SOLVER=libmamba pytest tests/core/test_subdir_data.py::test_state_is_not_json

or

CONDA_SOLVER=libmamba pytest tests/test_activate.py::ShellWrapperIntegrationTests::test_dash_basic_integration

@costrouc
Copy link
Contributor Author

costrouc commented Apr 14, 2023

So to summarize:

  • several tests are failing due to libmambapy 1.4.1 -> 1.4.2 see Fixing recent CI failures since 23.3.0 release #187 (comment) for summary
  • tests/cli/test_main_clean.py::test_clean_all_mock_lstat[False] is failing (unsure exactly why at the moment but can reproduce)
  • tests/core/test_subdir_data.py::test_state_is_not_json is failing but cannot reproduce
  • tests/test_activate.py::ShellWrapperIntegrationTests::test_dash_basic_integration is failing but cannot reproduce

@wolfv
Copy link

wolfv commented Apr 15, 2023

Any clues what is going wrong / what changed in libmamba?

@jaimergp
Copy link
Contributor

jaimergp commented Apr 15, 2023

Good job with the research, @costrouc! A new libmamba release behind the errors makes sense, given how it doesn't affect defaults (1.4.2 not released there yet)

Looking at the changelog, these would be the PRs that touched solver code:

Those are significant changes so I can't tell right away what could be the cause.

@jaimergp jaimergp changed the title Fixing recent CI failures since 23.4.1 release Fixing recent CI failures since 23.3.0 release Apr 15, 2023
@jaimergp
Copy link
Contributor

CONDA_SOLVER=libmamba pytest tests/test_activate.py::ShellWrapperIntegrationTests::test_dash_basic_integration

This one is known to be flaky so it fails here and there, no worries.

@jaimergp
Copy link
Contributor

Given that we have other work in the pipeline blocked by this, and the failing tests are not core issues (kind of edge cases), I'd say we annotate them in our meta-issue and mark them as xfail or skipif with a condition for libmamba==1.4.2.

@jaimergp
Copy link
Contributor

More data:

  • tests/cli/test_main_clean.py::test_clean_all_mock_lstat[False]. Fixed. We had some strange logic for json/quiet/verbose combos that didn't work for this particular test.
  • tests/core/test_subdir_data.py::test_state_is_not_json only fails on Windows? 🤔
  • tests/test_activate.py::ShellWrapperIntegrationTests::test_dash_basic_integration is working now.

@jaimergp
Copy link
Contributor

Cannot reproduce tests/core/test_subdir_data.py::test_state_is_not_json on the Windows VM either :/

@jaimergp jaimergp mentioned this pull request Apr 18, 2023
3 tasks
@jaimergp jaimergp merged commit 9e1c9d2 into main Apr 21, 2023
@jaimergp jaimergp deleted the bug-ci-failures-23-4-23 branch April 21, 2023 11:19
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants