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

Remove defaults channel #153

Closed
wants to merge 4 commits into from
Closed

Remove defaults channel #153

wants to merge 4 commits into from

Conversation

leehart
Copy link
Collaborator

@leehart leehart commented Oct 18, 2024

No description provided.

@leehart
Copy link
Collaborator Author

leehart commented Oct 18, 2024

Currently raisingEnvironmentLocationNotFound 🤔

[mgenv] installing packages
[mgenv] install conda
Channels:
 - conda-forge
 - bioconda
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/runner/work/mgenv/mgenv/deps/conda

  added / updated specs:
    - conda-libmamba-solver


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |      conda_forge           3 KB  conda-forge
    _openmp_mutex-4.5          |            2_gnu          23 KB  conda-forge
    ca-certificates-2024.8.30  |       hbcca054_0         155 KB  conda-forge
    certifi-2024.8.30          |     pyhd8ed1ab_0         160 KB  conda-forge
    conda-24.9.2               |  py312h7900ff3_0         1.1 MB  conda-forge
    conda-libmamba-solver-24.9.0|     pyhd8ed1ab_0          41 KB  conda-forge
    libexpat-2.6.2             |       h59595ed_0          72 KB  conda-forge
    libgcc-14.2.0              |       h77fa898_1         829 KB  conda-forge
    libgcc-ng-14.2.0           |       h69a702a_1          53 KB  conda-forge
    libgomp-14.2.0             |       h77fa898_1         450 KB  conda-forge
    libnsl-2.0.1               |       hd590300_0          33 KB  conda-forge
    libsqlite-3.46.0           |       hde9e2c9_0         845 KB  conda-forge
    libuuid-2.38.1             |       h0b41bf4_0          33 KB  conda-forge
    libxcrypt-4.4.36           |       hd590300_1          98 KB  conda-forge
    libzlib-1.2.13             |       h4ab18f5_6          60 KB  conda-forge
    openssl-3.3.2              |       hb9d3cd8_0         2.8 MB  conda-forge
    python-3.12.2              |hab00c5b_0_cpython        30.8 MB  conda-forge
    python_abi-3.12            |          5_cp312           6 KB  conda-forge
    zlib-1.2.13                |       h4ab18f5_6          91 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        37.6 MB

The following NEW packages will be INSTALLED:

  libexpat           conda-forge/linux-64::libexpat-2.6.2-h59595ed_0 
  libgcc             conda-forge/linux-64::libgcc-14.2.0-h77fa898_1 
  libnsl             conda-forge/linux-64::libnsl-2.0.1-hd590300_0 
  libsqlite          conda-forge/linux-64::libsqlite-3.46.0-hde9e2c9_0 
  libxcrypt          conda-forge/linux-64::libxcrypt-4.4.36-hd590300_1 
  libzlib            conda-forge/linux-64::libzlib-1.2.13-h4ab18f5_6 
  python_abi         conda-forge/linux-64::python_abi-3.12-5_cp312 

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2024.7.2-h~ --> conda-forge::ca-certificates-2024.8.30-hbcca054_0 
  certifi            pkgs/main/linux-64::certifi-2024.7.4-~ --> conda-forge/noarch::certifi-2024.8.30-pyhd8ed1ab_0 
  conda              pkgs/main::conda-24.7.1-py312h06a4308~ --> conda-forge::conda-24.9.2-py312h7900ff3_0 
  conda-libmamba-so~ pkgs/main::conda-libmamba-solver-24.7~ --> conda-forge::conda-libmamba-solver-24.9.0-pyhd8ed1ab_0 
  libgcc-ng          pkgs/main::libgcc-ng-11.2.0-h1234567_1 --> conda-forge::libgcc-ng-14.2.0-h69a702a_1 
  libgomp              pkgs/main::libgomp-11.2.0-h1234567_1 --> conda-forge::libgomp-14.2.0-h77fa898_1 
  libuuid              pkgs/main::libuuid-1.41.5-h5eee18b_0 --> conda-forge::libuuid-2.38.1-h0b41bf4_0 
  openssl              pkgs/main::openssl-3.0.14-h5eee18b_0 --> conda-forge::openssl-3.3.2-hb9d3cd8_0 
  zlib                    pkgs/main::zlib-1.2.13-h5eee18b_1 --> conda-forge::zlib-1.2.13-h4ab18f5_6 

