Bug 138878 - The buildbot dashboard should be compatible with buildbot-0.8.9
Summary: The buildbot dashboard should be compatible with buildbot-0.8.9
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-19 12:28 PST by Dana Burkart
Modified: 2014-11-19 15:58 PST (History)
3 users (show)

See Also:


Attachments
Patch to make the dashboard compatible with 0.8.9 revision info (3.60 KB, patch)
2014-11-19 12:49 PST, Dana Burkart
no flags Details | Formatted Diff | Diff
Add bug to changelog entry (3.66 KB, patch)
2014-11-19 12:53 PST, Dana Burkart
no flags Details | Formatted Diff | Diff
Simplify previous patch to isolate the issue (3.45 KB, patch)
2014-11-19 13:39 PST, Dana Burkart
no flags Details | Formatted Diff | Diff
Dashboard patch (3.54 KB, patch)
2014-11-19 15:16 PST, Dana Burkart
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dana Burkart 2014-11-19 12:28:35 PST
The dashboard should be compatible with 0.8.9 as well as older versions of buildbot to support both internal and open source infrastructure. Specifically, the logic for retrieving revisions from the buildbot instance is broken when used against buildbot-0.8.9.
Comment 1 Dana Burkart 2014-11-19 12:49:11 PST
Created attachment 241879 [details]
Patch to make the dashboard compatible with 0.8.9 revision info
Comment 2 WebKit Commit Bot 2014-11-19 12:51:58 PST
Attachment 241879 [details] did not pass style-queue:


ERROR: Tools/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Dana Burkart 2014-11-19 12:53:11 PST
Created attachment 241880 [details]
Add bug to changelog entry
Comment 4 Dana Burkart 2014-11-19 13:39:00 PST
Created attachment 241883 [details]
Simplify previous patch to isolate the issue
Comment 5 Mark Rowe (bdash) 2014-11-19 15:03:50 PST
Comment on attachment 241883 [details]
Simplify previous patch to isolate the issue

View in context: https://bugs.webkit.org/attachment.cgi?id=241883&action=review

> Tools/ChangeLog:3
> +        Make the dashboard compatible with buildbot-0.8.9 revision info.

This doesn't really describe the issue since the dashboard was already compatible with v0.8.9. This is teaching it to cope with the fact that different masters may have different names for the codebases.

> Tools/ChangeLog:9
> +        (isMultiCodebaseGotRevisionProperty):

This is no longer modified in your patch.

> Tools/ChangeLog:10
> +        (parseRevisionProperty): Changed.

Needs a description of what's changed and why.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:104
> +    if (typeof value === "object") {

Shouldn't this check be: if (isMultiCodebaseGotRevisionProperty(property)) {

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:109
> +        if (key in value) {
> +            value = value[key];
> +        } else {
> +            value = value[fallbackKey];
> +        }

This could be:
value = value[key] || value[fallbackKey];

Or if you want to be paranoid about falsey values:

value = (key in value) ? value[key] : value[fallbackKey];
Comment 6 Dana Burkart 2014-11-19 15:16:55 PST
Created attachment 241894 [details]
Dashboard patch

Updated patch with Mark's suggestions.
Comment 7 Mark Rowe (bdash) 2014-11-19 15:53:57 PST
Comment on attachment 241894 [details]
Dashboard patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241894&action=review

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:106
> +    if (isMultiCodebaseGotRevisionProperty(property)) {
> +        value = (key in value) ? value[key] : value[fallbackKey];
> +    }

The braces are not necessary around the body of this if statement since it's only a single line.
Comment 8 Dana Burkart 2014-11-19 15:58:19 PST
Committed in r176361.