buildbot log html-formatting not href'ing aggressively enough

ASSIGNED
Unassigned

Status

Tamarin
Build Config
P4
enhancement
ASSIGNED
8 years ago
7 years ago

People

(Reporter: pnkfelix, Unassigned)

Tracking

unspecified
Future
Bug Flags:
flashplayer-injection -
flashplayer-qrb +
flashplayer-bug -

Details

Consider a log like (sorry if link is insufficiently persistent):

http://tamarin-builds.mozilla.org/tamarin-redux/builders/linux-arm-smoke-sandbox/builds/224/steps/SmokeTest/logs/stdio

Note that the file starts off with a href link that says "(view as text)", so you can go to the original log if you don't want the html formatting.  Note also that this stdio log is what buildbot links to in its emailed failure messages.

Now, given that, this is silly:

  Build log can be found here: http://asteam.macromedia.com/builds/sandbox/5417-43983c8d6c35/linux/smokes-linux-arm.log
  url: http://asteam.macromedia.com/builds/sandbox/5417-43983c8d6c35/linux/smokes-linux-arm.log build log

That is, the exact same text for a url is being presented twice in a row, but neither one is rendered as a href that I can directly click.
(Reporter)

Updated

8 years ago
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All

Updated

8 years ago
Assignee: nobody → jsudduth
Status: NEW → ASSIGNED
Flags: flashplayer-qrb+
Priority: -- → P4
Target Milestone: --- → flash10.2.x-Spicy

Updated

8 years ago
Target Milestone: flash10.2.x-Spicy → flash10.x - Serrano
Isn't fixing this just putting in something like the diff below?

(I'm not posting as a patch attachment because I don't actually know which directory the modification needs to go into.)

Also note that the "(view as text)" version would remain unchanged, in case we were worried about the below regexp mucking with things.

diff --git a/buildbot/src/buildbot-0.7.10p1/buildbot/status/web/logs.py b/buildbot/src/buildbot-0.7.10p1/buildbot/status/web/logs.py
--- a/buildbot/src/buildbot-0.7.10p1/buildbot/status/web/logs.py
+++ b/buildbot/src/buildbot-0.7.10p1/buildbot/status/web/logs.py
@@ -87,18 +87,22 @@ class TextLog(Resource):
         for type, entry in entries:
             if type >= len(builder.ChunkTypes) or type < 0:
                 # non-std channel, don't display
                 continue
             if self.asText:
                 if type != builder.HEADER:
                     data += entry
             else:
+                escapedEntry = html.escape(entry)
+                addHrefEntry = re.sub(r'(http://\S*)',
+                                      r'<a href="\1">\1</a>',
+                                      escapedEntry);
                 data += spanfmt % (builder.ChunkTypes[type],
-                                   html.escape(entry))
+                                   addHrefEntry)
         return data
 
     def htmlFooter(self):
         data = "</pre>\n"
         data += "</body></html>\n"
         return data
 
     def render_HEAD(self, request):

Updated

7 years ago
Flags: flashplayer-injection-
Flags: flashplayer-bug-

Updated

7 years ago
Target Milestone: Q3 11 - Serrano → Q1 12 - Brannan

Updated

7 years ago
Assignee: jsudduth → nobody
Target Milestone: Q1 12 - Brannan → Future
You need to log in before you can comment on or make changes to this bug.