[openstack-dev] [pbr] Git submodules support
gaetan at xeberon.net
Tue Dec 19 21:21:09 UTC 2017
> * But once in the docker build, PBR complains about not getting access to*
> * upstream GIT. And it is true: the git tree (with dependencies) has been*
> * checkedout by gitlab and the docker build (running in a gitlab runner)
> does*>* not give access to the repository, because it is not required.*
> Is the issue here that submodules somehow cause PBR to need access to
> upstream git repositories or is the installation process not including the
> .git directories for repositories and only including their checked out
> state? PBR should work with local git repository checkouts without needing
> to talk to any remotes/upstreams.
I am pretty sure there is the .git in the submodules, and indeed it
only occurs on the submodules, not on the main module that also uses
pbr. Maybe a side effect of using git submodules with pbr. But, if you
tell me this is not normal for PBR to try to connect to upstream git
if all the .git directory (of the submodules) are here, i'll try to
debug it and see what's wrong.
> *The other solution might be to allow pbr to NOT have git upstream access
> *>* in _get_version_from_git.
> At least without submodules this shouldn't be required.
Yes, on the main module, PBR is happy. Only on the submodules
> Without submodules you only need access to the local git repository and not any remotes. I think this behavior is desireable and if we can have that behavior with submodules as well that is probably a good improvement to make.
Roger, I'll debug it.
> *I will open another thread on this ML if*>
> * you agree, when my unit tests will pass, but i will not be able to do it*
> >* until net year.*
> Adding pipfile support seems like an excellent thing to add considering
> people are trying to use pipfile and pbr together now.
Great, I am happy to ear it. Can you give an eye to my first draft?
The main issue i can see it that I had to copy toml parser and pipfile
parser from external projects, I don't know if there will be any
policy against it in PBR (or licence compatibility issue, ...).
>* Also, I maintain a fork a pbr "pbrlgs" (
> *>* https://github.com/Stibbons/pbr/tree/pbrlgs <https://github.com/Stibbons/pbr/tree/pbrlgs>) that makes PBR happy with git
> *>* submodules.
> *Are these improvements something that should be upstreamed as well?
It is basically HEAD of PBR + my pipfile patch + my git submodules
environment variables hack. Of course it is not intended to be kept
alive if PBR merges my contributions. But we use it in production now:
- pipfile patch allows PBR to install the dependencies of a dependency
that uses a Pipfile
- env var patch makes pbr happy with submodules in our docker environment.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev