Bug 229160 - [results.webkit.org] Add ability to access Bugzilla and Radar links from commit messages
Summary: [results.webkit.org] Add ability to access Bugzilla and Radar links from comm...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kevin Neal
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-16 13:54 PDT by Kevin Neal
Modified: 2021-09-17 17:43 PDT (History)
2 users (show)

See Also:


Attachments
Patch (18.38 KB, patch)
2021-08-17 08:42 PDT, Kevin Neal
no flags Details | Formatted Diff | Diff
Patch (3.96 KB, patch)
2021-08-19 14:20 PDT, Kevin Neal
no flags Details | Formatted Diff | Diff
Patch (2.06 KB, patch)
2021-08-19 16:48 PDT, Kevin Neal
no flags Details | Formatted Diff | Diff
Patch (3.87 KB, patch)
2021-08-20 08:09 PDT, Kevin Neal
no flags Details | Formatted Diff | Diff
Patch (3.90 KB, patch)
2021-09-17 16:01 PDT, Kevin Neal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Neal 2021-08-16 13:54:12 PDT
Find Bugzilla and Radar references in commit messages.
Comment 1 Kevin Neal 2021-08-17 08:42:05 PDT
Created attachment 435690 [details]
Patch
Comment 2 Jonathan Bedard 2021-08-17 09:04:31 PDT
Comment on attachment 435690 [details]
Patch

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

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:145
> +        this.bugUrls = json.message.match(/\b(https?):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi);

Should probably only have 1 url

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:146
> +        this.radarUrls = json.message.match(/\b(rdar):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi);

Have we investigated performance of doing this for every commit instead of on-demand?

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:196
> +                    ${node.label.message ? `<br><div>${linkify(escapeHTML(node.label.message.split('\n')[0]))}</div>` : ''} <hr>${node.label.bugUrls ? `<div>${linkify(escapeHTML(node.label.bugUrls.join(',')))}</div>` : ''}${node.label.radarUrls ? `<div>${linkify(escapeHTML(node.label.radarUrls.join(',')))}</div>` : ''}

We probably don't want the <hr> divider if there are no bug urls, also, this divider should be the inverse color (white in dark mode, black in normal mode)
Comment 3 Kevin Neal 2021-08-19 14:20:16 PDT
Created attachment 435904 [details]
Patch
Comment 4 Kevin Neal 2021-08-19 16:48:32 PDT
Created attachment 435918 [details]
Patch
Comment 5 Kevin Neal 2021-08-20 08:09:04 PDT
Created attachment 435985 [details]
Patch
Comment 6 Jonathan Bedard 2021-08-20 08:14:16 PDT
Comment on attachment 435985 [details]
Patch

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

> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:146
> +        this.radarUrls = json.message.match(/\b(rdar):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi);

The only question remaining here is if we should do this computation in the constructor, or on-demand? There might be a performance hit here.
Comment 7 Radar WebKit Bug Importer 2021-08-23 13:55:21 PDT
<rdar://problem/82260189>
Comment 8 Ryan Haddad 2021-09-08 17:04:57 PDT
(In reply to Jonathan Bedard from comment #6)
> Comment on attachment 435985 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=435985&action=review
> 
> > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/commit.js:146
> > +        this.radarUrls = json.message.match(/\b(rdar):\/{2}[^\s<>&]+[^\.\s<>&,)]/gmi);
> 
> The only question remaining here is if we should do this computation in the
> constructor, or on-demand? There might be a performance hit here.
Kevin, did you manage to find an answer for this question?
Comment 9 Kevin Neal 2021-09-10 15:46:46 PDT
I reviewed the performance of the app with a fully loaded set of commits and it took an average of 0.0119154 milliseconds to run the regexes.
Comment 10 Kevin Neal 2021-09-17 16:01:03 PDT
Created attachment 438527 [details]
Patch
Comment 11 EWS 2021-09-17 17:43:29 PDT
Committed r282717 (241854@main): <https://commits.webkit.org/241854@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438527 [details].