Bug 191769 - webkitpy: Retry app installation on watchOS simulators
Summary: webkitpy: Retry app installation on watchOS simulators
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-16 13:56 PST by Jonathan Bedard
Modified: 2018-11-26 12:55 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.73 KB, patch)
2018-11-16 14:00 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (2.04 KB, patch)
2018-11-16 14:18 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (2.11 KB, patch)
2018-11-16 14:41 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (2.10 KB, patch)
2018-11-16 15:22 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (1.14 KB, patch)
2018-11-26 11:09 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2018-11-16 13:56:19 PST
It takes a few seconds for apps to be installable on freshly booted watchOS simulators.
Comment 1 Jonathan Bedard 2018-11-16 14:00:01 PST
Created attachment 355115 [details]
Patch
Comment 2 Aakash Jain 2018-11-16 14:04:20 PST
Comment on attachment 355115 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355115&action=review

r=me after the changes.

> Tools/Scripts/webkitpy/xcode/simulated_device.py:548
> +        for i in xrange(3):

Please move 3 to a variable. e.g.: NUM_RETRIES_FOR_WATCH_INSTALL

> Tools/Scripts/webkitpy/xcode/simulated_device.py:552
> +            if exit_code != 204:

what does 204 indicate? maybe worth adding a comment.

> Tools/Scripts/webkitpy/xcode/simulated_device.py:553
> +                break

why break instead of return?
Comment 3 Jonathan Bedard 2018-11-16 14:18:52 PST
Created attachment 355120 [details]
Patch
Comment 4 Radar WebKit Bug Importer 2018-11-16 14:28:53 PST
<rdar://problem/46139850>
Comment 5 Aakash Jain 2018-11-16 14:32:25 PST
Comment on attachment 355120 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355120&action=review

> Tools/Scripts/webkitpy/xcode/simulated_device.py:553
> +            # Return code indicates that the devices is booting and a retry may be successful.

This is confusing. Which return code indicates device is booting?

If 204 indicates booting, then it might be simpler/more-readable to check for 204. something like:

elif exit_code == 204:
    # Return code 204 indicates that the devices is booting. Retry after 5s.
    time.sleep(5)
else:
    return False

return False
Comment 6 Jonathan Bedard 2018-11-16 14:41:44 PST
Created attachment 355128 [details]
Patch
Comment 7 Jonathan Bedard 2018-11-16 15:22:34 PST
Created attachment 355139 [details]
Patch
Comment 8 WebKit Commit Bot 2018-11-16 16:02:23 PST
Comment on attachment 355139 [details]
Patch

Clearing flags on attachment: 355139

Committed r238319: <https://trac.webkit.org/changeset/238319>
Comment 9 WebKit Commit Bot 2018-11-16 16:02:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Jonathan Bedard 2018-11-26 11:09:38 PST
Reopening to attach new patch.
Comment 11 Jonathan Bedard 2018-11-26 11:09:38 PST
Created attachment 355658 [details]
Patch
Comment 12 WebKit Commit Bot 2018-11-26 12:55:49 PST
Comment on attachment 355658 [details]
Patch

Clearing flags on attachment: 355658

Committed r238514: <https://trac.webkit.org/changeset/238514>
Comment 13 WebKit Commit Bot 2018-11-26 12:55:51 PST
All reviewed patches have been landed.  Closing bug.