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

OSX builds fail with KeyError: 'https://conda.anaconda.org/conda-forge' #41526

Closed
f0t1h opened this issue Jun 15, 2023 · 22 comments
Closed

OSX builds fail with KeyError: 'https://conda.anaconda.org/conda-forge' #41526

f0t1h opened this issue Jun 15, 2023 · 22 comments

Comments

@f0t1h
Copy link
Contributor

f0t1h commented Jun 15, 2023

22:36:43 BIOCONDA ERROR COMMAND FAILED (exited with 1): /opt/mambaforge/envs/bioconda/bin/conda mambabuild --override-channels --no-anaconda-upload -c conda-forge -c bioconda -c defaults -e /opt/mambaforge/envs/bioconda/conda_build_config.yaml -e /opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/bioconda_utils/bioconda_utils-conda_build_config.yaml recipes/tksm/meta.yaml
22:36:43 BIOCONDA ERROR STDOUT+STDERR:

Traceback (most recent call last):
  File "/opt/mambaforge/envs/bioconda/bin/conda-mambabuild", line 10, in <module>
    sys.exit(main())
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/cli/mambabuild.py", line 256, in main
    call_conda_build(action, config)
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/cli/mambabuild.py", line 228, in call_conda_build
    result = api.build(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/api.py", line 180, in build
    return build_tree(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/build.py", line 3078, in build_tree
    packages_from_this = build(metadata, stats,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/build.py", line 2038, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 787, in expand_outputs
    for (output_dict, m) in deepcopy(_m).get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/metadata.py", line 2524, in get_output_metadata_set
    conda_packages = finalize_outputs_pass(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/metadata.py", line 884, in finalize_outputs_pass
    fm = finalize_metadata(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 547, in finalize_metadata
    build_unsat, host_unsat = add_upstream_pins(m,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 387, in add_upstream_pins
    build_deps, build_unsat, extra_run_specs_from_build = _read_upstream_pin_files(m, 'build',
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 374, in _read_upstream_pin_files
    deps, actions, unsat = get_env_dependencies(m, env, m.config.variant,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/conda_build/render.py", line 131, in get_env_dependencies
    actions = environ.get_install_actions(tmpdir, tuple(dependencies), env,
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/cli/mambabuild.py", line 141, in mamba_get_install_actions
    solution = solver.solve_for_action(_specs, prefix)
    return to_action(
  File "/opt/mambaforge/envs/bioconda/lib/python3.8/site-packages/boa/core/solver.py", line 79, in to_action
    entry = lookup_dict[get_url_from_channel(c)]
KeyError: 'https://conda.anaconda.org/conda-forge'

PR: #41444
Azure log: https://dev.azure.com/bioconda/bioconda-recipes/_build/results?buildId=34916&view=logs&j=1b052f1d-4456-52f0-9d43-71c4c5bd734d&t=edc48dcd-1fc2-5e3b-7036-7be9cea00123&l=651

@bluenote-1577
Copy link
Contributor

I appear to have the same issue as well.

PR: #41525
Log: https://dev.azure.com/bioconda/bioconda-recipes/_build/results?buildId=34918&view=logs&jobId=3e927886-88a5-5ae4-09f7-f53fa1a22322&j=3e927886-88a5-5ae4-09f7-f53fa1a22322&t=577c9198-bb4c-5a92-f06b-21e420caadce

@guilledufort
Copy link
Contributor

Hi,

I'm having the same issue as well.
PR: #41553
Log

@siebrenf siebrenf added the bug label Jun 19, 2023
@siebrenf
Copy link
Member

siebrenf commented Jun 19, 2023

This issue does not affect noarch: python builds as they don't run mambabuild.
This issue does not affect all OSX builds. PR #41511 ran mambabuild successfully.

One of my tests (PR #41554) failed (log), but succeeded when limiting it to a single python version (log) (no idea why yet).

@mbhall88
Copy link
Contributor

I'm also seeing this in a Rust recipe on #41579

@raufs
Copy link
Contributor

raufs commented Jun 21, 2023

I also am seeing this issue: #41548

@gongyh
Copy link
Contributor

gongyh commented Jun 22, 2023

I also am seeing this issue: #41619

@melkebir
Copy link
Contributor

We're seeing this same issue: #41585

@mrvollger
Copy link
Contributor

I am also seeing this in: #41663

@sebschmi
Copy link
Contributor

Also happening in #41600

@nsoranzo nsoranzo changed the title OSX build fails for new recipe OSX builds fail with KeyError: 'https://conda.anaconda.org/conda-forge' Jun 26, 2023
@mboudet
Copy link

mboudet commented Jun 26, 2023

Same issue in #41659

@milot-mirdita
Copy link
Contributor

milot-mirdita commented Jun 27, 2023

I tried to understand a bit what's going on. I didn't get very far yet but maybe its a hint.

I installed bioconda-utils locally and ran it. I am running on an ARM mac with CONDA_SUBDIR=osx-64 set.

The key that exist in the boa lookup_dict is https://conda.anaconda.org/conda-forge/osx-64. While the requested key is https://conda.anaconda.org/conda-forge.

After adding the debug statements I tried to update to boa 0.15.1, which first didn't work because it was trying to download the following file:
https://conda.anaconda.org/conda-forge/mamba-1.4.2-py38h2cdcfb1_0.conda
instead of:
https://conda.anaconda.org/conda-forge/osx-64/mamba-1.4.2-py38h2cdcfb1_0.conda

This seems a rather similar symptom.

I deleted the package cache and it could install boa 0.15.1 successfully. However, this version immediately segfaults.

These are my current findings, not sure what to make out of these. Somewhere/something seems to contain the wrong channel url without the OS subdir.

Edit: I reinstalled and now I only get the following error:

Error: bad character '*' in package name dependency '*'

I don't make it to the key error anymore.

@raufs
Copy link
Contributor

raufs commented Jun 27, 2023

Not a detailed investigation like @milot-mirdita - but I also wanted to share some info on this issue - I was able to "overcome" checks not passing for OSx build by adding >=3 to the python listing in the host subsection of requirements in my recipe; however, while checks pass - no build is generated - even after merging. Fetching artifacts does not return any builds on linux or OSx with this either.

However, if I remove the >=3 requirement in the python listing in the host subsection of requirements, I am able to get a successful linux build when asking Bioconda to fetch artifacts. But OSx check fails and obviously no build for it. Hope this is somewhat helpful.

Logging of these tests can be found here: #41688

@milot-mirdita
Copy link
Contributor

milot-mirdita commented Jun 27, 2023

I was playing a bit more with this. Still don't understand where the wrong(?) channel name comes from. But if I add a hack to boa's solver.py I can get the build to proceed locally:

def to_action(specs_to_add, specs_to_remove, prefix, to_link, to_unlink, index):
    to_link_records = []

    prefix_data = PrefixData(prefix)
    final_precs = IndexedSet(prefix_data.iter_records())

    lookup_dict = {}
    for _, entry in index:
        lookup_dict[
                entry["channel"].platform_url(entry["platform"], with_credentials=False)
        ] = entry
+        if entry["url"].replace("/osx-64", "") != entry["url"]:
+            lookup_dict[entry["url"].replace("/osx-64", "")] = entry

The name error (package name dependency) I mentioned, is a separate and probably unrelated issue on my mac. Not sure why that happens locally, but the perl build dependency in the recipe I was testing (foldseek) was causing the issue. It seems like perl introduces a weird dependency that includes *_perl5 which dies somewhere deep in conda-build.

I tried to track down how to_link is built, but ended up in the guts of the libmamba C++ code and didn't feel like spelunking further.

@skoren
Copy link
Contributor

skoren commented Jun 28, 2023

Also in #41724. Any updates or fixes? This has been an issue for weeks now. Between this and the fact that my previously working recipe was broken by maintenance changes and blacklisted last month, it seems bioconda has become a bit unreliable.

@mbhall88
Copy link
Contributor

Any updates @bioconda/core?

bgruening pushed a commit that referenced this issue Jun 29, 2023
* update version to 1.4

* Reset build number

* remove from blacklist

* update tests to report failed logs

* explicitly add perl

* See if a specific python version works, issue #41526 again

* Python explicit version made no difference, try versioning rust?

* give up on osx build until CI bug is fixed
@bernt-matthias
Copy link
Contributor

Seems that the python >=3 workaround does not help (in general). In #41672 there is no python requirement.

@dpryan79
Copy link
Contributor

I suspect the cases where adding >=3 prevents this are cases where the wrong packages are then getting built. I honestly haven't had a chance to track this down. I've been hoping that one of the other core members would pop into this thread with the solution to this issue, but I suspect we'll have to open an issue with boa/libmamba and get the author's help there.

@dpryan79
Copy link
Contributor

Xref: mamba-org/boa#350

@skoren
Copy link
Contributor

skoren commented Jun 29, 2023

Thanks for the info @dpryan79. Sounds like an updated mamba release should fix that when it is ready.

@johanneskoester
Copy link
Contributor

This is now fixed with the update to bioconda-utils 2.3.2 which uses boa 0.15.

@johanneskoester
Copy link
Contributor

For those of you who have circumvented the issue by deactivating the osx build, it would be great if you could enable them again in follow-up PRs! Thanks a lot! It is always great to see how active the bioconda community is!

kbseah added a commit to kbseah/bioconda-recipes that referenced this issue Jun 29, 2023
Previously skipped because of issue bioconda#41526 which has been resolved
kbseah added a commit to kbseah/bioconda-recipes that referenced this issue Jun 29, 2023
Previously skipped because of issue bioconda#41526, now resolved
kbseah added a commit to kbseah/bioconda-recipes that referenced this issue Jun 29, 2023
Previously skipped because of issue bioconda#41526, now resolved
f0t1h added a commit to f0t1h/bioconda-recipes that referenced this issue Jun 29, 2023
Resume osx build for recipe TKSM
Previously skipped because of issue bioconda#41526 which has been resolved
f0t1h added a commit to f0t1h/bioconda-recipes that referenced this issue Jun 30, 2023
Previously skipped because of issue bioconda#41526 which has been resolved
tmaklin added a commit to tmaklin/bioconda-recipes that referenced this issue Jul 1, 2023
tkaragianes added a commit to tkaragianes/bioconda-recipes that referenced this issue Sep 8, 2023
The OSX build is currently failing with a KeyError like in
bioconda#41526. I
thought this issue was resolved (maybe a reversion?). For now,
I'm disabling the OSX build (and removing the windows build skip
since the bioconda pipeline doesn't build for Windows).
@marcelm
Copy link
Contributor

marcelm commented Sep 8, 2023

This seems to have re-appeared in the following PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests