Closed Bug 1033402 Opened 10 years ago Closed 10 years ago

Listen for available port before starting marionette connection

Categories

(Firefox OS Graveyard :: Gaia::PerformanceTest, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.1 S2 (15aug)
Tracking Status
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: Eli, Assigned: hub)

References

Details

(Keywords: perf, Whiteboard: [c=automation p=3 s= u=])

Attachments

(4 files, 1 obsolete file)

Our current initiative for starting the Marionette device host involves us sleeping instead of doing smarter polling. We should move this port polling into marionette-device-host to simplify the shell script being used for starting the tests in Gaia.
Comment on attachment 8449532 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/marionette-device-host/pull/1

Looks good in general. A few nits on GH and I would like a test or two and also for the travis bits to be resurrected if that's not too much trouble. Reflag for review afterwards. Thanks!
Attachment #8449532 - Flags: review?(gaye)
Comment on attachment 8449532 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/marionette-device-host/pull/1

Nits resolved, current test covers changes made to #start. Also moved B2G restart functionality into here with a flag to ensure that B2G only restarts on the first run.
Attachment #8449532 - Flags: review?(gaye)
Blocks: 1027232
This was originally part of bug 1027232. I can't do bug 1027232 without that. The current PR doesn't work as it still requires a proper sleep value: the '2' used doesn't work with slower hardware like hamachi.
Assignee: eperelman → hub
Priority: P2 → P1
Yup to check for the port, you need to actually connect to it and receive data.

In the first seconds, a connect lead to a "connection reset by peer".
Then when it is actually working, you get data sent upon "connect()" and that's when marionette is ready.

I have a basic implementation lifted from python. I am actually tempted to move it into the marionette-js-client.
Comment on attachment 8449532 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/marionette-device-host/pull/1

Pull request is closed. Reflag me if there's stuff to review :)
Attachment #8449532 - Flags: review?(gaye)
Comment on attachment 8449532 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/marionette-device-host/pull/1

cancelling r?
Attachment #8449532 - Flags: review?(jlal)
FWIW, a proposed patch for this in part of https://github.com/mozilla-b2g/marionette-device-host/pull/2
Blocks: 1037924
Summary: Listen for available port before starting marionette device host → Listen for available port before starting marionette connection
Attachment #8449532 - Attachment is obsolete: true
See Also: → 1033229
At appears clear that we need to have this in the marionette-js-client now.
This is no longer part of the pull request mentionned in comment 8
This time we do the check on marionette-js-client.

I will wait for Gaia try though. 

If you have feedback / comments
Attachment #8456294 - Flags: review?(gaye)
It failed. Waiting a new one after fixing.
bug 1040062 is why we haven't had a new gaia try attempt, likely.
Look like Gaia Try is green. 

There is hope that Travis will be as the error in the previous run was just related to the tests itself because I use a custome gaia-node-module.
Travis is green too. We pass all the test. Nits have been address. Can we push this?

I don't mind filing a bug so that we actually write proper unit tests for the drivers.
Link to the Gaia Travis run with this https://travis-ci.org/mozilla-b2g/gaia/builds/30182352
Target Milestone: --- → 2.0 S6 (18july)
We have a test now in the tree for the waitForSocket().
Whiteboard: [c=automation p=2 s= u=] → [c=automation p=3 s= u=]
This seems to be the last blocker to turn on Gij in tbpl and move off of travis.
Can we land this?
Once the patch is good to go, there's no reason not to :)
I guess the p in the whiteboard is for priority. Just want to make sure we have the right priority here.
(In reply to Gregor Wagner [:gwagner] from comment #22)
> I guess the p in the whiteboard is for priority. Just want to make sure we
> have the right priority here.

No it is points. As used by Scrumbu.gs.

Actual priority value is being used.
Comment on attachment 8456294 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/marionette-js-client/pull/115

Switching reviewer as suggested in https://bugzilla.mozilla.org/show_bug.cgi?id=1027232#c30

James, your feedback and review would be highly appreciated.

Thank you kindly.
Attachment #8456294 - Flags: review?(gaye) → review?(jlal)
Kevin,

Just updating the gaia-node-modules.

Thank you kindly.
Attachment #8467329 - Flags: review?(kgrandon)
Comment on attachment 8456294 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/marionette-js-client/pull/115

jlal did r+ on github. We had a green tbpl.
Attachment #8456294 - Attachment description: Link to Github pull-request: https://github.com/mozilla-b2g/marionette-js-client/pull/115 → Link to Github pull-request: https://github.com/mozilla-b2g/gaia-node-modules/pull/57
Attachment #8456294 - Flags: review?(jlal) → review+
Attachment #8456294 - Attachment description: Link to Github pull-request: https://github.com/mozilla-b2g/gaia-node-modules/pull/57 → Link to Github pull-request: https://github.com/mozilla-b2g/marionette-js-client/pull/115
Comment on attachment 8467329 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia-node-modules/pull/57

Thanks Hub!
Attachment #8467329 - Flags: review?(kgrandon) → review+
Comment on attachment 8467337 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/22498

Please wait for a green gaia-try build before landing. Thanks!
Attachment #8467337 - Flags: review?(kgrandon) → review+
Merged.

https://github.com/mozilla-b2g/gaia/commit/a2d748f55624021563ec998845c2426286e81f5d
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This is the port to 2.0. It pulls the modules from the 2.0 branch of the gaia-node-modules repository.
Comment on attachment 8467737 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/22524

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): We want bug 1027232 and bug 1033402 on 2.0 perf testing.
[User impact] if declined: less performance test
[Testing completed]: TBPL
[Risk to taking this patch] (and alternatives if risky): Might break integration test. We are testing making sure this does not happen. NPOTB otherwise.
[String changes made]: none
Attachment #8467737 - Flags: review?(kgrandon)
Attachment #8467737 - Flags: approval-gaia-v2.0?
Comment on attachment 8467737 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/22524

Pretty sure you can just land with a=npotb/testonly
Attachment #8467737 - Flags: review?(kgrandon) → review+
TBPL is green minus one test that is known to fail
Comment on attachment 8467737 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/22524

Given comment #36 approving here.
Attachment #8467737 - Flags: approval-gaia-v2.0? → approval-gaia-v2.0+
Target Milestone: 2.0 S6 (18july) → 2.1 S2 (15aug)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: