Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add summary MD to checks #745

Merged
merged 8 commits into from
Nov 16, 2018
Merged

Add summary MD to checks #745

merged 8 commits into from
Nov 16, 2018

Conversation

lukebjerring
Copy link
Contributor

@lukebjerring lukebjerring commented Nov 9, 2018

Description

Adds a more user-friendly title and summary body to the checks.

Part of #712

Review Information

@Hexcles - I suspect my golang "what dir am I in" code might not play well on appengine. Do you happen to know whether it will work?

@wpt-pr-bot
Copy link

Staging instance deployed by Travis CI!
Running at https://check-title-dot-wptdashboard-staging.appspot.com

@wpt-pr-bot
Copy link

Staging instance deployed by Travis CI!
Running at https://check-title-dot-announcer-dot-wptdashboard-staging.appspot.com

@lukebjerring lukebjerring requested a review from foolip November 12, 2018 14:37
@lukebjerring
Copy link
Contributor Author

@foolip - fixing the circular dep problem in another PR (#747), but you can review what we want the contents of the check to be independent of that :)

api/checks/api.go Outdated Show resolved Hide resolved
hostname := shared.GetHostname(ctx)
detailsURL, _ := url.Parse(fmt.Sprintf("https://%s/results/", hostname))
// Diff for the given product at master vs the given sha.
func getMasterDiffURL(ctx context.Context, sha string, product shared.ProductSpec) *url.URL {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't changed in this PR, but the link that will be exposed now isn't a stable one, and the comparison will quickly become full of differences due to changes on master as opposed to the PR. Can we get the run ID or product+sha and mint a stable URL instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this in an issue instead; there's some implications in both directions.

The most-recent master run might be lagging behind when a PR lands (they're faster), so fixing to a value that's behind might not be desirable. Using the current SHA of master may also be a problem, if we aren't producing results for that SHA for some reason. And, as you suggest, having a rolling master might be bad.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the run we want would be one for the merge base if it exists, something as soon as possible after if it doesn't, and something as soon as possible before if there aren't any runs after yet. (Reason to prefer runs after the merge base is that the PR might build on something recent that affects the results of the tests being changed.)

But yeah, separate issue sounds good, or we'll just make sure to have two runs always for PRs and not have any logic for this :)

api/checks/suites.go Outdated Show resolved Hide resolved
return false, err
}

title := fmt.Sprintf("wpt.fyi - %s results", product.DisplayName())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the title of the check run and not the check suite, just product.DisplayName() as the name or perhaps including " results" seems fine. Where is the title of the check suite set? Simply "wpt.fyi" as the title would work I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set in the App, I think. In the main landing page of a PR, we don't see the suite title, just the run title(s), so the context might be nicer. An example for another run is

Taskcluster (pull_request)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as well to get this deployed then I can see what strings show up where directly :)

@@ -0,0 +1,7 @@
Results have successfully been scraped and added to [{{ .HostName }}]({{ .HostURL }}).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the URL that will link to something like https://wpt.fyi/pr/1234?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet; we don't have support for that param (and I'd probably go ?pr=1234; the extra URL path handling cases isn't worth the extra headache).
It's currently just pointing to the homepage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, ?pr=1234 would be cool.

They can be compared to the latest `master` run here:
{{ .DiffURL }}

Or, to view _all_ the latest runs for the same revision:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have an example of what this URL will be? From the wording it's not clear if "same revision" refers to the PR head revision or the master revision.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither; the SHA that was associated with the check_run (which was, at the time, the PR HeadSHA)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be what I called PR head revision. Point is given the context I thought "same revision" would probably refer to "master", just that doesn't quite make sense.

Perhaps best to just land the PR so it's possible to see this in action to see what the URLs all are :)

@@ -0,0 +1,3 @@
Results have been produced, and are being collected as we speak...

They'll eventually be visible on [{{ .HostName }}]({{ .RunsURL }}).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, should this URL not be somewhere in completed.md too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. The intention is that the /test-runs UI will show pending runs eventually, whereas once the run has landed, we can link straight to it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, so this just links to /runs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right.

shared/params.go Outdated
@@ -141,6 +141,22 @@ func (p ProductSpec) Matches(run TestRun) bool {
return true
}

// DisplayName returns a capitalized version of the product's name.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have enough info to include the channel name here, or at the call site?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the channel is available in the label set. I'd do that in a separate PR, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

@lukebjerring
Copy link
Contributor Author

Ping @foolip

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed "Use host name" in addition to what I looked at last time, but the commit history now is a bit complicated so I'm not certain if I might have missed something. If that was the only change, then LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants