Skip to content
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

Should "west init" run "west clone"? #52

Closed
mbolivar opened this issue Sep 25, 2018 · 8 comments
Closed

Should "west init" run "west clone"? #52

mbolivar opened this issue Sep 25, 2018 · 8 comments
Labels
performance How long things take question Further information is requested

Comments

@mbolivar
Copy link
Contributor

mbolivar commented Sep 25, 2018

Right now, installing multi-repo Zephyr takes the following steps:

$ pip install west
$ west init <west-workspace>
$ cd <west-workspace>
$ west fetch

This issue tracks whether "west init" should run "west fetch" as well after cloning west and the manifest, to eliminate the last step before a complete installation is cloned.

I am ambivalent about this idea (generally speaking I don't like to add features to the bootstrapper) but thought it was worth recording the question (and its resolution along with rationale).

Reasons for:

  • one less step during installation

Reasons against:

  • adds a feature to the bootstrapper which is not necessary
  • users might want to fetch with different options than can be passed to init, e.g. to fetch a subset of available projects
  • fetch might require different credentials than init, which might not be available at init time
@mbolivar mbolivar added the question Further information is requested label Sep 25, 2018
@mbolivar
Copy link
Contributor Author

@carlescufi @nashif @ulfalizer @tejlmand any thoughts on the above?

@tejlmand
Copy link
Collaborator

I don't think so.

Let's keep them separate, as one might do a west init, but want certain arguments to the fetch command.
As example, manifest to use or revision of manifest.

@myrdyr
Copy link

myrdyr commented Sep 27, 2018

I'm not sure if I should raise this as a separate issue or not, but it sort of touches this issue: If you have auxiliary repositories in the manifest, they might be located somewhere that needs authentication. When fetching locally on a development machine, this is usually not an issue as you can store, cache or enter credentials for the various remotes. But for CI, this quickly becomes a problem.

The CI nodes might not be trusted with all the credentials in the world, but could ask the central server for credentials on the fly, using the git tools that are built for the CI system. Normal calls to git fetch will thus wait for credentials and hang/fail in a CI context, and I would like to skip automatic fetching for this reason.

In addition, I'd be really happy if the west list-projects could print out the remotes too. This way, we could run west init, followed by west list-projects, do some cut magic on the list, then have have the CI client handle checkouts with its built-in credential mechanisms. Maybe even have an optional argument in the manifest to signal that this repository requires a manual fetch.

@carlescufi
Copy link
Member

@myrdyr
#37

@mbolivar
Copy link
Contributor Author

@tejlmand @myrdyr thanks for the feedback! I've summarized your comments in the issue description.

I think at this point it's clear that it's not worth adding, so I'm going to close this with the answer "no". We can reopen if we have a compelling reason.

@mbolivar mbolivar changed the title Should "west init" run "west fetch"? Should "west init" run "west fetch"? (Answer: no) Sep 27, 2018
ulfalizer added a commit to ulfalizer/west that referenced this issue Oct 24, 2018
This came up in zephyrproject-rtos#52.

I'm not sure what the appropriate field widths are ({:n}). We could
tweak it later if some fields turn out to be too short/long.

Fixes: zephyrproject-rtos#37

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
ulfalizer added a commit to ulfalizer/west that referenced this issue Oct 24, 2018
This came up in zephyrproject-rtos#52.

I'm not sure what the appropriate field widths are ({:n}). We could
tweak it later if some fields turn out to be too short/long.

Fixes: zephyrproject-rtos#37

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
carlescufi pushed a commit that referenced this issue Oct 26, 2018
This came up in #52.

I'm not sure what the appropriate field widths are ({:n}). We could
tweak it later if some fields turn out to be too short/long.

Fixes: #37

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
@mbolivar
Copy link
Contributor Author

Reopening with the new mental model. Should west init run west clone? (We moved away from west fetch because it created detached HEADS, which are gross).

@mbolivar mbolivar reopened this Jan 16, 2019
@mbolivar mbolivar changed the title Should "west init" run "west fetch"? (Answer: no) Should "west init" run "west clone"? Jan 16, 2019
@tejlmand
Copy link
Collaborator

I think we should keep west init and west update seperate.

Reason:
It allows users to do west init and then actually adjust west.yml to their needs if they wish so, before running west update

If users wants a one step approach, they can do:
west init; west update
or
west init && west update
depending on their platform.

@mbolivar
Copy link
Contributor Author

Alright, I'm going to close this again since we all seem to agree, or at least nobody disagrees out loud :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance How long things take question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants