diff --git a/tests/ui/job-view/PushList_test.jsx b/tests/ui/job-view/PushList_test.jsx index f59f24419..4bd4e3bce 100644 --- a/tests/ui/job-view/PushList_test.jsx +++ b/tests/ui/job-view/PushList_test.jsx @@ -19,7 +19,6 @@ import jobListFixtureOne from '../mock/job_list/job_1'; import jobListFixtureTwo from '../mock/job_list/job_2'; import configureStore from '../../../ui/job-view/redux/configureStore'; import PushList from '../../../ui/job-view/pushes/PushList'; -import { getApiUrl } from '../../../ui/helpers/url'; describe('PushList', () => { const repoName = 'autoland'; @@ -87,12 +86,18 @@ describe('PushList', () => { }, ); fetchMock.get( - getApiUrl('/jobs/?push_id=511138', repoName), + getProjectUrl( + '/jobs/?push_id=511138&count=2000&return_type=list', + repoName, + ), jobListFixtureOne, ); fetchMock.mock( - getApiUrl('/jobs/?push_id=511137', repoName), + getProjectUrl( + '/jobs/?push_id=511137&count=2000&return_type=list', + repoName, + ), jobListFixtureTwo, ); }); diff --git a/tests/ui/job-view/stores/pushes_test.jsx b/tests/ui/job-view/stores/pushes_test.jsx index af6403604..ceacb4c3e 100644 --- a/tests/ui/job-view/stores/pushes_test.jsx +++ b/tests/ui/job-view/stores/pushes_test.jsx @@ -31,7 +31,6 @@ import { updateRange, } from '../../../../ui/job-view/redux/stores/pushes'; import { addAggregateFields } from '../../../../ui/helpers/job'; -import { getApiUrl } from '../../../../ui/helpers/url'; const mockStore = configureMockStore([thunk]); @@ -53,8 +52,15 @@ describe('Pushes Redux store', () => { getProjectUrl('/push/?full=true&count=10', repoName), pushListFixture, ); - fetchMock.get(getApiUrl('/jobs/?push_id=1', repoName), jobListFixtureOne); - fetchMock.mock(getApiUrl('/jobs/?push_id=2', repoName), jobListFixtureTwo); + fetchMock.get( + getProjectUrl('/jobs/?push_id=1&count=2000&return_type=list', repoName), + jobListFixtureOne, + ); + + fetchMock.mock( + getProjectUrl('/jobs/?push_id=2&count=2000&return_type=list', repoName), + jobListFixtureTwo, + ); const store = mockStore({ pushes: initialState }); await store.dispatch(fetchPushes()); @@ -82,7 +88,7 @@ describe('Pushes Redux store', () => { pollPushListFixture, ); fetchMock.mock( - `begin:${getApiUrl( + `begin:${getProjectUrl( '/jobs/?push_id__in=511138&last_modified__gt', repoName, )}`, diff --git a/tests/ui/mock/job_list/job_1.json b/tests/ui/mock/job_list/job_1.json index 4d339a442..9cfb6de69 100644 --- a/tests/ui/mock/job_list/job_1.json +++ b/tests/ui/mock/job_list/job_1.json @@ -1,97 +1,1041 @@ { - "count": 13, - "next": null, - "previous": null, "results": [ [ - 2, + "-", + "-", + "gecko-decision", + 107, + "taskcluster", + 1562868135, 1, - 259537193, + 255534084, + "", + 2, "unknown", "?", + "0a7ace95-7110-477f-8460-faba1776e604/0", + "", + 6689, "Gecko Decision Task", "D", - "2019-08-05T20:19:51.818175", + "2019-07-11T18:02:35.766201", + "i-0b2b25f39211e2e1e", + "-", + "-", "102210fe594ee9b33d82058545b1ed14f4c8206e", "gecko-decision", - "opt", - 526443, - "success", + 511138, + "scheduled", "2aa083621bb989d6acf1151667288d5fe9616178", - "completed", - 1 - ], - [ - 18, - 1, - 259537372, - "unknown", - "?", - "build-android-api-16/debug", - "B", - "2019-08-05T20:37:45.258535", - "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-4-0-armv7-api16", - "debug", - 526443, "success", - "e2e58eb7f14af83019d3f8433c0642dde8082c4d", + 511138, + "2aa083621bb989d6acf1151667288d5fe9616178", + 1562868022, "completed", - 1 + 1562868020, + 1, + "jarilvalenciano@gmail.com", + "opt" ], [ - 2, + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868785, 1, - 259537375, + 255534263, + "", + 930, + "Node tests", + "node", + "359e1236-b4fd-433e-bc66-4e465d6a3d7a/0", + "", + 181660, + "source-test-node-debugger-tests", + "debugger", + "2019-07-11T18:13:07.047474", + "i-0d545ef8eb9eccfb5", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "d33573c73d1bf521fe4182dad7ffc3cf086e7cc6", + "success", + 511138, + "d33573c73d1bf521fe4182dad7ffc3cf086e7cc6", + 1562868137, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "lint", + 144, + "taskcluster", + 1562868495, + 1, + 255534265, + "", + 2, "unknown", "?", - "source-test-mozlint-yaml", - "yaml", - "2019-08-05T20:21:55.832291", + "688d19f8-ce31-4226-aae6-8564aeeb5f2a/0", + "", + 114754, + "source-test-mozlint-codespell", + "spell", + "2019-07-11T18:08:16.981883", + "i-072635b9886e77e13", + "-", + "-", "102210fe594ee9b33d82058545b1ed14f4c8206e", "lint", - "opt", - 526443, + 511138, + "scheduled", + "6c2e8db7978ca4d5c0e38522552da4bc9b2e6b8b", "success", - "306fd1e8d922922cd171fa31f0d914300ff52228", + 511138, + "6c2e8db7978ca4d5c0e38522552da4bc9b2e6b8b", + 1562868137, "completed", - 1 + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" ], [ - 2, + "-", + "-", + "lint", + 144, + "taskcluster", + 1562869887, 1, - 259539664, + 255534268, + "", + 2, "unknown", "?", - "test-android-hw-p2-8-0-arm7-api-16/debug-fennec-jittest-1proc-6", - "Jit6", - "2019-08-05T20:39:11.216839", - "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-hw-p2-8-0-arm7-api-16", - "debug", - 526443, - "testfailed", - "6862263481704547b805af8ba944438e1a6e63e9", + "13bac0eb-14bc-4438-b279-5ee1b0e5d7ba/0", + "", + 45742, + "source-test-mozlint-eslint", + "ES", + "2019-07-11T18:31:28.793871", + "i-0dc2f5a575e7b5b6b", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "lint", + 511138, + "scheduled", + "ec9db1ff1fa4ed47f184884ae052245718689fb2", + "success", + 511138, + "ec9db1ff1fa4ed47f184884ae052245718689fb2", + 1562868137, "completed", - 2 + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868611, + 1, + 255534269, + "", + 930, + "Node tests", + "node", + "0d8b6ed1-bb20-4b38-a32a-7a354467bab2/0", + "", + 183955, + "source-test-node-devtools-tests", + "devtools", + "2019-07-11T18:10:12.866630", + "i-0ecf33b3ac07d4c68", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "c3f943258eb95f1d6df5fb35ab3c4b26e7fe8201", + "success", + 511138, + "c3f943258eb95f1d6df5fb35ab3c4b26e7fe8201", + 1562868137, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868502, + 1, + 255534270, + "", + 2, + "unknown", + "?", + "55f9d92f-1cac-407d-8fc8-678eebe31cb3/0", + "", + 83160, + "build-linux64/debug", + "Ba", + "2019-07-11T18:08:24.781131", + "i-0523588427b84d117", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511138, + "scheduled", + "9247364513dd239c3ca720c72e50a864db0608fd", + "success", + 511138, + "9247364513dd239c3ca720c72e50a864db0608fd", + 1562868137, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "windows2012-64", + 196, + "taskcluster", + 1562869543, + 1, + 255534271, + "", + 2, + "unknown", + "?", + "2b411cf4-bf52-4dda-b107-2ce064efa979/0", + "", + 83165, + "build-win64/debug", + "Ba", + "2019-07-11T18:25:46.194264", + "i-045da46078bc781d3", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "windows2012-64", + 511138, + "scheduled", + "952968563457d6c10dc277661c51c9ab7caabad0", + "success", + 511138, + "952968563457d6c10dc277661c51c9ab7caabad0", + 1562868137, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868472, + 1, + 255534274, + "", + 2, + "unknown", + "?", + "71f12506-a216-442a-b1d0-f7fff293cdac/0", + "", + 81792, + "build-linux64/opt", + "Ba", + "2019-07-11T18:07:56.606211", + "i-009b3b7a55b6f5155", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "c284e0d576f6ce9841754102a58cf246e924c9bb", + "success", + 511138, + "c284e0d576f6ce9841754102a58cf246e924c9bb", + 1562868137, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "windows2012-64", + 196, + "taskcluster", + 1562869344, + 1, + 255534280, + "", + 2, + "unknown", + "?", + "436ff880-9d70-47b6-a622-e31825e55739/0", + "", + 83163, + "build-win64/opt", + "Ba", + "2019-07-11T18:22:26.727919", + "i-0d014c038bbb63011", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "windows2012-64", + 511138, + "scheduled", + "38f704c7e00ed8f93ee05b2029f1afdc6364699e", + "success", + 511138, + "38f704c7e00ed8f93ee05b2029f1afdc6364699e", + 1562868137, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "osx-shippable", + 533, + "taskcluster", + 1562868346, + 1, + 255534281, + "", + 2, + "unknown", + "?", + "7a81ff95-c7e4-4a89-a46e-9a7eb16ecb71/0", + "", + 183949, + "build-macosx64-shippable/opt", + "Ba", + "2019-07-11T18:05:49.053596", + "i-01526408b562b9911", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "osx-shippable", + 511138, + "scheduled", + "d4a2b00def26d2e99eeafce92b6471e5a4867b2f", + "success", + 511138, + "d4a2b00def26d2e99eeafce92b6471e5a4867b2f", + 1562868138, + "completed", + 1562868119, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562905998, + 1, + 255534895, + "", + 448, + "Mochitests", + "M", + "6cbe4cbd-0437-44df-9c76-9c3b4e7ecd53/0", + "", + 198358, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-6", + "dt6", + "2019-07-12T04:33:21.012954", + "t-mojave-r7-155", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "3d216a8422c419b93755ebc50b34064aaf98c316", + "success", + 511138, + "3d216a8422c419b93755ebc50b34064aaf98c316", + 1562905381, + "completed", + 1562868122, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562906078, + 1, + 255534896, + "", + 977, + "Mochitests without e10s", + "M-1proc", + "703e5d18-7df5-4434-aa14-fb89b06ebf6d/0", + "", + 198488, + "test-macosx1014-64/debug-mochitest-chrome-1proc-1", + "c1", + "2019-07-12T04:34:42.776012", + "t-mojave-r7-305", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "a704ce0f58696eb4051200b314c2a5814182fac1", + "success", + 511138, + "a704ce0f58696eb4051200b314c2a5814182fac1", + 1562905396, + "completed", + 1562868122, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562906191, + 1, + 255534897, + "", + 977, + "Mochitests without e10s", + "M-1proc", + "5d09709a-11ba-49cd-81aa-b2780b6d5dee/0", + "", + 198295, + "test-macosx1014-64/debug-mochitest-chrome-1proc-2", + "c2", + "2019-07-12T04:36:34.895244", + "t-mojave-r7-127", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "a2db8b49bfdb61c62e1ef4202a4266172ccd586f", + "success", + 511138, + "a2db8b49bfdb61c62e1ef4202a4266172ccd586f", + 1562905372, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562905998, + 1, + 255534898, + "", + 448, + "Mochitests", + "M", + "003f9c0a-f209-4755-888f-9e2ebde9d289/0", + "", + 198434, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-4", + "dt4", + "2019-07-12T04:33:21.564361", + "t-mojave-r7-075", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "0b3e5cefd49b6ead4ac25118d896ac01cefc6fe1", + "success", + 511138, + "0b3e5cefd49b6ead4ac25118d896ac01cefc6fe1", + 1562905400, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562910854, + 1, + 255534899, + "", + 448, + "Mochitests", + "M", + "11426bf1-cc8d-462d-ba3d-a0daceea6b3e/0", + "", + 198393, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-3", + "dt3", + "2019-07-12T05:54:16.360941", + "t-mojave-r7-366", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "6b7b451b27c3767ebf552f6891e8fd660eefa4a1", + "testfailed", + 511138, + "6b7b451b27c3767ebf552f6891e8fd660eefa4a1", + 1562905409, + "completed", + 1562868122, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562906004, + 1, + 255534900, + "", + 448, + "Mochitests", + "M", + "12a07c3c-d14d-4b55-a68f-5cf80bd12315/0", + "", + 198379, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-5", + "dt5", + "2019-07-12T04:33:27.102438", + "t-mojave-r7-328", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "7f31650bb24b1a181f30c936cfd145b60d90a598", + "success", + 511138, + "7f31650bb24b1a181f30c936cfd145b60d90a598", + 1562905425, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562905953, + 1, + 255534901, + "", + 448, + "Mochitests", + "M", + "44b3d8f5-b206-4363-953d-a8ca2596dea9/0", + "", + 198292, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-2", + "dt2", + "2019-07-12T04:32:36.141526", + "t-mojave-r7-220", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "2a61a1f1fb6e0001e7fe0058cf542ce3c190774f", + "success", + 511138, + "2a61a1f1fb6e0001e7fe0058cf542ce3c190774f", + 1562905436, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562906369, + 1, + 255534902, + "", + 448, + "Mochitests", + "M", + "4afed6eb-60e2-4e28-a388-3aeb8132e24b/0", + "", + 198322, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-1", + "dt1", + "2019-07-12T04:39:34.531505", + "t-mojave-r7-314", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "ba8e9453f7dbef0d24e77ef8a236cdec0c4d9ef7", + "success", + 511138, + "ba8e9453f7dbef0d24e77ef8a236cdec0c4d9ef7", + 1562905383, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562905990, + 1, + 255534903, + "", + 448, + "Mochitests", + "M", + "1d12b1a0-4307-41c3-8a96-0e257464d8f3/0", + "", + 198466, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-8", + "dt8", + "2019-07-12T04:33:15.107315", + "t-mojave-r7-406", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "a1a17c6078842e62b44b982cb6d9d8e67ff50886", + "success", + 511138, + "a1a17c6078842e62b44b982cb6d9d8e67ff50886", + 1562905426, + "completed", + 1562868122, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "macosx1014-64", + 614, + "taskcluster", + 1562905896, + 1, + 255534904, + "", + 448, + "Mochitests", + "M", + "35b4e983-6514-4efa-a06e-286cee4f9d2e/0", + "", + 198385, + "test-macosx1014-64/debug-mochitest-devtools-chrome-e10s-7", + "dt7", + "2019-07-12T04:31:39.716291", + "t-mojave-r7-329", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "macosx1014-64", + 511138, + "scheduled", + "a8f987c64cb5d9fed085643651be11957b42d96f", + "success", + 511138, + "a8f987c64cb5d9fed085643651be11957b42d96f", + 1562905413, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562873878, + 1, + 255535210, + "", + 448, + "Mochitests", + "M", + "66ce72d3-7c7f-48de-8144-d39dacf7de4a/0", + "", + 32346, + "test-linux64/opt-mochitest-devtools-chrome-e10s-4", + "dt4", + "2019-07-11T19:38:00.071566", + "i-05f1bdcb1d69937bc", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "616c8bd820f3e35d248b6f48b286fdfb72f60c83", + "testfailed", + 511138, + "616c8bd820f3e35d248b6f48b286fdfb72f60c83", + 1562868473, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562869608, + 1, + 255535211, + "", + 448, + "Mochitests", + "M", + "6f401409-9bc6-463f-8947-bc7c2d9ae662/0", + "", + 32350, + "test-linux64/opt-mochitest-devtools-chrome-e10s-1", + "dt1", + "2019-07-11T18:26:51.239082", + "i-07c5851ff60432023", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "31ed6b568446d6b9bac5e7ba86b9b1eb8e4080f8", + "success", + 511138, + "31ed6b568446d6b9bac5e7ba86b9b1eb8e4080f8", + 1562868474, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562869715, + 1, + 255535212, + "", + 448, + "Mochitests", + "M", + "33a757e7-d08a-4823-afce-a57bdb435d13/0", + "", + 32342, + "test-linux64/opt-mochitest-devtools-chrome-e10s-5", + "dt5", + "2019-07-11T18:28:42.086472", + "i-03379f07019664739", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "667a1cc1d082eada29a4cbc8c634a95778d5016b", + "success", + 511138, + "667a1cc1d082eada29a4cbc8c634a95778d5016b", + 1562868474, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562869505, + 1, + 255535213, + "", + 977, + "Mochitests without e10s", + "M-1proc", + "09b0aa7e-e367-46f5-a2cf-0347ae35d21a/0", + "", + 191654, + "test-linux64/opt-mochitest-chrome-1proc-1", + "c1", + "2019-07-11T18:25:11.257113", + "i-06a798bb9be6406a5", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "7c88574fec37e19167035606f0e2827ace7b33ce", + "success", + 511138, + "7c88574fec37e19167035606f0e2827ace7b33ce", + 1562868474, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562869357, + 1, + 255535214, + "", + 452, + "Xpcshell tests", + "X", + "5dba7939-7393-4719-8f01-3c3d6ee3be10/0", + "", + 195647, + "test-linux64/opt-xpcshell-e10s-4", + "X4", + "2019-07-11T18:22:40.965310", + "i-04da3bcc7757e0882", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "467a84f27b106ecadda0af9f00f3a16e2c9a7dda", + "success", + 511138, + "467a84f27b106ecadda0af9f00f3a16e2c9a7dda", + 1562868474, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868881, + 1, + 255535215, + "", + 452, + "Xpcshell tests", + "X", + "271f2d16-3105-436f-b154-a48e79842428/0", + "", + 195637, + "test-linux64/opt-xpcshell-e10s-2", + "X2", + "2019-07-11T18:14:44.664926", + "i-04a15f9685cd700fd", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "9b33d7603c4611a71206987fe199bd2ca4daeb33", + "success", + 511138, + "9b33d7603c4611a71206987fe199bd2ca4daeb33", + 1562868474, + "completed", + 1562868122, + 1, + "jarilvalenciano@gmail.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562869971, + 1, + 255535216, + "", + 448, + "Mochitests", + "M", + "12262fb1-deac-4301-9403-3b673ab93cdb/0", + "", + 32319, + "test-linux64/opt-mochitest-devtools-chrome-e10s-2", + "dt2", + "2019-07-11T18:32:55.071983", + "i-029dcb7abbb4b0f09", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511138, + "scheduled", + "54dfb1089e81226ef73871154132582b8ef07181", + "success", + 511138, + "54dfb1089e81226ef73871154132582b8ef07181", + 1562868473, + "completed", + 1562868121, + 1, + "jarilvalenciano@gmail.com", + "opt" ] ], "job_property_names": [ - "duration", + "build_architecture", + "build_os", + "build_platform", + "build_platform_id", + "build_system_type", + "end_timestamp", "failure_classification_id", "id", + "job_group_description", + "job_group_id", "job_group_name", "job_group_symbol", + "job_guid", + "job_type_description", + "job_type_id", "job_type_name", "job_type_symbol", "last_modified", + "machine_name", + "machine_platform_architecture", + "machine_platform_os", "option_collection_hash", "platform", - "platform_option", "push_id", + "reason", + "ref_data_name", "result", + "result_set_id", "signature", + "start_timestamp", "state", - "tier" - ] + "submit_timestamp", + "tier", + "who", + "platform_option" + ], + "meta": { "repository": "try", "offset": 0, "count": 2000 } } diff --git a/tests/ui/mock/job_list/job_2.json b/tests/ui/mock/job_list/job_2.json index ae1d19f6d..34a2f88f5 100644 --- a/tests/ui/mock/job_list/job_2.json +++ b/tests/ui/mock/job_list/job_2.json @@ -1,79 +1,1041 @@ { - "count": 3, - "next": null, - "previous": null, "results": [ [ + "-", + "-", + "gecko-decision", + 107, + "taskcluster", + 1562868135, + 1, + 255534076, + "", 2, - 1, - 259539684, "unknown", "?", - "test-android-hw-p2-8-0-arm7-api-16/debug-fennec-jittest-1proc-2", - "Jit2", - "2019-08-05T20:43:34.976210", - "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-hw-p2-8-0-arm7-api-16", - "debug", - 526445, - "testfailed", - "f64069faca8636e9dc415bef8e9a4ee055d56687", + "36961a86-bb31-4bdd-931a-319cb7dc52b6/0", + "", + 6689, + "Gecko Decision Task", + "D", + "2019-07-11T18:02:36.580677", + "i-0b2b25f39211e2e1e", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "gecko-decision", + 511137, + "scheduled", + "2aa083621bb989d6acf1151667288d5fe9616178", + "success", + 511137, + "2aa083621bb989d6acf1151667288d5fe9616178", + 1562867999, "completed", - 2 + 1562867998, + 1, + "bhackett@mozilla.com", + "opt" ], [ - 39, + "-", + "-", + "linux64-shippable", + 537, + "taskcluster", + 1562869536, 1, - 259539687, - "unknown", - "?", - "test-android-hw-p2-8-0-arm7-api-16/debug-fennec-jittest-1proc-3", - "Jit3", - "2019-08-05T20:37:31.533456", - "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-hw-p2-8-0-arm7-api-16", - "debug", - 526445, - "unknown", - "f1b24ad44778abca1b8f38e9c40a6b7d0306baa2", - "pending", - 2 + 255534272, + "", + 919, + "Profile-guided optimization builds", + "Bpgo", + "2a3e1d9b-663a-47ba-8074-8dd0e7b68ed4/0", + "", + 191626, + "instrumented-build-linux64-shippable/opt", + "instr", + "2019-07-11T18:25:43.181190", + "i-0713ee7840aabf104", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64-shippable", + 511137, + "scheduled", + "a4440d4250bf439c15d8327642ccedf7cdf50124", + "success", + 511137, + "a4440d4250bf439c15d8327642ccedf7cdf50124", + 1562868138, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" ], [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 0, 1, - 1, - 259539688, + 255534273, + "", + 2, "unknown", "?", - "test-android-hw-p2-8-0-arm7-api-16/debug-fennec-jittest-1proc-8", - "Jit8", - "2019-08-05T20:57:09.299269", + "105d4b96-2888-4bd7-8ccf-b2c8ba6573ef/0", + "", + 17572, + "build-linux64/debug", + "B", + "2019-07-11T18:06:30.092824", + "i-0907d771a0e9525b7", + "-", + "-", "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-hw-p2-8-0-arm7-api-16", - "debug", - 526445, + "linux64", + 511137, + "scheduled", + "321e3e67c5cd3e3fb595ac7c2534ab47f8868937", + "retry", + 511137, + "321e3e67c5cd3e3fb595ac7c2534ab47f8868937", + 0, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868626, + 1, + 255534275, + "", + 930, + "Node tests", + "node", + "69a88ff4-2868-4006-8837-3439265294dd/0", + "", + 183955, + "source-test-node-devtools-tests", + "devtools", + "2019-07-11T18:10:28.073263", + "i-0b4b87d8fa5dd0ea3", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511137, + "scheduled", + "c3f943258eb95f1d6df5fb35ab3c4b26e7fe8201", + "success", + 511137, + "c3f943258eb95f1d6df5fb35ab3c4b26e7fe8201", + 1562868138, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "lint", + 144, + "taskcluster", + 1562868502, + 1, + 255534276, + "", + 2, "unknown", - "33ba86f5b1d8ad61599cb04b8d1f50b97fe19379", - "running", - 2 + "?", + "334910af-363e-43dd-8b32-ead800955a8a/0", + "", + 83394, + "source-test-mozlint-test-manifest", + "tm", + "2019-07-11T18:08:23.729888", + "i-01bb23b666f148a67", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "lint", + 511137, + "scheduled", + "bd6012ddc0f86eee04428ef7dba340176bc13358", + "success", + 511137, + "bd6012ddc0f86eee04428ef7dba340176bc13358", + 1562868137, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562869866, + 1, + 255534277, + "", + 2, + "unknown", + "?", + "3abd3c8e-d7a0-401f-baf4-12e546a72559/0", + "", + 18241, + "build-linux64-asan/opt", + "Bo", + "2019-07-11T18:31:15.427449", + "i-00e1add05f1d0d1c7", + "-", + "-", + "03abd064e50ec12b8c7309950268531d78c63f60", + "linux64", + 511137, + "scheduled", + "25c3c0dcb575b3d8b6ab1aebc2322b797c202d7c", + "success", + 511137, + "25c3c0dcb575b3d8b6ab1aebc2322b797c202d7c", + 1562868138, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "asan" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 0, + 1, + 255534278, + "", + 2, + "unknown", + "?", + "7b6c8100-1b7e-4598-9711-ba117dd40237/0", + "", + 18242, + "build-linux64/opt", + "B", + "2019-07-11T18:22:46.776276", + "i-006a00a753ee699e6", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511137, + "scheduled", + "bb3134072cbf386e9104ec2e61df7d2bbaded0f9", + "retry", + 511137, + "bb3134072cbf386e9104ec2e61df7d2bbaded0f9", + 0, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562868752, + 1, + 255534279, + "", + 930, + "Node tests", + "node", + "223473d1-c2e5-41b3-bfc6-3ea967d1c53f/0", + "", + 181660, + "source-test-node-debugger-tests", + "debugger", + "2019-07-11T18:12:41.023315", + "i-02dbfac9d3322d7bc", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511137, + "scheduled", + "d33573c73d1bf521fe4182dad7ffc3cf086e7cc6", + "success", + 511137, + "d33573c73d1bf521fe4182dad7ffc3cf086e7cc6", + 1562868137, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "lint", + 144, + "taskcluster", + 1562868592, + 1, + 255534282, + "", + 2, + "unknown", + "?", + "0fce9418-0dad-4b31-a21d-a707c9115c1e/0", + "", + 117120, + "source-test-mozlint-mingw-cap", + "mingw", + "2019-07-11T18:09:59.441781", + "i-0e85aacfd01c5b614", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "lint", + 511137, + "scheduled", + "df0a841c91777de31636e01deb2973232ccea801", + "success", + 511137, + "df0a841c91777de31636e01deb2973232ccea801", + 1562868137, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "lint", + 144, + "taskcluster", + 1562868503, + 1, + 255534283, + "", + 2, + "unknown", + "?", + "72c91174-caa0-44b3-a9e2-841848541879/0", + "", + 114754, + "source-test-mozlint-codespell", + "spell", + "2019-07-11T18:08:24.417232", + "i-08eb453beee83891b", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "lint", + 511137, + "scheduled", + "6c2e8db7978ca4d5c0e38522552da4bc9b2e6b8b", + "success", + 511137, + "6c2e8db7978ca4d5c0e38522552da4bc9b2e6b8b", + 1562868137, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "lint", + 144, + "taskcluster", + 1562869159, + 1, + 255534284, + "", + 2, + "unknown", + "?", + "72b4d714-60db-4438-9d88-2807ed7565a2/0", + "", + 45742, + "source-test-mozlint-eslint", + "ES", + "2019-07-11T18:19:21.123020", + "i-0833eaaa85959cc22", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "lint", + 511137, + "scheduled", + "ec9db1ff1fa4ed47f184884ae052245718689fb2", + "success", + 511137, + "ec9db1ff1fa4ed47f184884ae052245718689fb2", + 1562868137, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "lint", + 144, + "taskcluster", + 1562868289, + 1, + 255534285, + "", + 2, + "unknown", + "?", + "51bc44ee-c72f-4920-b9cd-dc92b597bc62/0", + "", + 115834, + "source-test-mozlint-cpp-virtual-final", + "Cvf", + "2019-07-11T18:04:50.503990", + "i-0952f8b16ec5dae12", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "lint", + 511137, + "scheduled", + "96788539a90c6ced55f721373e75eabc1be7a990", + "success", + 511137, + "96788539a90c6ced55f721373e75eabc1be7a990", + 1562868138, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562870352, + 1, + 255534946, + "", + 2, + "unknown", + "?", + "105d4b96-2888-4bd7-8ccf-b2c8ba6573ef/1", + "", + 17572, + "build-linux64/debug", + "B", + "2019-07-11T18:39:33.099294", + "i-0140e2664c162a809", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511137, + "scheduled", + "321e3e67c5cd3e3fb595ac7c2534ab47f8868937", + "success", + 511137, + "321e3e67c5cd3e3fb595ac7c2534ab47f8868937", + 1562868403, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562870838, + 1, + 255538255, + "", + 2, + "unknown", + "?", + "7b6c8100-1b7e-4598-9711-ba117dd40237/1", + "", + 18242, + "build-linux64/opt", + "B", + "2019-07-11T18:47:44.871526", + "i-0eb5b669cba289a2f", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64", + 511137, + "scheduled", + "bb3134072cbf386e9104ec2e61df7d2bbaded0f9", + "success", + 511137, + "bb3134072cbf386e9104ec2e61df7d2bbaded0f9", + 1562869380, + "completed", + 1562868107, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "linux64-shippable", + 537, + "taskcluster", + 1562869816, + 1, + 255538593, + "", + 919, + "Profile-guided optimization builds", + "Bpgo", + "09ac0442-e643-4097-bcab-504de31010c2/0", + "", + 191629, + "generate-profile-linux64-shippable/opt", + "run", + "2019-07-11T18:30:18.874441", + "i-098ac48089e5efc02", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64-shippable", + 511137, + "scheduled", + "bddc5c8fc7163661c763bbe1010cd14df2187c2f", + "success", + 511137, + "bddc5c8fc7163661c763bbe1010cd14df2187c2f", + 1562869541, + "completed", + 1562868110, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "linux64-shippable", + 537, + "taskcluster", + 0, + 1, + 255539275, + "", + 919, + "Profile-guided optimization builds", + "Bpgo", + "096b4431-d2cd-461f-8b2e-92df83c62c9d/0", + "", + 181699, + "build-linux64-shippable/opt", + "B", + "2019-07-11T19:18:03.692027", + "i-0598af137c4456642", + "-", + "-", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "linux64-shippable", + 511137, + "scheduled", + "361b34c4049f591eddf788f0a75a03a9771d6043", + "retry", + 511137, + "361b34c4049f591eddf788f0a75a03a9771d6043", + 0, + "completed", + 1562868114, + 1, + "bhackett@mozilla.com", + "opt" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562871731, + 1, + 255539594, + "", + 452, + "Xpcshell tests", + "X", + "3f022ed4-3585-4ea4-8349-656f44059feb/0", + "", + 195692, + "test-linux64-asan/opt-xpcshell-e10s-5", + "X5", + "2019-07-11T19:02:13.286013", + "i-09369a7b10b82709a", + "-", + "-", + "03abd064e50ec12b8c7309950268531d78c63f60", + "linux64", + 511137, + "scheduled", + "a8d1ff71489a02748116794341f44686334428ef", + "success", + 511137, + "a8d1ff71489a02748116794341f44686334428ef", + 1562870122, + "completed", + 1562868111, + 1, + "bhackett@mozilla.com", + "asan" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562871479, + 1, + 255539595, + "", + 452, + "Xpcshell tests", + "X", + "0bd559d7-4cab-4f33-8695-1fa420ce708e/0", + "", + 195691, + "test-linux64-asan/opt-xpcshell-e10s-1", + "X1", + "2019-07-11T18:58:01.927436", + "i-0471049c4f94a8a2f", + "-", + "-", + "03abd064e50ec12b8c7309950268531d78c63f60", + "linux64", + 511137, + "scheduled", + "3f501a6e712cf4a810f9d90e475ba7af24c2bc60", + "success", + 511137, + "3f501a6e712cf4a810f9d90e475ba7af24c2bc60", + 1562870128, + "completed", + 1562868111, + 1, + "bhackett@mozilla.com", + "asan" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562871045, + 1, + 255539596, + "", + 452, + "Xpcshell tests", + "X", + "1940decd-9373-49c6-a593-f3f75ea887db/0", + "", + 195687, + "test-linux64-asan/opt-xpcshell-e10s-3", + "X3", + "2019-07-11T18:50:48.066451", + "i-0ae5b4d030ca5c32b", + "-", + "-", + "03abd064e50ec12b8c7309950268531d78c63f60", + "linux64", + 511137, + "scheduled", + "d5cd1277f808d330b3347fb37fb0aef5718c58ee", + "success", + 511137, + "d5cd1277f808d330b3347fb37fb0aef5718c58ee", + 1562870128, + "completed", + 1562868111, + 1, + "bhackett@mozilla.com", + "asan" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562871704, + 1, + 255539597, + "", + 452, + "Xpcshell tests", + "X", + "423633a8-dcc1-4954-8f7a-4a10f31ec144/0", + "", + 195695, + "test-linux64-asan/opt-xpcshell-e10s-4", + "X4", + "2019-07-11T19:01:52.253525", + "i-098885d405fd36cbe", + "-", + "-", + "03abd064e50ec12b8c7309950268531d78c63f60", + "linux64", + 511137, + "scheduled", + "45254ae0a047de1f7010d1bf3cb47695d2936f35", + "success", + 511137, + "45254ae0a047de1f7010d1bf3cb47695d2936f35", + 1562870126, + "completed", + 1562868111, + 1, + "bhackett@mozilla.com", + "asan" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562870884, + 1, + 255539598, + "", + 452, + "Xpcshell tests", + "X", + "532c9c14-c997-4571-ac0f-ef8cb411bca1/0", + "", + 195686, + "test-linux64-asan/opt-xpcshell-e10s-2", + "X2", + "2019-07-11T18:48:12.756545", + "i-0159aaa267335d02c", + "-", + "-", + "03abd064e50ec12b8c7309950268531d78c63f60", + "linux64", + 511137, + "scheduled", + "5d092929e31cb8bf39ec5751aa8a34fa34f89c0e", + "success", + 511137, + "5d092929e31cb8bf39ec5751aa8a34fa34f89c0e", + 1562870128, + "completed", + 1562868114, + 1, + "bhackett@mozilla.com", + "asan" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562871778, + 1, + 255541674, + "", + 448, + "Mochitests", + "M", + "17e94c5f-c8ff-4f9d-b5f6-680c82378785/0", + "", + 34121, + "test-linux64/debug-mochitest-devtools-chrome-e10s-2", + "dt2", + "2019-07-11T19:03:07.446612", + "i-07e831789148b638d", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511137, + "scheduled", + "817f8284d7350dcec8893af7c428a7e58da4a8d6", + "success", + 511137, + "817f8284d7350dcec8893af7c428a7e58da4a8d6", + 1562870627, + "completed", + 1562868114, + 1, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562872015, + 1, + 255541675, + "", + 906, + "Xpcshell tests with serviceworker redesign", + "X-sw", + "159f710e-69c6-4f84-beda-9c30bc04712e/0", + "", + 195576, + "test-linux64/debug-xpcshell-sw-e10s-4", + "X4", + "2019-07-11T19:06:58.253394", + "i-058cfc9c4b4ef0b5d", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511137, + "scheduled", + "5f8591c730a832c20cd2128e10699c3cb1765b82", + "success", + 511137, + "5f8591c730a832c20cd2128e10699c3cb1765b82", + 1562870628, + "completed", + 1562868111, + 2, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64-qr", + 244, + "taskcluster", + 1562871956, + 1, + 255541676, + "", + 452, + "Xpcshell tests", + "X", + "52d2f6a5-1d84-40c7-83fe-cbb03c6944b3/0", + "", + 195599, + "test-linux64-qr/debug-xpcshell-e10s-6", + "X6", + "2019-07-11T19:06:04.077638", + "i-06d302ecc354d3997", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64-qr", + 511137, + "scheduled", + "a37e1aee6234b86f4738ad083ac841161b09b345", + "success", + 511137, + "a37e1aee6234b86f4738ad083ac841161b09b345", + 1562870629, + "completed", + 1562868111, + 1, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562872479, + 1, + 255541677, + "", + 905, + "Mochitests with serviceworker redesign", + "M-sw", + "06121edc-7de0-41c0-a0df-1d529d195045/0", + "", + 173723, + "test-linux64/debug-mochitest-browser-chrome-sw-e10s-10", + "bc10", + "2019-07-11T19:14:47.571210", + "i-0fa0f6af2046c1160", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511137, + "scheduled", + "488bae4b54f599798df814b2ad4a87324c3f6030", + "success", + 511137, + "488bae4b54f599798df814b2ad4a87324c3f6030", + 1562870655, + "completed", + 1562868114, + 2, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562871795, + 1, + 255541678, + "", + 906, + "Xpcshell tests with serviceworker redesign", + "X-sw", + "7d4fffc8-7137-4cf5-849e-bb0a146004ce/0", + "", + 195594, + "test-linux64/debug-xpcshell-sw-e10s-1", + "X1", + "2019-07-11T19:03:23.198244", + "i-0db25ab0c80add495", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511137, + "scheduled", + "95d26064dd8d4004a93f4de286827ad852454a4e", + "success", + 511137, + "95d26064dd8d4004a93f4de286827ad852454a4e", + 1562870633, + "completed", + 1562868111, + 2, + "bhackett@mozilla.com", + "debug" + ], + [ + "-", + "-", + "linux64", + 106, + "taskcluster", + 1562872147, + 1, + 255541679, + "", + 448, + "Mochitests", + "M", + "23363a0b-036e-4d33-968f-9095b12eae83/0", + "", + 174589, + "test-linux64/debug-mochitest-devtools-chrome-e10s-9", + "dt9", + "2019-07-11T19:09:12.055210", + "i-042f8ccadfa43e3ea", + "-", + "-", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "linux64", + 511137, + "scheduled", + "0f7a9216c347449b134b2ebb18f4081e0f24241e", + "success", + 511137, + "0f7a9216c347449b134b2ebb18f4081e0f24241e", + 1562870639, + "completed", + 1562868111, + 1, + "bhackett@mozilla.com", + "debug" ] ], "job_property_names": [ - "duration", + "build_architecture", + "build_os", + "build_platform", + "build_platform_id", + "build_system_type", + "end_timestamp", "failure_classification_id", "id", + "job_group_description", + "job_group_id", "job_group_name", "job_group_symbol", + "job_guid", + "job_type_description", + "job_type_id", "job_type_name", "job_type_symbol", "last_modified", + "machine_name", + "machine_platform_architecture", + "machine_platform_os", "option_collection_hash", "platform", - "platform_option", "push_id", + "reason", + "ref_data_name", "result", + "result_set_id", "signature", + "start_timestamp", "state", - "tier" - ] + "submit_timestamp", + "tier", + "who", + "platform_option" + ], + "meta": { "repository": "try", "offset": 0, "count": 2000 } } diff --git a/tests/ui/mock/job_list/pagination/page_1.json b/tests/ui/mock/job_list/pagination/page_1.json index a0fd2ea56..ab00f4c72 100644 --- a/tests/ui/mock/job_list/pagination/page_1.json +++ b/tests/ui/mock/job_list/pagination/page_1.json @@ -1,61 +1,106 @@ { - "count": 2, - "next": "/jobs/?push_id=526443&page=2", - "previous": null, + "meta": { + "count": 2, + "repository": "mozilla-central", + "offset": 0 + }, + "job_property_names": [ + "submit_timestamp", + "machine_name", + "job_group_symbol", + "job_group_name", + "platform_option", + "job_type_description", + "result_set_id", + "result", + "id", + "machine_platform_architecture", + "end_timestamp", + "build_platform", + "job_guid", + "job_type_name", + "ref_data_name", + "platform", + "state", + "build_os", + "option_collection_hash", + "who", + "failure_classification_id", + "job_type_symbol", + "reason", + "job_group_description", + "machine_platform_os", + "start_timestamp", + "build_architecture", + "last_modified", + "build_platform_id" + ], "results": [ [ - 2, - 1, - 259537193, + 1424270698, "unknown", "?", - "Gecko Decision Task", - "D", - "2019-08-05T20:19:51.818175", - "102210fe594ee9b33d82058545b1ed14f4c8206e", - "gecko-decision", + "unknown", "opt", - 526443, - "success", - "2aa083621bb989d6acf1151667288d5fe9616178", - "completed", - 1 + "", + 1, + "unknown", + 1, + "x86", + 0, + "linux32", + "effdbbfd128cbe4a29e8d418230d708eea165c94", + "Build", + "Linux mozilla-inbound build", + "linux32", + "running", + 216, + "linux", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "unknown", + 1, + "B", + "unknown", + "", + null, + "linux", + 1424271878, + "x86", + "2015-01-18T15:06:03", + 17 ], [ - 18, - 1, - 259537372, - "unknown", + 1424270698, + "bld-linux64-spot-423", "?", - "build-android-api-16/debug", - "B", - "2019-08-05T20:37:45.258535", - "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-4-0-armv7-api16", + "unknown", "debug", - 526443, + "", + 1, "success", - "e2e58eb7f14af83019d3f8433c0642dde8082c4d", + 2, + "x86", + 1424272397, + "linux32", + "c63409cac418eb147286dfde9f773de6b2ad14b0", + "Build", + "Linux mozilla-inbound leak test build", + "linux32", "completed", - 1 + 209, + "linux", + "32faaecac742100f7753f0c1d0aa0add01b4046b", + "mozilla-inbound-firefox", + 1, + "B", + "scheduler", + "", + null, + "linux", + 1424270703, + "x86", + "2015-01-18T15:19:17", + 17 ] - ], - "job_property_names": [ - "duration", - "failure_classification_id", - "id", - "job_group_name", - "job_group_symbol", - "job_type_name", - "job_type_symbol", - "last_modified", - "option_collection_hash", - "platform", - "platform_option", - "push_id", - "result", - "signature", - "state", - "tier" ] } diff --git a/tests/ui/mock/job_list/pagination/page_2.json b/tests/ui/mock/job_list/pagination/page_2.json index 39ea41d52..9a57779cc 100644 --- a/tests/ui/mock/job_list/pagination/page_2.json +++ b/tests/ui/mock/job_list/pagination/page_2.json @@ -1,43 +1,73 @@ { - "count": 1, - "next": null, - "previous": null, + "meta": { + "count": 2, + "repository": "mozilla-central", + "offset": 2 + }, + "job_property_names": [ + "submit_timestamp", + "machine_name", + "job_group_symbol", + "job_group_name", + "platform_option", + "job_type_description", + "result_set_id", + "result", + "id", + "machine_platform_architecture", + "end_timestamp", + "build_platform", + "job_guid", + "job_type_name", + "ref_data_name", + "platform", + "state", + "build_os", + "option_collection_hash", + "who", + "failure_classification_id", + "job_type_symbol", + "reason", + "job_group_description", + "machine_platform_os", + "start_timestamp", + "build_architecture", + "last_modified", + "build_platform_id" + ], "results": [ [ - 1, - 1, - 259539688, + 1424270698, "unknown", "?", - "test-android-hw-p2-8-0-arm7-api-16/debug-fennec-jittest-1proc-8", - "Jit8", - "2019-08-05T20:57:09.299269", - "32faaecac742100f7753f0c1d0aa0add01b4046b", - "android-hw-p2-8-0-arm7-api-16", - "debug", - 526443, "unknown", - "33ba86f5b1d8ad61599cb04b8d1f50b97fe19379", + "opt", + "", + 1, + "unknown", + 3, + "x86", + 0, + "linux32", + "effdbbfd128cbe4a29e8d418230d708eea165c94", + "Build", + "Linux mozilla-inbound build", + "linux32", "running", - 2 + 216, + "linux", + "102210fe594ee9b33d82058545b1ed14f4c8206e", + "unknown", + 1, + "B", + "unknown", + "", + null, + "linux", + 1424271878, + "x86", + "2015-01-18T15:06:03", + 17 ] - ], - "job_property_names": [ - "duration", - "failure_classification_id", - "id", - "job_group_name", - "job_group_symbol", - "job_type_name", - "job_type_symbol", - "last_modified", - "option_collection_hash", - "platform", - "platform_option", - "push_id", - "result", - "signature", - "state", - "tier" ] } diff --git a/tests/ui/models/jobs_test.js b/tests/ui/models/jobs_test.js index 39263f273..a8a3f9704 100644 --- a/tests/ui/models/jobs_test.js +++ b/tests/ui/models/jobs_test.js @@ -1,7 +1,8 @@ import { fetchMock } from 'fetch-mock'; import JobModel from '../../../ui/models/job'; -import { getApiUrl } from '../../../ui/helpers/url'; +import { getProjectUrl } from '../../../ui/helpers/location'; +import jobListFixtureOne from '../mock/job_list/job_1'; import paginatedJobListFixtureOne from '../mock/job_list/pagination/page_1'; import paginatedJobListFixtureTwo from '../mock/job_list/pagination/page_2'; @@ -10,15 +11,25 @@ describe('JobModel', () => { fetchMock.reset(); }); + describe('getList', () => { + beforeEach(() => { + fetchMock.mock(getProjectUrl('/jobs/'), jobListFixtureOne); + }); + + test('should return a promise', () => { + const result = JobModel.getList(); + expect(result.then).toBeDefined(); + }); + }); + describe('pagination', () => { beforeEach(() => { - fetchMock.mock(getApiUrl('/jobs/?count=2'), paginatedJobListFixtureOne); fetchMock.mock( - getApiUrl('/jobs/?push_id=526443'), + getProjectUrl('/jobs/?count=2'), paginatedJobListFixtureOne, ); fetchMock.mock( - getApiUrl('/jobs/?push_id=526443&page=2'), + getProjectUrl('/jobs/?count=2&offset=2'), paginatedJobListFixtureTwo, ); }); @@ -30,13 +41,10 @@ describe('JobModel', () => { }); test('should return all the pages when fetchAll==true', async () => { - const { data } = await JobModel.getList( - { push_id: 526443 }, - { fetchAll: true }, - ); + const { data } = await JobModel.getList({ count: 2 }, { fetchAll: true }); expect(data).toHaveLength(3); - expect(data[2].id).toBe(259539688); + expect(data[2].id).toBe(3); }); }); }); diff --git a/treeherder/model/models.py b/treeherder/model/models.py index c1af0bac8..0241690ae 100644 --- a/treeherder/model/models.py +++ b/treeherder/model/models.py @@ -18,8 +18,7 @@ from django.db.utils import ProgrammingError from django.forms import model_to_dict from django.utils import timezone -from treeherder.webapp.api.utils import (REPO_GROUPS, - to_timestamp) +from treeherder.webapp.api.utils import REPO_GROUPS from ..services.elasticsearch import (bulk, index) @@ -657,12 +656,6 @@ class Job(models.Model): return text_log_error - @staticmethod - def get_duration(submit_time, start_time, end_time): - endtime = end_time if to_timestamp(end_time) else datetime.datetime.now() - starttime = start_time if to_timestamp(start_time) else submit_time - return round((endtime - starttime).total_seconds() / 60) - class TaskclusterMetadata(models.Model): ''' diff --git a/treeherder/webapp/api/jobs.py b/treeherder/webapp/api/jobs.py index ad1526530..6802d1bfe 100644 --- a/treeherder/webapp/api/jobs.py +++ b/treeherder/webapp/api/jobs.py @@ -96,73 +96,9 @@ class JobFilter(django_filters.FilterSet): } -class JobsViewSet(viewsets.ReadOnlyModelViewSet): +class JobsViewSet(viewsets.ViewSet): """ - This viewset is the jobs endpoint. - """ - _default_select_related = [ - 'job_type', - 'job_group', - 'machine_platform', - 'signature', - ] - _query_field_names = [ - 'submit_time', - 'start_time', - 'end_time', - 'failure_classification_id', - 'id', - 'job_group__name', - 'job_group__symbol', - 'job_type__name', - 'job_type__symbol', - 'last_modified', - 'option_collection_hash', - 'machine_platform__platform', - 'option_collection_hash', - 'push_id', - 'result', - 'signature__signature', - 'state', - 'tier', - ] - _output_field_names = [ - 'failure_classification_id', - 'id', - 'job_group_name', - 'job_group_symbol', - 'job_type_name', - 'job_type_symbol', - 'last_modified', - 'platform', - 'push_id', - 'result', - 'signature', - 'state', - 'tier', - 'duration', - 'platform_option', - ] - queryset = Job.objects.all().order_by('id').select_related( - *_default_select_related - ).values(*_query_field_names) - serializer_class = serializers.JobSerializer - filterset_class = JobFilter - pagination_class = pagination.JobPagination - - def get_serializer_context(self): - option_collection_map = OptionCollection.objects.get_option_collection_map() - return {'option_collection_map': option_collection_map} - - def list(self, request, *args, **kwargs): - resp = super().list(request, *args, **kwargs) - resp.data['job_property_names'] = self._output_field_names - return Response(resp.data) - - -class JobsProjectViewSet(viewsets.ViewSet): - """ - This viewset is the project bound version of the jobs endpoint. + This viewset is responsible for the jobs endpoint. """ # data that we want to do select_related on when returning job objects @@ -272,7 +208,7 @@ class JobsProjectViewSet(viewsets.ViewSet): except Job.DoesNotExist: return Response("No job with id: {0}".format(pk), status=HTTP_404_NOT_FOUND) - resp = serializers.JobProjectSerializer(job, read_only=True).data + resp = serializers.JobSerializer(job, read_only=True).data resp["resource_uri"] = reverse("jobs-detail", kwargs={"project": project, "pk": pk}) diff --git a/treeherder/webapp/api/pagination.py b/treeherder/webapp/api/pagination.py index 9a4abbf94..c09073fde 100644 --- a/treeherder/webapp/api/pagination.py +++ b/treeherder/webapp/api/pagination.py @@ -1,26 +1,6 @@ -from django.core.paginator import Paginator -from django.utils.functional import cached_property from rest_framework import pagination class IdPagination(pagination.CursorPagination): ordering = ('-id') page_size = 100 - - -# Django's Paginator class uses queryset.count() which -# performs a full table scan -class CustomPaginator(Paginator): - def __init__(self, queryset, page_size): - Paginator.__init__(self, queryset, page_size) - - @cached_property - def count(self): - return len(self.object_list) - - -class JobPagination(pagination.PageNumberPagination): - page_size = 2000 - page_size_query_param = 'count' - max_page_size = 2000 - django_paginator_class = CustomPaginator diff --git a/treeherder/webapp/api/serializers.py b/treeherder/webapp/api/serializers.py index 49b4e8546..03188f7e1 100644 --- a/treeherder/webapp/api/serializers.py +++ b/treeherder/webapp/api/serializers.py @@ -52,7 +52,7 @@ class TaskclusterMetadataSerializer(serializers.ModelSerializer): fields = '__all__' -class JobProjectSerializer(serializers.ModelSerializer): +class JobSerializer(serializers.ModelSerializer): def to_representation(self, job): return { @@ -97,27 +97,6 @@ class JobProjectSerializer(serializers.ModelSerializer): fields = '__all__' -class JobSerializer(serializers.ModelSerializer): - - def to_representation(self, job): - option_collection_map = self.context['option_collection_map'] - submit = job.pop('submit_time') - start = job.pop('start_time') - end = job.pop('end_time') - option_collection_hash = job.pop('option_collection_hash') - - ret_val = list(job.values()) - ret_val.extend([ - models.Job.get_duration(submit, start, end), # duration - option_collection_map.get(option_collection_hash, '') # platform option - ]) - return ret_val - - class Meta: - model = models.Job - fields = '__all__' - - class FailureClassificationSerializer(serializers.ModelSerializer): class Meta: diff --git a/treeherder/webapp/api/urls.py b/treeherder/webapp/api/urls.py index b208235aa..a7d16f53c 100644 --- a/treeherder/webapp/api/urls.py +++ b/treeherder/webapp/api/urls.py @@ -20,15 +20,11 @@ from treeherder.webapp.api import (auth, # router for views that are bound to a project # i.e. all those views that don't involve reference data -# DEPRECATED: We will be slowly transitioning away from this router -# in favor of a router that does not require the ``project`` property. project_bound_router = routers.SimpleRouter() -# DEPRECATED (in process): The UI is transitioning to the /jobs/ endpoint -# from the default_router. project_bound_router.register( r'jobs', - jobs.JobsProjectViewSet, + jobs.JobsViewSet, base_name='jobs', ) @@ -95,10 +91,8 @@ tle_router.register(r'text-log-error', text_log_error.TextLogErrorViewSet, base_name='text-log-error') - # refdata endpoints: default_router = routers.DefaultRouter() -default_router.register(r'jobs', jobs.JobsViewSet, base_name='jobs') default_router.register(r'repository', refdata.RepositoryViewSet) default_router.register(r'taskclustermetadata', refdata.TaskclusterMetadataViewSet, base_name='taskclustermetadata') diff --git a/ui/helpers/job.js b/ui/helpers/job.js index 11238774c..bbc073964 100644 --- a/ui/helpers/job.js +++ b/ui/helpers/job.js @@ -237,15 +237,6 @@ export const addAggregateFields = function addAggregateFields(job) { return job; }; -// Remove any fields we don't need for display in the greater job field after -// they have been mapped/processed. -export const trim = function trim(job) { - delete job.option_collection_hash; - delete job.job_group_name; - delete job.job_type_name; - delete job.signature; -}; - export const getJobSearchStrHref = function getJobSearchStrHref(jobSearchStr) { const params = getAllUrlParams(); params.set('searchStr', jobSearchStr.split(' ')); diff --git a/ui/job-view/details/PinBoard.jsx b/ui/job-view/details/PinBoard.jsx index 489889e79..dda3f4ac6 100644 --- a/ui/job-view/details/PinBoard.jsx +++ b/ui/job-view/details/PinBoard.jsx @@ -126,7 +126,10 @@ class PinBoard extends React.Component { return classification .create() .then(() => { - notify(`Classification saved for ${job.title}`, 'success'); + notify( + `Classification saved for ${job.platform} ${job.job_type_name}`, + 'success', + ); // update the job to show that it's now classified const jobInstance = findJobInstance(job.id); diff --git a/ui/job-view/pushes/Push.jsx b/ui/job-view/pushes/Push.jsx index 206c613da..60551235e 100644 --- a/ui/job-view/pushes/Push.jsx +++ b/ui/job-view/pushes/Push.jsx @@ -20,7 +20,6 @@ import { updateJobMap, recalculateUnclassifiedCounts, } from '../redux/stores/pushes'; -import { trim } from '../../helpers/job'; import FuzzyJobFinder from './FuzzyJobFinder'; import { Revision } from './Revision'; @@ -148,6 +147,8 @@ class Push extends React.PureComponent { const { data, failureStatus } = await JobModel.getList( { push_id: push.id, + count: 2000, + return_type: 'list', }, { fetchAll: true }, ); @@ -225,7 +226,6 @@ class Push extends React.PureComponent { platform.groups.push(group); } group.jobs.push(job); - trim(job); }); return platforms; }; diff --git a/ui/models/job.js b/ui/models/job.js index 418f668aa..c76ff0747 100644 --- a/ui/models/job.js +++ b/ui/models/job.js @@ -20,20 +20,22 @@ export default class JobModel { // endpoint e.g. the similar jobs endpoint. It defaults to the job // list endpoint. const { fetchAll, uri: configUri } = config; - const jobUri = configUri || getApiUrl(uri); + const jobUri = configUri || getProjectUrl(uri); const { data, failureStatus } = await getData( `${jobUri}${options ? createQueryParams(options) : ''}`, ); if (!failureStatus) { - const { results, job_property_names, next } = data; + const { results, meta, job_property_names } = data; let itemList; let nextPagesJobs = []; - // if ``next`` gives a URL for more, fetch the next pages - if (fetchAll && next) { - const page = new URLSearchParams(next.split('?')[1]).get('page'); - const newOptions = { ...options, page }; + // if the number of elements returned equals the page size, + // fetch the next pages + if (fetchAll && results.length === meta.count) { + const count = parseInt(meta.count, 10); + const offset = parseInt(meta.offset, 10) + count; + const newOptions = { ...options, offset, count }; const { data: nextData, failureStatus: nextFailureStatus,