[webkit-reviews] review granted: [Bug 182266] Should fetch owner commits in build-requests-fetcher. : [Attachment 332607] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 30 00:26:58 PST 2018
Ryosuke Niwa <rniwa at webkit.org> has granted dewei_zhu at apple.com's request for
review:
Bug 182266: Should fetch owner commits in build-requests-fetcher.
https://bugs.webkit.org/show_bug.cgi?id=182266
Attachment 332607: Patch
https://bugs.webkit.org/attachment.cgi?id=332607&action=review
--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 332607
--> https://bugs.webkit.org/attachment.cgi?id=332607
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=332607&action=review
> Websites/perf.webkit.org/public/include/build-requests-fetcher.php:149
> + $owner_commits_rows = $this->db->query_and_fetch_all('SELECT * FROM
commits WHERE commit_id IN
> + (SELECT DISTINCT(commitset_commit_owner) FROM commit_set_items
WHERE commitset_set = $1
> + AND commitset_commit_owner IS NOT NULL)',
array($commit_set_id));
I would have indented this query as:
SELECT * FROM commits WHERE commit_id
IN (SELECT DISTINCT(commitset_commit_owner) FROM commit_set_items
WHERE commitset_set = $1 AND commitset_commit_owner IS NOT NULL)
> Websites/perf.webkit.org/public/include/build-requests-fetcher.php:158
> + 'repository' => $row['commit_repository'],
Do: $resolve_ids ? $row['repository_name'] : $row['repository_id'];
> Websites/perf.webkit.org/public/include/build-requests-fetcher.php:159
> + 'commitOwner' => NULL,
We should assert that $row['commitset_commit_owner'] is NULL.
> Websites/perf.webkit.org/server-tests/api-build-requests-tests.js:289
> + return
MockData.addTestGroupWithOwnerCommitNotInCommitSet(TestServer.database()).then(
() => {
> + return Manifest.fetch();
> + }).then(() => {
> + return BuildRequest.fetchForTriggerable('build-webkit');
> + }).then((buildRequests) => {
Use await!
await
MockData.addTestGroupWithOwnerCommitNotInCommitSet(TestServer.database());
await Manifest.fetch();
const buildRequests = await BuildRequest.fetchForTriggerable('build-webkit');
> Websites/perf.webkit.org/server-tests/api-build-requests-tests.js:292
> + let test = Test.findById(200);
const.
> Websites/perf.webkit.org/server-tests/api-build-requests-tests.js:295
> + let platform = Platform.findById(65);
const.
More information about the webkit-reviews
mailing list