Closed
Bug 1161909
Opened 11 years ago
Closed 8 years ago
[B2G][Build] Adopt shallow cloning in B2G repo
Categories
(Firefox OS Graveyard :: GonkIntegration, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: gweng, Unassigned)
Details
Attachments
(3 files)
Currently |repo init && repo sync| always suffers, especially when you're not using MoCo network. I've tried several times at different locations, that the networks are totally fine to clone other git repors, but when |repo init && repo sync| while building B2G, it usually failed and need to retry manually several times (#1). Even without the failures, to clone all histories that user may never use it, also takes too long to complete (#2).
I think the issue could be solved by add some auto-retry mechanism in the |config.sh| script, so we could solve issue#1. And if we add a shallow cloning option to prevent cloning all histories, we could greatly reduce the time it takes to solve the issue#2.
I have already do some experiments and it works well. Before I submit the patch, I want to know owners' opinion about this. So I would do some NI.
(And I put it in general component since I don't find a Build component for B2G. Should we fire a component and a module for it? Since even B2G repo is simple than Gecko/Gaia build system, it still a standalone feature).
| Reporter | ||
Comment 1•11 years ago
|
||
NI Michael since from the history the config.sh is originally and majorly contributed by him.
Flags: needinfo?(mwu)
| Reporter | ||
Comment 2•11 years ago
|
||
Hi, this is a WIP patch. Since I don't know how to and where to test the B2G build system, I tested them all on my local console, manually. So I set feedback first rather than review.
I've do some changes to the file:
1. organize all features in functions, so it's easier to test and debug them
2. add --shallow option
3. add --retry <Num> option
4. pull all functions from |config.sh|, which is the main script, and put them in the new library file.
I still don't know who is the proper reviewer/owner for the B2G repo build system, so I set it as Bugzilla suggested me.
Attachment #8602174 -
Flags: feedback?(fabrice)
| Reporter | ||
Updated•11 years ago
|
Attachment #8602174 -
Flags: feedback?(21)
Updated•11 years ago
|
Attachment #8602174 -
Flags: feedback?(mwu)
Attachment #8602174 -
Flags: feedback?(fabrice)
Attachment #8602174 -
Flags: feedback?(21)
Updated•11 years ago
|
Component: General → GonkIntegration
Comment 3•11 years ago
|
||
Too many changes. Focus on one thing at a time. Shallow cloning should be optional. Auto retry isn't interesting - we just want reliable mirrors. What mirrors are you having problems with?
Flags: needinfo?(mwu)
| Reporter | ||
Comment 4•11 years ago
|
||
Yes, I showed somewhat too far changes in this version, since I also wish to know your opinions about if in the future I do some isolation & rearrangement for |config.sh| (while you can see I almost keep all statements as the same, just to put them in functions, and to rename some variables to make them meaingful), approach like this is acceptable or not. I'm not going to land such many changes at one time. And according to your comment, I would submit a |--shallow| version first.
The mirroring issue is somewhat ghost-like. Since at different times it may just go well or get broken. Even with the latest master and I were sure it's just finished one session perfectly, I could still encounter lots of 404 errors, connection reset by peer, and sometimes it just cloned to some progress and got totally stock, like hanging at (66/138). Most of these, in my experiences, could be solved by retrying it several times. However, I know it should be solved completely by mirroring them. So if you want I could start to do some statics to collect the data and report which parts are most unstable. I mentioned that to add this function is because to do mirroring and other things are apparently beyond do some code change, and I don't know how to make that happens (compare to a patch).
By the way, how could I test the patch? From the past landed commits and comments on Bugzilla I didn't find any words about test. Since it has no Travis as well, does I only need to check the result is backing out or not on inbound?
| Reporter | ||
Comment 5•11 years ago
|
||
As I mentioned, this is the small and only change one option version.
Changes:
- Add one flag to control whether it should generate |--depth=1| option for |repo init|
Attachment #8602458 -
Flags: review?(mwu)
| Reporter | ||
Updated•11 years ago
|
Attachment #8602174 -
Attachment description: Patch rev1 → Proposal
Attachment #8602174 -
Flags: feedback?(mwu)
| Reporter | ||
Updated•11 years ago
|
Summary: [B2G][Build] Add auto retry and a --shallow option to boost cloning repos → [B2G][Build] Add a --shallow option to boost cloning repos
| Reporter | ||
Comment 6•11 years ago
|
||
Since from the discussion at dev-b2g:
https://groups.google.com/forum/#!topic/mozilla.dev.b2g/MSC7JsJDLHg
There are some reasonable opinions supports to set the shallow cloning as the *default* option, I would submit a version for that. And maybe Michael could give some opinions to see what is reasonable.
| Reporter | ||
Updated•11 years ago
|
Summary: [B2G][Build] Add a --shallow option to boost cloning repos → [B2G][Build] Adopt shallow cloning in B2G repo
| Reporter | ||
Updated•11 years ago
|
Assignee: nobody → gweng
| Reporter | ||
Comment 7•11 years ago
|
||
In this patch I set the default one |repo init| with 'depth=1', and add a --full to perform full cloning.
Attachment #8605039 -
Flags: review?(mwu)
Comment 8•11 years ago
|
||
Comment on attachment 8605039 [details] [review]
Patch - shallow as default option
No.
Attachment #8605039 -
Flags: review?(mwu) → review-
| Reporter | ||
Comment 9•11 years ago
|
||
May you also take a look at the patch not set it as a default option? According to your opinion at Comment 3, and since you oppose to the second version (although without any reasons makes me don't know what's your concerns), I think it could be reviewed.
Flags: needinfo?(mwu)
Comment 10•11 years ago
|
||
A quick note: I've been experimenting with shallow clones and they don't seem to work correctly for non-master branches so I fear we can't use them for that. That's a pity and I don't know why they don't work exactly.
Comment 11•11 years ago
|
||
To clarify, B2G is a tool for developers. We're not optimizing for people who are merely interested in pulling and building, and the defaults should not be for people who merely want to build. If we care about those users, than we should directly provide builds to the degree we're allowed to.
Flags: needinfo?(mwu)
Comment 12•11 years ago
|
||
Lots of developers are just pulling and building. For example, the developers who filed this bug and are working on this change.
Maybe we don't change the default, but we should at least can provide an option for this.
| Reporter | ||
Comment 13•11 years ago
|
||
Even as a developer, and I asked Gecko guys that almost sync-up their B2G repo everyday, they almost never need to use the older histories. You may raise counter examples to say to keep histories is very important for some critical usages, but I don't think there would be any developer would be unhappy with a faster and small pulling & building process, especially when there are options to let those whom need that could keep the work perfect.
Comment 14•11 years ago
|
||
(In reply to Michael Wu [:mwu] from comment #11)
> To clarify, B2G is a tool for developers. We're not optimizing for people
> who are merely interested in pulling and building, and the defaults should
> not be for people who merely want to build. If we care about those users,
> than we should directly provide builds to the degree we're allowed to.
Yes but B2G (a.k.a. Firefox OS) is a platform for users as well. I am one of them. And you definitely should care about those users for multiple reasons, no need to expand on this, I hope. I don't need ready-made builds because using source allows me to patch files thus improving v2.1 that I'm currently using and I'm sure I'm not an exception. Why must I or anyone else spend hours downloading TB of stuff I don't need and who benefits from this is hard to comprehend. Please reconsider, if it doesn't hurt anyone, on the contrary, it satisfies a general need, shallow cloning should exist as an option.
Comment 15•11 years ago
|
||
My take is that for many developers, the history of all the android related repositories is actually useless. However I don't see a good reason to not do full clones of gecko & gaia.
Would that satisfy everyone to have an option that does that?
Comment 16•11 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #15)
> My take is that for many developers, the history of all the android related
> repositories is actually useless. However I don't see a good reason to not
> do full clones of gecko & gaia.
Personally I build from a shallow repository with a .userconfig file which points to my external gecko & gaia clones where I do actual work. I'd wager that most people do something similar as working directly on the cloned repository doesn't play well with repo. Just my 2p, the fact that I cannot get a shallow clone for a non-master branch is a blunder though and that alone would prevent this from being a default. Offering an easy-to-use and easy-to-discover option though is definitely something we should do.
| Reporter | ||
Comment 17•11 years ago
|
||
Since Comment 11 is what B2G team concerns and insists, it's meaningless to do anything. De-assigning and hope this pain would be eased in the future, by any other chances.
Assignee: gweng → nobody
| Reporter | ||
Comment 18•11 years ago
|
||
Comment on attachment 8602458 [details] [review]
Patch
Bother B2G team not anymore.
Attachment #8602458 -
Flags: review?(mwu)
Comment 19•8 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•