The following packages will be SUPERSEDED by a higher-priority channel:

  _libgcc_mutex           pkgs/main::_libgcc_mutex-0.1-main --> conda-forge::_libgcc_mutex-0.1-conda_forge 
  _openmp_mutex          pkgs/main::_openmp_mutex-5.1-1_gnu --> conda-forge::_openmp_mutex-4.5-2_gnu 
  python                pkgs/main::python-3.12.4-h5148396_1 --> conda-forge::python-3.12.2-hab00c5b_0_cpython 



Downloading and Extracting Packages: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Python 3.12.2
conda 24.9.2
# packages in environment at /home/runner/work/mgenv/mgenv/deps/conda:
#
# Name                    Version                   Build  Channel

conda-libmamba-solver     24.9.0             pyhd8ed1ab_0    conda-forge
EnvironmentLocationNotFound: Not a conda environment: /home/runner/work/mgenv/mgenv/deps/conda/envs/mgenv-5aba65e

Error: Process completed with exit code 1.

@ahernank
Copy link
Collaborator

@leehart haven't had a chance to properly think about this one, but just saw in https://github.com/wtsi-hgi/conda-audited that they add the nodefaults channel instead, might be an alternative? Seems to be equivalent to --override-channels.

@leehart
Copy link
Collaborator Author

leehart commented Nov 4, 2024

Thanks @ahernank . Judging from https://stackoverflow.com/questions/67695893/how-do-i-completely-purge-and-disable-the-default-channel-in-anaconda-and-switch
it looks like nodefaults might only be applicable to the channels list in the YAML, but here we're creating the YAML files using conda create, so the --override-channels arg seems appropriate. I haven't tried it yet though!

In this context, I suppose we could try something like:

CHANNEL_OPTS="--channel conda-forge --channel bioconda --channel nodefaults"

Judging from the docs https://docs.conda.io/projects/conda/en/4.6.1/user-guide/tasks/manage-environments.html I would expect it to either raise an error (e.g. "channel nodefaults not found") or result in the same behaviour as using --override-channels without defaults, which would seem to be the conventional approach. I'll see what happens, but it would feel a bit hacky and unsatisfactory if it works!

I suspect there might be a simple reason for EnvironmentLocationNotFound being raised here, when we just take out the defaults channel, but I'm still a bit puzzled.

@leehart
Copy link
Collaborator Author

leehart commented Nov 4, 2024

Tests via #154 seem to suggest some other cause of EnvironmentLocationNotFound that is unrelated to the removal of the defaults channel, and also convinces me that nodefaults wouldn't be applicable here.

I suspect that just removing the defaults channel in the conventional way will work once we debug the EnvironmentLocationNotFound error.

@leehart
Copy link
Collaborator Author

leehart commented Nov 4, 2024

I'm tempted to try just a standard update of the malariagen_data package in a new PR, while removing the defaults channel, because this process usually works when we are making that sort of change.

@leehart
Copy link
Collaborator Author

leehart commented Nov 4, 2024

EnvironmentLocationNotFound happens in the context of package upgrade too, PR #156

I suppose it's either one of the changes in the PR or something different about the CI environment, e.g. the resources being pulled down by install-conda.sh. It was evidently working at the end of September, i.e. PR #150

@leehart
Copy link
Collaborator Author

leehart commented Nov 4, 2024

I've confirmed that simply removing the pinned files and attempting to upgrade a package (as usual, without changing any channels) results in the same error, which I've logged as issue #158.

@leehart leehart closed this Nov 15, 2024
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