-
Notifications
You must be signed in to change notification settings - Fork 1k
Command line args, --no-recurse, --shallow #1589
Comments
hi, welcome! Thanks for your interest, and the suggestion. But there needs to be considerably more detail here:
How?
In what specific stages of your pipeline would you anticipate using these flags? Adding flags like this is unlikely, at least in the short term. Any changes in this area further complicate the state machine that we use to manage the on-disk repositories, and that's a complex, highly concurrent code path - there has to be a major upside to justify the risk. Allowing control of those things via flags tends to be much worse, though, because we typically have to either record sidecar state, or infer from disk, how the on-disk repositories were managed on previous runs, and therefore what state they're in, and therefore how we interact with them at different points in the state machine. Before anything such flags can be considered, we have to exhaust the possibilities for improvement that we can utilize just from the state the system already knows. i'm pretty sure that, for example, we could detect if no local clone yet exists, and if so then fetch tarballs instead of cloning, if the host supports it (as GitHub does, via their HTTP API). That's something i'd accept contributions on - though we need #1250 in order to have the necessary info in the state machines. |
@sdboyer thanks for the quick response.
By this, I mean the stability of our build pipelines. We have submodules that are related to our frontend in our repos. These submodules, with full recursion, can be fairly large. Dep will needlessly download these submodules that are not needed to build the go code. This takes a good deal of time and is dependent on network conditions.
Shallow clones and no clone recursion can save a huge amount of bytes.
These flags would be used in all stages of our build pipeline. We changed the command context here: Line 84 in 832c144
After actually looking through the code paths to get to that execution point from the command line does seem complicated. I would tend to agree with you that there would need to be a significant reason for making this change. Few questions:
|
#795 (comment) has some good explanations why @sdboyer please consider however the use case of throw-away checkouts in stateless CI.
(*) Sorry don't have details. I'm not even sure it was dep's fault! (disabling caching was a step towards finding out but we didnt get further...) |
Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks! |
I propose:
dep should have command line args to clone without recursing and shallow.
--no-recurse
would not clone submodules--shallow
would clone with a depth of 1.Both of these options would save bytes across the wire, as well as improve build stability and speed for my team. If there is interest I will make the PR.
The text was updated successfully, but these errors were encountered: