Bug 147938 - Refactor BuildbotQueueView._appendPendingRevisionCount to work more generically with repositories other than "openSource" and "internal".
Summary: Refactor BuildbotQueueView._appendPendingRevisionCount to work more generical...
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: 2015-08-12 10:40 PDT by Jason Marcell
Modified: 2015-08-14 11:07 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.99 KB, patch)
2015-08-12 10:45 PDT, Jason Marcell
no flags Details | Formatted Diff | Diff
Patch (4.03 KB, patch)
2015-08-12 17:14 PDT, Jason Marcell
no flags Details | Formatted Diff | Diff
Patch (3.89 KB, patch)
2015-08-13 17:24 PDT, Jason Marcell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Marcell 2015-08-12 10:40:06 PDT
Refactor BuildbotQueueView._appendPendingRevisionCount to work more generically with repositories other than "openSource" and "internal".
Comment 1 Jason Marcell 2015-08-12 10:45:49 PDT
Created attachment 258828 [details]
Patch
Comment 2 Daniel Bates 2015-08-12 13:33:45 PDT
Comment on attachment 258828 [details]
Patch

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

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:84
> +        for (var i = 0; i < Dashboard.sortedRepositories.length; i++) {
> +            var repository = Dashboard.sortedRepositories[i];

Notice that Dashboard.sortedRepositories is a getter function. We should cache Dashboard.sortedRepositories in a local variable instead of computing it twice on each iteration.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:90
> +            if (!trac.latestRecordedRevisionNumber || trac.oldestRecordedRevisionNumber > trac.latestProductiveIteration) {

I take it you meant to write:

if (!trac.latestRecordedRevisionNumber || trac.oldestRecordedRevisionNumber > latestProductiveRevisionNumber)

(Notice that I substituted latestProductiveRevisionNumber for trac.latestProductiveIteration in the second disjunct).

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:96
> +            totalRevisionsBehind += trac.commitsOnBranch(branch,
> +                function(commit) { return commit.revisionNumber > latestProductiveRevisionNumber; }).length;

Please write this on one line.
Comment 3 Jason Marcell 2015-08-12 17:14:38 PDT
Created attachment 258855 [details]
Patch
Comment 4 Jason Marcell 2015-08-12 17:16:18 PDT
I addressed all of Daniel Bates' concerns from his previous comment.

Additionally I added a local variable repositoryName to cache repository.name.
Comment 5 WebKit Commit Bot 2015-08-13 09:39:19 PDT
Comment on attachment 258855 [details]
Patch

Rejecting attachment 258855 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 258855, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
'--reviewer', u'Daniel Bates']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 2 diffs from patch file(s).
patching file Tools/ChangeLog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file Tools/ChangeLog.rej
patching file Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Daniel Bates']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/53373
Comment 6 Jason Marcell 2015-08-13 17:24:42 PDT
Created attachment 258960 [details]
Patch
Comment 7 Jason Marcell 2015-08-13 17:25:42 PDT
Comment on attachment 258960 [details]
Patch

Uploaded a new patch because the last one failed to apply in the commit queue.
Comment 8 WebKit Commit Bot 2015-08-13 17:30:16 PDT
Comment on attachment 258960 [details]
Patch

Rejecting attachment 258960 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 258960, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Tools/ChangeLog contains OOPS!.

Full output: http://webkit-queues.webkit.org/results/55981
Comment 9 Jason Marcell 2015-08-13 18:43:21 PDT
It failed again but for a different reason this time. It's complaining about the OOPS on the reviewer field this time. I thought that get's automatically added. Oh, is it because I asked for cq? but not review on this one?
Comment 10 Jason Marcell 2015-08-13 18:44:07 PDT
Comment on attachment 258960 [details]
Patch

Trying this again. Last time I just asked for cq? but didn't set r?.
Comment 11 WebKit Commit Bot 2015-08-14 11:07:15 PDT
Comment on attachment 258960 [details]
Patch

Clearing flags on attachment: 258960

Committed r188478: <http://trac.webkit.org/changeset/188478>
Comment 12 WebKit Commit Bot 2015-08-14 11:07:20 PDT
All reviewed patches have been landed.  Closing bug.