Poetry doesn't respect private repository's branch/rev in pyproject.toml #9612
Labels
area/sources
Releated to package sources/indexes/repositories
area/vcs
Related to support for VCS dependencies (Git and Dulwich)
kind/bug
Something isn't working as expected
status/triage
This issue needs to be triaged
Description
We are currently having a problem how poetry uses the private github repository's branch naming for cloning.
All the following issues are present when trying to install from a docker image, locally it works.
We use a multi-repository style structuring for our codebase and several repositories depend on each other:
utils
,database
andimage-processing
database
depends onutils
image-processing
depends ondatabase
andutils
The issue occured when we tried
poetry install
from within theimage-processing
repository.We have two branches in
database
:main
anddevelop
The only difference between the two is that while
main
uses theutils
repository as a submodule and a local path:develop
uses the github URL with branch name:When the
poetry install
command is called fromimage-processing
'sdocker build
command, we get some logs indicating where the problem happened (see Poetry Runtime Logs)It shows that it tries to run:
but it doesn't specify the branch name which was provided in the
pyproject.toml
.Because of this the git clone command will have to provide a username/password which could not be fulfilled due to being in an automated docker build.
We also tried providing a github personal access token by injecting it into the docker build as a secret and use the
git insteadof
in the git config to replace the url to use this token but it still failed because it tried to clone the submodules which required the username/password authentication for some reason.Proposed solution would be to use the
git clone
command's-b BRANCH_NAME
and preferably the--single-branch
options.Workarounds
I don't know of any workarounds
Poetry Installation Method
install.python-poetry.org
Operating System
Ubuntu 20.04.6 LTS
Poetry Version
Poetry (version 1.8.3)
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
No response
Poetry Runtime Logs
The text was updated successfully, but these errors were encountered: