Due to a bug in JFrog's Artifactory (https://jfrog.atlassian.net/browse/RTFACT-26808) which does not correctly support range requests, conda-store fails due to its usage of conda-package-streaming. Error is as follows:
Traceback (most recent call last):
File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_store_server/build.py", line 159, in build_conda_environment
context = action.action_fetch_and_extract_conda_packages(
File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_store_server/action/base.py", line 31, in wrapper
action_context.result = f(action_context, *args, **kwargs)
File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_store_server/action/download_packages.py", line 38, in action_fetch_and_extract_conda_packages
) = conda_package_streaming.url.conda_reader_for_url(url)
File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_package_streaming/url.py", line 76, in conda_reader_for_url
conda.prefetch(file_id)
File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_package_streaming/lazy_wheel.py", line 240, in prefetch
zf = zipfile.ZipFile(self)
File "/opt/conda/envs/conda-store-server/lib/python3.10/zipfile.py", line 1258, in init
self._RealGetContents()
File "/opt/conda/envs/conda-store-server/lib/python3.10/zipfile.py", line 1325, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
Expected behavior
Swallow exception when server does not support (or doesn't correctly support in this case) range requests and request full file instead.
How to Reproduce the problem?
Any valid enviroment.yml connected to an Artifactory server
Describe the bug
Due to a bug in JFrog's Artifactory (https://jfrog.atlassian.net/browse/RTFACT-26808) which does not correctly support range requests, conda-store fails due to its usage of conda-package-streaming. Error is as follows:
Traceback (most recent call last): File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_store_server/build.py", line 159, in build_conda_environment context = action.action_fetch_and_extract_conda_packages( File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_store_server/action/base.py", line 31, in wrapper action_context.result = f(action_context, *args, **kwargs) File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_store_server/action/download_packages.py", line 38, in action_fetch_and_extract_conda_packages ) = conda_package_streaming.url.conda_reader_for_url(url) File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_package_streaming/url.py", line 76, in conda_reader_for_url conda.prefetch(file_id) File "/opt/conda/envs/conda-store-server/lib/python3.10/site-packages/conda_package_streaming/lazy_wheel.py", line 240, in prefetch zf = zipfile.ZipFile(self) File "/opt/conda/envs/conda-store-server/lib/python3.10/zipfile.py", line 1258, in init self._RealGetContents() File "/opt/conda/envs/conda-store-server/lib/python3.10/zipfile.py", line 1325, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
Expected behavior
Swallow exception when server does not support (or doesn't correctly support in this case) range requests and request full file instead.
How to Reproduce the problem?
Any valid enviroment.yml connected to an Artifactory server
Output
No response
Versions and dependencies used.
No response
Anything else?
No response