-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fake-support the label=experimental param #82
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,13 @@ func getTestRunsAndSources(r *http.Request, runSHA string) (testRunSources []str | |
testRunSources = append(testRunSources, fmt.Sprintf(singleRunURL, afterSpec.Revision, afterSpec.Platform)) | ||
} | ||
} else { | ||
const sourceURL = `/api/runs?sha=%s` | ||
var sourceURL = `/api/runs?sha=%s` | ||
labels := ParseLabelsParam(r) | ||
if labels != nil { | ||
for label := range labels.Iterator().C { | ||
sourceURL = sourceURL + "&label=" + label.(string) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto (type assertion) |
||
} | ||
} | ||
testRunSources = []string{fmt.Sprintf(sourceURL, runSHA)} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,13 @@ func handleTestRunGet(w http.ResponseWriter, r *http.Request) { | |
} | ||
sourceURL := fmt.Sprintf(`/api/runs?max-count=%d`, maxCount) | ||
|
||
labels := ParseLabelsParam(r) | ||
if labels != nil { | ||
for label := range labels.Iterator().C { | ||
sourceURL = sourceURL + "&label=" + label.(string) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it's an assertion; no it can't fail unless the set items aren't strings (which, they are). |
||
} | ||
} | ||
|
||
// Serialize the data + pipe through the test-runs.html template. | ||
testRunSourcesBytes, err := json.Marshal([]string{sourceURL}) | ||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have comments somewhere discussing the binding between
unstable
in one context and-experimental
in another.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jugglinmike - can you weigh in on your preference or
stable
orexperimental
as the label? You chose-experimental
as the browser suffix, so perhaps you prefer that? I'm not fussed - unstable does, as @foolip points out, kinda sound test-related.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I agree with @foolip's advice, and since he made the improvement to WPT, using the same convention here will promote consistency in terminology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK -
unstable
=>experimental