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

use-only-tar-bz2: true for package cache results in error "nothing provides requested" #267

Open
scottyhq opened this issue Dec 6, 2022 · 9 comments
Assignees

Comments

@scottyhq
Copy link

scottyhq commented Dec 6, 2022

I just spent a lot of time getting to the bottom of the following issue that showed up last week with v2 of this action, originally I thought it had to do with v2.1 -> v2.2 but this comment in a separate issue from @bollwyvl seems to hold the answer!

unless specifically overridden per-feedstock, conda-forge now now only generates .conda files (conda-forge/conda-forge.github.io#1586) if you've configured use-only-tar-bz2: true for caching in the workflow, it's not going to find any new packages.

Encountered problems while solving:
  - nothing provides requested apache-beam-with-gcp 2.43.0**

It's not clear to me from readme alone why use-only-tar-bz2: true is necessary for caching to work properly? I suspect this will come up quite a bit if new package versions don't have a .tar.gz, so if there is no easy technical solution for caching .conda files a note in the readme.md would be helpful.

@goanpeca
Copy link
Member

goanpeca commented Dec 13, 2022

@scottyhq thanks for raising the issue. When the action was created some time ago, the packages downloaded by conda when using the .conda format where being always redownloaded, that is why the use-only-tar-bz2: true was necessary.

I have not tested (will create a new test to check this) but maybe more recent versions of conda have fixed this issue

@jezdez do you know if this is still the case?

Thanks!

@michaelosthege
Copy link

Heads-up: Since conda-forge recently changed their defaults, more and more packages are no longer available as *.tar.bz2 artifacts, including for example numpy >=1.23.5.

When the action was created some time ago, the packages downloaded by conda when using the .conda format where being always redownloaded, that is why the use-only-tar-bz2: true was necessary.

I'm going to try use-only-tar-bz2: true in pymc-devs/pymc#6431 but how can I diagnose if caching of .conda artficats works as it should?

@xylar
Copy link

xylar commented Feb 12, 2023

Yes, also seeing this problem. It would be nice to know if no longer using use-only-tar-bz2: true is safe with caching.

@michaelosthege
Copy link

michaelosthege commented Feb 12, 2023

Yes, also seeing this problem. It would be nice to know if no longer using use-only-tar-bz2: true is safe with caching.

It is safe for installation, but users must update to recent conda/mamba versions.
My base env for example was still on Python 3.7 and could not update to recent conda/mamba versions supporting .conda artifacts.

For caching I don't know.

@xylar
Copy link

xylar commented Feb 12, 2023

Thank you, that's helpful. I imagine python 3.7 will become increasingly hard to support because conda-forge is no longer building for it.

@ctb
Copy link

ctb commented May 9, 2024

Maybe related (and similar to scientificcomputing/mpi-tutorial#23 I think) - with use-only-tar-bz2 set to true, I was unable to install rust pinned to 1.75.0 (on conda-forge, with linux-64) because it wasn't showing up in the catalog (with mamba search). Setting use-only-tar-bz2 to false made the install work.

bluegenes added a commit to sourmash-bio/sourmash_plugin_directsketch that referenced this issue May 9, 2024
Fix broken CI, following sourmash-bio/sourmash_plugin_branchwater#325

> Fix broken CI. Among other things,`actions-rs` is unmaintained per actions-rs/toolchain#216. I think the original breakage might have been occasioned by the runner image for ubuntu-latest being updated about two weeks ago ([link](https://github.com/actions/runner-images/blob/ubuntu22/20240422.1/images/ubuntu/Ubuntu2204-Readme.md)).

A laundry list of problems to fix seems to have boiled down to:
* don't mix rustup installs with conda installs;
* if you're going to use conda-incubator/setup-miniconda, do not set `use-only-tar-bz2` to true (conda-incubator/setup-miniconda#267 (comment))
@jezdez
Copy link
Member

jezdez commented May 10, 2024

@goanpeca @dbast Do you have a suggestion how to proceed with this? It sounds like we want to more aggressively discourage the use of use-only-tar-bz2 given the existence of the more modern .conda files, and in case of conda-forge the lack of support in the first place.

What is the reason for the following statement?

use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!

@xylar
Copy link

xylar commented May 10, 2024

Yes, I don't think conda environments will work with use-only-tar-bz2 anymore. Many, many conda-forge packages are only available as .conda files.

@goanpeca
Copy link
Member

@jezdez at some point in the past when testing caching for this action, when packages where .conda files, conda (at that moment) was redownloading everything, no matter that the pkg_dirs folder containing the .conda files was there.

I have not recently checked if this still the case. If it is not, then we can update those instructions, or even deprecate that flag on the action

@goanpeca goanpeca self-assigned this May 24, 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

No branches or pull requests

6 participants