Autophone - adb.py - add a logcat cleared message to the logcat whenever it is cleared so it is never completely empty

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
While Bug 1209653 helped production Autophone from falling behind as badly as it used to do especially for the nexus-s-3 device, it does not seem to have fixed the problem entirely. I have noticed that when disabling devices which should cancel pending jobs on Treeherder, my local nexus one devices appear to hang and take an inordinate amount of time to cancel jobs.

One fix that works for me locally is to never allow the logcat to be completely empty. We can ensure this by adding a log message to the logcat immediately after clearing the buffer.
(Assignee)

Comment 1

2 years ago
Created attachment 8672630 [details] [diff] [review]
bug-1213866-logcat-cleared-message-v1.patch
Attachment #8672630 - Flags: review?(jmaher)
Comment on attachment 8672630 [details] [diff] [review]
bug-1213866-logcat-cleared-message-v1.patch

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

::: adb.py
@@ +1156,4 @@
>          buffers = self._get_logcat_buffer_args(buffers)
>          cmds = ["logcat", "-c"] + buffers
>          self.command_output(cmds, timeout=timeout)
> +        self.shell_output("log logcat cleared", timeout=timeout)

why the need for timeout here?  I thought shell_output was issuing a command on the device.
Attachment #8672630 - Flags: review?(jmaher) → review-
(Assignee)

Comment 3

2 years ago
It is. The timeout prevents the command from hanging if the device does not respond.
Comment on attachment 8672630 [details] [diff] [review]
bug-1213866-logcat-cleared-message-v1.patch

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

got it!
Attachment #8672630 - Flags: review- → review+
(Assignee)

Updated

2 years ago
Blocks: 1214110
(Assignee)

Comment 5

2 years ago
https://github.com/mozilla/autophone/commit/107eaab32f3c6af47582fdee1fe9c781e3f6dcc2
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.