Zenodo DOIs are not correctly identified as such and repo2docker falls back to the Git provider, failing to get the code and build the expected image.
Repo2docker builds with a Zeonodo reference get built (was working on release 2024.07.0)
$ repo2docker --debug 10.5281/zenodo.18553140
[Repo2Docker] Looking for repo2docker_config in /Users/enolfc/src/scratch/repo2/repo2docker
Retrieving dataverse installations from https://iqss.github.io/dataverse-installations/data/data.jsonPicked Git content provider.
fatal: repository '10.5281/zenodo.18553140' does not exist
Traceback (most recent call last):
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/contentproviders/git.py", line 32, in fetch
yield from execute_cmd(cmd, capture=yield_output)
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/utils.py", line 47, in execute_cmd
raise subprocess.CalledProcessError(ret, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', '--depth', '1', '10.5281/zenodo.18553140', '/var/folders/2z/l9qbw9hj6vgckxjlpsc5cnlc0000gn/T/repo2dockerv4gc8tlg']' returned non-zero exit status 128.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/enolfc/src/scratch/repo2/repo2docker/.venv/bin/repo2docker", line 10, in <module>
sys.exit(main())
~~~~^^
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/__main__.py", line 476, in main
r2d.start()
~~~~~~~~~^^
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/app.py", line 850, in start
self.build()
~~~~~~~~~~^^
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/app.py", line 738, in build
self.fetch(self.repo, self.ref, checkout_path)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/app.py", line 516, in fetch
for log_line in picked_content_provider.fetch(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
spec, checkout_path, yield_output=self.json_logs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/Users/enolfc/src/scratch/repo2/repo2docker/repo2docker/contentproviders/git.py", line 39, in fetch
raise ContentProviderException(msg) from e
repo2docker.contentproviders.base.ContentProviderException: Failed to clone repository from 10.5281/zenodo.18553140.
Bug description
Zenodo DOIs are not correctly identified as such and repo2docker falls back to the Git provider, failing to get the code and build the expected image.
The issue is related on how the
doi2url(self, doi)function works that does not return the same result for Zenodo as it used to do before.Expected behaviour
Repo2docker builds with a Zeonodo reference get built (was working on release 2024.07.0)
Actual behaviour
How to reproduce
Using repo2docker
mainbranch.