-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
west update: remotes are not imported from submanifests #565
Comments
|
@marc-hb Thank you for the suggestion! I am new to |
I think "some prefer https: but others prefer ssh:" is not the most common and valid requirement. Why can't your CI use ssh? That's why I thought about "monkey patching". On the other hand, I could imagine a more common and similar requirement: mirroring. For either performance or access control. For that use case adding a layer of indirection for remotes would be useful too but my preference would be to keep the manifests "clean" and rather use something at the
I don't find that overriding remotes would be "consistent" with overriding projects. Overriding projects changes the code that gets built, that's why it involves some manifest changes. Because the purpose of the manifests is to define which code you get. But overriding remotes does not change the code at all. So you'd have a manifest change without any code change, it does not feel "consistent". If you compare with submodules for instance, these two are handled differently in totally different places. |
Actually, overriding remotes does not change SHA1s but if you use branches then overriding remotes can change the code. See related: Considering how messy this can get, "monkey patching" at the git level seems quite appropriate... what problem do you foresee with it? |
Hi and thanks for filing an issue. The decision not to inherit remotes is a deliberate design choice in west. The reason it is done this way is that you can specify a project's fetch URL in the following different ways: 1. by explicit I thought about how to treat remotes as first class objects you can inherit from sub-manifests that you import. It gets really messy and I couldn't come up with a clean set of rules for it. So the decision I made is that when you import a project, its fetch URL is completely resolved at import time. You can override the project definition in your parent manifest, but then you have to override everything about it. This leads to a bit more typing for sure, but I think the resulting mental model is cleaner. |
@marc-hb @mbolivar-nordic thank you for your explanation.
@marc-hb : Within the GitLab CI framework, private dependencies (submodules) must be referenced with a relative URL to the base "repo-path". Then GitLab pre-appends a token-authenticated base URL (HTTPS) to the relative submodule paths (see here), which has the form:
@mbolivar-nordic : that was our deduction as well. Our main problem with this was the resulting duplication and its associated risk of divergence of revisions (e.g. caused by negligence). In any case, we'll stick to the proposed solution of overriding |
Thanks for sharing Gitlab info, appreciated.
This sounds like Gitlab secrets don't support ssh keys yet, correct? I had a quick look at the docs and I also found https://gitlab.com/gitlab-org/gitlab/-/issues/235506 but I'm still not 100% sure. |
Since you have a solution and we have no plans to make remotes importable, I'm going to close this issue. Thanks again for taking the time to file it. |
We are migrating to
west
to manage our (private) project dependencies/submodules, but we are facing some difficulties integratingwest
in our GitLab CI workflow: we need to useHTTPS
remotes for CI pipelines (for authentication purposes), but we would like to keep usingSSH
locally.It would be nice if remotes could be overridden way as projects, e.g. with a
00-ci.yml
sub-manifest, included only when needed. For example:In this example, the
repo-path
formoduleA
would resolve to:[email protected]:group/moduleA.git
for local workflowshttps://gitlab.com/group/moduleA.git
for CI workflowsAt the current stage, including the
00-ci.yml
file has no effect on the remote'sbase-url
(always resolved toSSH
).The only solutions we could find are:
00-ci.yml
manifest, with a non-negligible duplication cost.sed
) of the remote's URL before runningwest update
The text was updated successfully, but these errors were encountered: