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

Iterate keys instead of fetching #673

Merged
merged 3 commits into from Oct 18, 2018
Merged

Iterate keys instead of fetching #673

merged 3 commits into from Oct 18, 2018

Conversation

lukebjerring
Copy link
Contributor

@lukebjerring lukebjerring commented Oct 18, 2018

Description

Re-fixes ##587 without fixed-limiting the key count.
Fixes #671

Fixes #569 and might help #570 too...

Review Information

/api/runs?product=chrome-68

@wpt-pr-bot
Copy link

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

@wpt-pr-bot
Copy link

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

} else if err != nil {
return result, err
}
if (limit == nil || *limit > len(keys)) && len(keys) < MaxCountMaxValue {
Copy link
Member

Choose a reason for hiding this comment

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

We should add an else branch for this if and break the loop there to prevent unnecessary full table scan.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done (and other simplification).

Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

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

LGTM % a nit

@@ -79,16 +79,12 @@ func LoadTestRunKeys(
break
} else if err != nil {
return result, err
} else if (limit != nil && *limit <= len(keys)) || len(keys) >= MaxCountMaxValue {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can we make the two inequalities of the same direction?

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.

https://wpt.fyi/test-runs?product=chrome-68 is 404 API: Default value of max-count is too large
3 participants