Closed Bug 892958 Opened 11 years ago Closed 11 years ago

Improve TBPL's bug suggestions for mozharness-style prefixed log output

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

(Blocks 1 open bug)

Details

Attachments

(10 files)

mozharness adds a log prefix of the form:

{
21:26:35     INFO - <normal line>
}

ie datetime then log level, where log level can be {DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL}.

For cases where TBPL falls back to searching bugzilla for the full failure line from the log, this prefix means we don't match the intermittent failure bugs, since the datetime varies. In addition, some of the error regexes contain start of line anchors (eg: preg_match("/^BaseException:/", $line)), which now won't match (and in many cases, removing the start anchor would cause false positives).

We should:
a) Remove the prefix before matching against the regexes that decide if a line is a failure.
b) Remove the prefix when making the full-line bzapi search.
c) Remove the prefix when displaying the annotated summary panel (to reduce the amount of line wrapping).

However we still want the prefix in the brief/full log views.
Make it clearer that we are dealing with line numbers, not the line contents themselves.
Attachment #774614 - Flags: review?(ryanvm)
Attachment #774614 - Flags: review?(ryanvm) → review+
Blocks: 778688
Status: NEW → ASSIGNED
Depends on: 809436
Version: 5.0 → Trunk
Attached patch Part 2: Don't matchLine() twice (deleted) — Splinter Review
We're only iterating over known failure lines (ie matched lines) as it is - so this matchLine() call is redundant, since it will return true for all lines.
Attachment #775616 - Flags: review?(ryanvm)
This removes the prefix from the log excerpt (the summary of log failures), which
is used to generate the bug suggestions and is shown in the annotated summary
panel / in the top summary section of the brief log view. The main log content
is unaffected.
Attachment #775619 - Flags: review?(ryanvm)
Depends on: 893760
No longer depends on: 893760
(Since it's a common case, and we're about to increase complexity in the following parts).
Attachment #775651 - Flags: review?(ryanvm)
This solves comment 0 part [a].
Attachment #775654 - Flags: review?(ryanvm)
Match against mozharness error lines earlier, since they're a common case (and will only become more common as more things move over to using mozharness). Saves us the preg_replace() call.
Attachment #775655 - Flags: review?(ryanvm)
After testing locally, there are now a bunch of search terms that return 20+ unhelpful bugs in the annotated summary. In the future we may switch to using regex here (and cover all the exit codes in one go), but for now this gets rid of the worst.
Attachment #775656 - Flags: review?(ryanvm)
Until now, there were no full-line-fallback search terms that would return unhelpful
results. However, with the removal of the mozharness log prefix that is no
longer the case. We now sanity check the full line ($trimmedLine). This means
that $searchTerm can now end up not being defined, so we're more now cautious
before searching too.

This patch is needed to make the newly added 'TypeError: content is null'
blacklist entry actually work.
Attachment #775657 - Flags: review?(ryanvm)
This patch is needed to make the newly added 'TypeError: content is null'
blacklist entry actually work, since some of the Javascript type errors have a
bunch of preceeding whitespace.
Attachment #775658 - Flags: review?(ryanvm)
Attached patch Part 10: Fix logging format nit (deleted) — Splinter Review
This log line refers to the search term mentioned prior to it, so should be
nested under it.

ie log output will now be:
{
* Search term: "test_cpows.xul"
  Removing cached bug suggestions
  BzAPI query: 1268ms
  Bugs returned: 1
}
Attachment #775659 - Flags: review?(ryanvm)
Blocks: 890222
Blocks: 829551
Blocks: 894944
Blocks: 895399
Blocks: 834016
Attachment #775616 - Flags: review?(ryanvm) → review+
Attachment #775619 - Flags: review?(ryanvm) → review+
Attachment #775651 - Flags: review?(ryanvm) → review+
Attachment #775654 - Flags: review?(ryanvm) → review+
Attachment #775655 - Flags: review?(ryanvm) → review+
Attachment #775656 - Flags: review?(ryanvm) → review+
Attachment #775657 - Flags: review?(ryanvm) → review+
Attachment #775658 - Flags: review?(ryanvm) → review+
Attachment #775659 - Flags: review?(ryanvm) → review+
Depends on: 897031
Depends on: 874900
Depends on: 897052
Depends on: 897067
Depends on: 897084
Depends on: 897095
Depends on: 897104
Blocks: 798219
Some of the bugs blocking this are fixed, others not. However can't really wait any longer since the switch to mozharness for Talos means there are now many many more intermittent failures that have stopped generating bug suggestions due to the mozharness log line prefix.

As such, I've just pushed this out, and we'll have to deal with the annotated summary spam in the meantime.

\o/
Blocks: 899635
Depends on: 899990
Depends on: 899991
Depends on: 900010
Blocks: 898074
Depends on: 900228
Depends on: 902165
Depends on: 902168
Depends on: 902202
Depends on: 902239
Depends on: 904224
Depends on: 904628
Depends on: 904631
Depends on: 904742
Depends on: 905228
No longer depends on: 905228
Depends on: 906693
Depends on: 906824
Depends on: 908213
Depends on: 908426
Depends on: 908430
Depends on: 908436
Depends on: 909283
Depends on: 910256
Depends on: 910271
Depends on: 910272
Depends on: 910273
Depends on: 910275
Depends on: 910276
Depends on: 907650
No longer depends on: 907650
Dependant bugs moved to bug 910614.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: