Pip install of eossr fails when installing esap-api-gateway master
Installation of the esap-api-gateway fails, with an exception during the installation of "eossr". This is the exception (reproduced by stv & mparra):
Collecting git+https://gitlab.in2p3.fr/escape2020/wp3/eossr.git@f9d9d16ad267ec9a63e1a344286642fe663b1c16
Cloning https://gitlab.in2p3.fr/escape2020/wp3/eossr.git (to revision f9d9d16ad267ec9a63e1a344286642fe663b1c16) to /tmp/pip-req-build-6by9lqn5
Running command git clone -q https://gitlab.in2p3.fr/escape2020/wp3/eossr.git /tmp/pip-req-build-6by9lqn5
Running command git checkout -q f9d9d16ad267ec9a63e1a344286642fe663b1c16
fatal: reference is not a tree: f9d9d16ad267ec9a63e1a344286642fe663b1c16
ERROR: Command errored out with exit status 128: git checkout -q f9d9d16ad267ec9a63e1a344286642fe663b1c16 Check the logs for full command output.
I tested running a pip install on a new container (python:3), and this works. The output is:
Collecting git+https://gitlab.in2p3.fr/escape2020/wp3/eossr.git@f9d9d16ad267ec9a63e1a344286642fe663b1c16
Cloning https://gitlab.in2p3.fr/escape2020/wp3/eossr.git (to revision f9d9d16ad267ec9a63e1a344286642fe663b1c16) to /tmp/pip-req-build-xox0wh6g
Running command git clone --filter=blob:none --quiet https://gitlab.in2p3.fr/escape2020/wp3/eossr.git /tmp/pip-req-build-xox0wh6g
Running command git rev-parse -q --verify 'sha^f9d9d16ad267ec9a63e1a344286642fe663b1c16'
Running command git fetch -q https://gitlab.in2p3.fr/escape2020/wp3/eossr.git f9d9d16ad267ec9a63e1a344286642fe663b1c16
Running command git checkout -q f9d9d16ad267ec9a63e1a344286642fe663b1c16
Resolved https://gitlab.in2p3.fr/escape2020/wp3/eossr.git to commit f9d9d16ad267ec9a63e1a344286642fe663b1c16
Preparing metadata (setup.py) ... done
Comparing this to the output I get when installing on my local machine:
pip install git+https://gitlab.in2p3.fr/escape2020/wp3/eossr.git@f9d9d16ad267ec9a63e1a344286642fe663b1c16
Collecting git+https://gitlab.in2p3.fr/escape2020/wp3/eossr.git@f9d9d16ad267ec9a63e1a344286642fe663b1c16
Cloning https://gitlab.in2p3.fr/escape2020/wp3/eossr.git (to revision f9d9d16ad267ec9a63e1a344286642fe663b1c16) to /tmp/pip-req-build-6by9lqn5
Running command git clone -q https://gitlab.in2p3.fr/escape2020/wp3/eossr.git /tmp/pip-req-build-6by9lqn5
Running command git checkout -q f9d9d16ad267ec9a63e1a344286642fe663b1c16
fatal: reference is not a tree: f9d9d16ad267ec9a63e1a344286642fe663b1c16
One of the differences I see is that the former runs a fetch command before the checkout. This seems to be why the second one works, and the original does not.
On my machine this works:
git clone https://gitlab.in2p3.fr/escape2020/wp3/eossr.git
git fetch -q https://gitlab.in2p3.fr/escape2020/wp3/eossr.git f9d9d16ad267ec9a63e1a344286642fe663b1c16
git checkout -q f9d9d16ad267ec9a63e1a344286642fe663b1c16
But this does not:
git clone https://gitlab.in2p3.fr/escape2020/wp3/eossr.git
git checkout -q f9d9d16ad267ec9a63e1a344286642fe663b1c16
fatal: reference is not a tree: f9d9d16ad267ec9a63e1a344286642fe663b1c16
From some of what I've read its possible that what we are seeing may be related to deleted branches:
https://stackoverflow.com/questions/65728429/git-checkout-a-branchless-commit https://stackoverflow.com/questions/57879408/impossible-to-checkout-a-git-commit
However this may be a different, but in any case I think the best way forward is to update our requirements to install the latest, since the changes that ESAP needed have been merged in anyway, and installing from a deleted branch does seem likely to cause issues.