Revision links in compare view should link to resultset in treeherder, not hg.mozilla.org

RESOLVED FIXED

Status

Tree Management
Perfherder
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: wlach, Assigned: MikeLing)

Tracking

Details

Attachments

(1 attachment)

46 bytes, text/x-github-pull-request
wlach
: review+
wlach
: feedback+
Details | Review | Splinter Review
[assigning to MikeLing, I assume this will interest him]

Similar to what was just implemented in bug 1161252, the revision links inside the compare view (e.g. http://localhost:8000/perf.html#/comparesubtest?originalProject=try&originalRevision=027bf5a1e5eb&newProject=try&newRevision=b015adea7c85&originalSignature=bb48078b6137f88afc52591b0e2aaa540435392c&newSignature=bb48078b6137f88afc52591b0e2aaa540435392c) should link to the resultset page in treeherder, to ease retriggers.

For bonus points, implement a common function to get a resultset URL given a revision using a filter (see https://github.com/mozilla/treeherder/blob/master/ui/js/filters.js for some existing examples) and use it both in the compare view and in the graphs view you just modified.
(Assignee)

Comment 1

3 years ago
No problem will, I'm happy work on this :)
(Assignee)

Comment 2

3 years ago
Hi Will, I meet some problem when I try to use my filter.

It tells me 

> "Error: [$injector:unpr] Unknown provider: getRevisionUrlFilterProvider <- getRevisionUrlFilter

And my filter in filter.js looks like:

treeherder.filter('getRevisionUrl', function() {
    return function(revision, projectName) {
        if (revision) {
            var resultsetUrl = 'https://treeherder.mozilla.org' + '#/jobs?repo=' + projectName;
            resultsetUrl = resultsetUrl + revision;
            console.log(resultsetUrl);
            return resultsetUrl;
        }
        return '';
    };
});

I use it in html like:

<a href="{{originalRevision|getRevisionUrl:originalProject.name}}">

<a href="{{newRevision|getRevisionUrl:newProject.name}}">

I don't know why this error comes out :-(
(In reply to MikeLing from comment #2)
> Hi Will, I meet some problem when I try to use my filter.
> 
> It tells me 
> 
> > "Error: [$injector:unpr] Unknown provider: getRevisionUrlFilterProvider <- getRevisionUrlFilter
> 
> And my filter in filter.js looks like:
> ...

Hmm, that looks right. Could you do a pull request with your code written to date and ask for feedback? It would probably be easier for me to help if I could see the code running locally.
(Assignee)

Comment 4

3 years ago
Created attachment 8636526 [details] [review]
PR for bug 1185155
Attachment #8636526 - Flags: feedback?(wlachance)
Comment on attachment 8636526 [details] [review]
PR for bug 1185155

This is on the right track. See the PR for some suggestions on how to make it work and improve further.
Attachment #8636526 - Flags: feedback?(wlachance) → feedback+
(Assignee)

Updated

3 years ago
Attachment #8636526 - Flags: review?(wlachance)
Comment on attachment 8636526 [details] [review]
PR for bug 1185155

Would like to see a few more minor changes before this lands.
Attachment #8636526 - Flags: review?(wlachance) → review-
(Assignee)

Updated

3 years ago
Attachment #8636526 - Flags: review- → review?(wlachance)
Comment on attachment 8636526 [details] [review]
PR for bug 1185155

This one's very close (just one minor spacing issue). Note that the changes here conflict with the work in bug 1181573 -- depending on which one of these lands first, the other will have to be modified.
Attachment #8636526 - Flags: review?(wlachance) → review-
(Assignee)

Updated

3 years ago
Attachment #8636526 - Flags: review- → review?(wlachance)
Attachment #8636526 - Flags: review?(wlachance) → review+
Merged! Thanks for the patch, this should make retriggering jobs easier when required.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Comment 9

3 years ago
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/f25b43010086c8a44d70c630a99d8228f21be5f2
Bug 1185155 - perfherder compare view should link to treeherder job urls
(In reply to Treeherder Bugbot from comment #10)
> Commit pushed to master at https://github.com/mozilla/treeherder
> 
> https://github.com/mozilla/treeherder/commit/
> 87f8641240872ac822061121876dc68d464b8e8d
> Bug 1185155 - Fix links to revision job data on production

There was a minor problem in the original commit on production. ^^^ fixes that.
You need to log in before you can comment on or make changes to this bug.