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

fetch_repodata_remote_request raises RepodataOnDisk exception #13595

Closed
2 tasks done
Tracked by #13486
mcg1969 opened this issue Feb 15, 2024 · 5 comments · Fixed by #13596
Closed
2 tasks done
Tracked by #13486

fetch_repodata_remote_request raises RepodataOnDisk exception #13595

mcg1969 opened this issue Feb 15, 2024 · 5 comments · Fixed by #13596
Assignees
Labels
severity::1 blocker; broken functionality with no workaround source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type
Milestone

Comments

@mcg1969
Copy link
Contributor

mcg1969 commented Feb 15, 2024

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

The fetch_repodata_remote_request was deprecated in 23.9, and is scheduled for removal in conda 24.3. Unfortunately, it it seems that it is now broken:

>>> from conda.core.subdir_data import fetch_repodata_remote_request
>>> fetch_repodata_remote_request('https://repo.anaconda.com/pkgs/main/linux-64', None, None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/mgrant/miniconda3/lib/python3.11/site-packages/conda/deprecations.py", line 71, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mgrant/miniconda3/lib/python3.11/site-packages/conda/core/subdir_data.py", line 560, in fetch_repodata_remote_request
    raw_repodata_str = subdir._repo.repodata(cache_state)  # type: ignore
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mgrant/miniconda3/lib/python3.11/site-packages/conda/gateways/repodata/jlap/interface.py", line 54, in repodata
    self.repodata_parsed(state)
  File "/Users/mgrant/miniconda3/lib/python3.11/site-packages/conda/gateways/repodata/jlap/interface.py", line 121, in repodata_parsed
    raise RepodataOnDisk()
conda.gateways.repodata.RepodataOnDisk

Conda Info

active environment : base
    active env location : /Users/mgrant/miniconda3
            shell level : 1
       user config file : /Users/mgrant/.condarc
 populated config files : /Users/mgrant/.condarc
          conda version : 24.1.1
    conda-build version : 3.28.3
         python version : 3.11.7.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.1.1=0
                          __osx=14.3=0
                          __unix=0=0
       base environment : /Users/mgrant/miniconda3  (writable)
      conda av data dir : /Users/mgrant/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/mgrant/miniconda3/pkgs
                          /Users/mgrant/.conda/pkgs
       envs directories : /Users/mgrant/miniconda3/envs
                          /Users/mgrant/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.1.1 requests/2.31.0 CPython/3.11.7 Darwin/23.3.0 OSX/14.3 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.6 aau/0.4.3
                UID:GID : 502:20
             netrc file : None
           offline mode : False

Conda Config

==> /Users/mgrant/.condarc <==
anaconda_anon_usage: True

Conda list

No response

Additional Context

No response

@mcg1969 mcg1969 added the type::bug describes erroneous operation, use severity::* to classify the type label Feb 15, 2024
@jezdez jezdez added source::anaconda created by members of Anaconda, Inc. severity::1 blocker; broken functionality with no workaround labels Feb 15, 2024
@jezdez
Copy link
Member

jezdez commented Feb 15, 2024

Thanks for the report @mcg1969! This seems to be a regression introduced while JLAP has been integrated into the repodata interfaces.

@dholth Seems like repodata isn't returning the cached repodata string at all? Let's prepare this for a patch release.

@jezdez jezdez added this to the 24.1.0 milestone Feb 15, 2024
@dholth
Copy link
Contributor

dholth commented Feb 15, 2024

This should also be avoidable by setting --no-repodata-use-zst. We can override that setting as part of a patched fetch_repodata_remote_request.

@mcg1969
Copy link
Contributor Author

mcg1969 commented Feb 15, 2024

While working on the patch, I'd appreciate if we can clarify the deprecation commentary better to describe more fully how to replace fetch_repodata_remote_request. The comments point to the class conda.core.subdir_data.SubdirData, but provide no further guidance on what methods to call. Then again, if the fixed fetch_repodata_remote_request is cleanly implemented that will be its own documentation!

@dholth
Copy link
Contributor

dholth commented Feb 15, 2024

subdir = SubdirData(Channel(url), repodata_fn=repodata_fn)
fetcher = subdir.repo_fetch
repodata, state = fetcher.fetch_latest_parsed()

@kenodegard kenodegard mentioned this issue Feb 15, 2024
56 tasks
@kenodegard
Copy link
Contributor

Fixed in #13596, to be included in conda 24.1.2 patch release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity::1 blocker; broken functionality with no workaround source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants