Autophone - do not allow logcat device error to prevent setup_job initialization

RESOLVED FIXED

Status

Testing
Autophone
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: bc, Assigned: bc)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox44 affected)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Currently, during a test's setup_job logcat is collected and reset prior to necessary initialization. If the logcat fails due to an ADBError or ADBTimeoutError, this can leave the test partially uninitialized causing start_time, stop_time and job_details to not be set/reset.
(Assignee)

Comment 1

2 years ago
Created attachment 8667428 [details] [diff] [review]
bug-1209651-setup-job-init-v1.patch
Attachment #8667428 - Flags: review?(jmaher)
Comment on attachment 8667428 [details] [diff] [review]
bug-1209651-setup-job-init-v1.patch

Review of attachment 8667428 [details] [diff] [review]:
-----------------------------------------------------------------

I don't understand how this fixes the issue, we just moved the logcat access a few lines later?
Attachment #8667428 - Flags: review?(jmaher) → review-
(Assignee)

Comment 3

2 years ago
Comment on attachment 8667428 [details] [diff] [review]
bug-1209651-setup-job-init-v1.patch

Yes. The appropriate properties are initialized before the logcat call can cause an ADBError/ADBTimeout Error. If the error did occur, it will be caught in the worker.py's PhoneWorkerSubProcess::run_tests try...except block at https://github.com/mozilla/autophone/blob/master/worker.py#L677 and the failure handled there.

It is necessary that these properties be initialized even if the setup_job failed since we will use them when reporting the failure to Treeherder.
Attachment #8667428 - Flags: review- → review?(jmaher)
Comment on attachment 8667428 [details] [diff] [review]
bug-1209651-setup-job-init-v1.patch

Review of attachment 8667428 [details] [diff] [review]:
-----------------------------------------------------------------

thanks for the explanation!
Attachment #8667428 - Flags: review?(jmaher) → review+
(Assignee)

Updated

2 years ago
Blocks: 1209796
(Assignee)

Comment 5

2 years ago
https://github.com/mozilla/autophone/commit/79bb3c42a1eab736496bb57b5c29970756ffec95
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.