[Webkit-unassigned] [Bug 152345] Teach dashboard code to compare non-integer revisions.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 4 16:45:15 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152345

--- Comment #32 from Jason Marcell <jmarcell at apple.com> ---
Comment on attachment 270705
  --> https://bugs.webkit.org/attachment.cgi?id=270705
Patch

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

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:171
> +            if (!latestProductiveRevisionNumber || !trac.latestRecordedRevisionNumber || !nextRevision)

trac.nextRevision can potentially return undefined if there isn't a nextRevision. We need to check for that and continue if that's the case.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:304
> +        return undefined;

I needed to return undefined here because returning the same commit if no later commits were found is technically inaccurate and was causing a bug. Also, since I am potentially returning undefined, I needed to add a check at the call site for undefined.

> Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/tests/tests.js:151
> +{

This is a new unit test to check for the case where there are no pending commits.

I'm doing a lot of setup here to explicitly set the state whereas a lot of the other tests in this module rely on the module's setup function to set the state up. As Dan and I have discussed, it's probably better to favor this style where we explicitly set the state for each unit tests. I think it would be a good idea to submit a new patch, after landing this one, that makes the other tests in this module match this more explicit style.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160205/b6e7652a/attachment-0001.html>


More information about the webkit-unassigned mailing list