[socket process] cherry-pick and rebase non-mc patches
Categories
(Core :: Networking, enhancement, P1)
Tracking
()
People
(Reporter: CuveeHsu, Assigned: CuveeHsu)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(5 files, 11 obsolete files)
We're suffering from merging m-c to larch project [1]
We push some commits and merge from m-c several times.
The last merge [2] is based on [3]
The goal is to cherry-pick the patches (list in the attachments) to the top of [3] in larch. [2] is a workable version. If the result of rebase is not workable, we might add a patch on top to make it as same as [2].
We might reset the larch remote repo. Just make sure we finish the rebase well.
If the rebase is too complicated, we might make a big patch which is diff of [2] and [3]. However this makes the patch hard to review. We want to land these patch back when we're ready.
[1] https://hg.mozilla.org/projects/larch
[2] https://hg.mozilla.org/projects/larch/pushloghtml?changeset=ce8802224f86
[3] https://hg.mozilla.org/mozilla-central/pushloghtml?changeset=93c4470ee3af
Comment 1•6 years ago
|
||
I had one idea that could benefit from hg rebase
and its capabilities to simplify merging patches.
Let's say that we:
- pull from mozilla-central to larch, but don't update or merge
- we end up having few blocks (sub branches) on larch, as depicted:
O -- current (or recent) mozilla-central `default` (changeset B)
|
?
|
O -- a merge commit of m-c to larch, joining the larch specific patches and m-c
|\
| \
| O -- larch specific patch2
| |
| |
| O -- larch specific patch1
| /
|/
O -- a base (parent) changeset which can be found also on m-c
|
|
V
If there are more blocks (sub branches) like these, find the oldest one. Then, I think that if you update to patch2
(or in general - the top-most patch in the sub-branch) and do hg rebase -d default
, or -d <hash of B>
to be sure you do the right thing, it will move the patches patch1
and patch2
(or in general - the whole sub-branch) on top of the current m-c default changeset (B) and rebase them (offering the 3-diff tool to merge conflicts it can't resolve automatically). It should then look like this:
O -- patch2, changeset B2
|
|
O -- patch1
|
|
O -- mozilla-central common default, changeset B
|
|
O
|
? ... other sub branches specific to larch...
|
V
Then you repeat again for another oldest sub-branch, but this time you will obviously hg rebase -d <hash of B2>
.
And so on.
It would be good to do this on a separate (new) clone of larch in case something goes wrong, to prevent destruction of your development tree.
Comment 2•6 years ago
|
||
I don't think this bug belongs in the hg developer services bucket. Our team initializes project repos for teams but it looks like the requirements on this bug are for a better merging strategy for your team. Is there an action here you would like us to take?
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Kim Moir [:kmoir] ET from comment #2)
I don't think this bug belongs in the hg developer services bucket. Our team initializes project repos for teams but it looks like the requirements on this bug are for a better merging strategy for your team. Is there an action here you would like us to take?
Right, it seems pointless to reset the repo.
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
Let's move to Core::Networking
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
As comment 1 said, when OnStart fails, we must not call OnData and propagate
the error to OnStop.
Please note this patch might not cover the whole "stream listener contract".
netwerk/protocol/http/HttpTransactionParent.cpp | 32 ++++++++++++++++++-------
1 file changed, 24 insertions(+), 8 deletions(-)
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
(a) able to dispatch Reschedule/Cancel/UpdateClassOfService to socket process
(b) able to send priority to socket priority during init
(c) encapsulate the pump init logic under nsAHttpTransactionShell
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Bug 1497236 - serialize timings for socket process
Bug 1497238 - move SetDNSWasRefresh to nsAHttpTransactionShell
Bug 1497235 - P1: Pass request context id to HttpTransactionChild, r=JuniorHsu
Bug 1497235 - P2: Pass ProxyInfo to socket process, r=JuniorHsu
Bug 1497235 - P3: Pass classOfService to socket process, r=dragana
Simply pass classOfService to socket process via Init() message.
Assignee | ||
Comment 15•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 16•6 years ago
|
||
(In reply to Junior [:junior] from comment #14)
Created attachment 9049366 [details]
P10 Pass timings, SetDNSWasRefresh, request context, proxy info and cos to socket processBug 1497236 - serialize timings for socket process
Bug 1497238 - move SetDNSWasRefresh to nsAHttpTransactionShell
Bug 1497235 - P1: Pass request context id to HttpTransactionChild, r=JuniorHsu
Bug 1497235 - P2: Pass ProxyInfo to socket process, r=JuniorHsu
Bug 1497235 - P3: Pass classOfService to socket process, r=dragana
Simply pass classOfService to socket process via Init() message.
Also fold Bug 1521817 into this patch
Assignee | ||
Comment 17•6 years ago
|
||
Finish rebasing scaffold. Ask some reviews (P1, P3, P11) for the heavy-conflicted patches to make sure I'm not just going wonky-eyed
Assignee | ||
Comment 18•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 19•6 years ago
|
||
Bug 1509822 - P1: Decouple nsHttpConnectionMgr and AltSvcCache, r=dragana
Bug 1509822 - P2: Send observer notifications to socket process, r=dragana
Bug 1509822 - P3: Get HttpData from socket process, r=dragana
Bug 1509822 - P4: Send IPC message for DoShiftReloadConnectionCleanup, r=dragana
Bug 1509822 - P5: Not create connection manager in parent process, r=dragana
Updated•6 years ago
|
Assignee | ||
Comment 20•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 21•6 years ago
|
||
Finish rebasing with some warnings (request Http before socket process ready) and small crashes in Preferences.cpp
Assignee | ||
Comment 22•6 years ago
|
||
Want to put some basic hg
trick here:
My final workflow is pretty simple: directly cherry-pick those patches we want
hg pull central
andhg up ce8802224f86
which is the same parent with our last merge commit.- Look at each pushlog, compare to bug 1513057 and have a list (attachment 9047548 [details]) to rebase in order
- For each patch: do
hg graft <changeset>
, solve conflict (usually ref from [2]), make it build and run a simple test - Put these patches to phab (no worry for the author information. They are kept in local and I'll push them handy)
hg graft
and even hg rebase
take care of the clang-format except the conflict, which is good.
Have a quick check to avoid this false modification:
LOG(
("some logging"));
Here's reason for not doing other ways:
a. to make a big diff patch from [2] and [3]
Attach is the diff file, resulted from hg up larch && hg merge --tool=internal:merge-other ce8802224f86
Sometimes it fails during the merge, we can use this to continue hg resolve -t internal:other --all
The patch consists of lots of format change, and some inconsistent changes.
More important, one patch is hard to review when we want to land back to central.
Btw, making the patch takes >4 hours in my i7 desktop.
b. hg rebase
patches to the parent of next patch instead of hg graft
to the top
First of all, larch
and central
are from remote, so patches from the larch
is not rebase-able.
We need to hg phase -r <changeset> -d --force
to force it to draft phase.
It will ruin the local tree for a while (which I don't like it)
Once we finish, we can hg pull
again to make it back to remote phase.
Here's some analysis:
There are four merges after Honza's final rebase pushlog
Merge brings conflict, and our patch also changes after conflict resolved.
And I also fold those build-break patches into the corresponding patch.
Hence, rebase could not apply clearly afterwards, which should be true since I still solving conflict in the last patches.
We might use hg phase
and hg rebase
trick if central is not changing a lot.
However, bug 1522579 carries lots of conflict for next rebase, though.
Assignee | ||
Comment 23•6 years ago
•
|
||
However, bug 1522579 carries lots of conflict for next rebase, though.
pContentBridge has nothing to do with us. My bad.
Assignee | ||
Comment 24•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Description
•