No line break on structured logging failure messages with tbplformatter

RESOLVED FIXED in mozilla34

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: akachkach, Assigned: jgraham)

Tracking

unspecified
mozilla34
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

No description provided.
Submitted this a bit too soon :)

So, I'm filing this because this run has weird formatting for errors:

https://tbpl.mozilla.org/php/getParsedLog.php?id=46605945&tree=Try&full=1#error0

Failures do not have a line break at the end, which causes the following messages to be appended at the end of the line. There's a scenario where this seems possible in the code (when the "expected" field == "PASS") but it doesn't seem to be the case here.
OS: Mac OS X → All
Hardware: x86 → All
Summary: No line break on structured logging failure messages → No line break on structured logging failure messages with tbplformatter
Attachment #8477842 - Flags: review?(cmanchester) → review+
Comment on attachment 8477842 [details] [diff] [review]
Ensure that only one log message is printed per line, r=chmanchester

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

::: testing/mozbase/mozlog/mozlog/structured/formatters/tbplformatter.py
@@ +70,5 @@
>          message = "- " + data["message"] if "message" in data else ""
>          if "stack" in data:
>              message += "\n%s" % data["stack"]
> +        if message and message[-1] == "\n":
> +            message = message[:-1]

Maybe we could use "message = message.rstrip('\n')" ?
https://hg.mozilla.org/mozilla-central/rev/fb0fdf7c9a10
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.