1 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
3 Make new bug link in flakiness dashboard configurable
4 https://bugs.webkit.org/show_bug.cgi?id=123386
6 Reviewed by Alexey Proskuryakov.
8 * config.json: Added Bugzilla as the default destination for new bugs.
9 * public/api/manifest.php: Include newBugLinks in the manifest.
11 (TestResultsView): Initialize _newBugLinks.
12 (TestResultsView.setNewBugLinks): Added.
13 (TestResultsView._populateTestPane):
14 (TestResultsView._createTestResultRow): Replaced the hard-coded Bugzilla URL by the code
15 to generate hyper-links based on _newBugLinks. Also added a nullity check while formatting
16 revision checks so that we don't blow up when some build doesn't contain all revision info.
17 (TestResultsView._populateBuilderPane):
19 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
21 New flakiness dashboard should support substring matching
22 https://bugs.webkit.org/show_bug.cgi?id=123393
24 Reviewed by Alexey Proskuryakov.
26 Addressed the use cases by
27 1. Always showing the candidate even when there is exactly one test matching the current value.
28 2. Adding all tests that match the current value upon the user pressing enter key.
31 (fetchManifest): Add all tests that match the current value. Confirm whether the user really
32 want to add all the tests when there are more than 15 tests to add.
33 * public/js/autocompleter.js:
34 (Autocompleter.prototype.filterCandidates): Extracted from _updateCandidates.
35 (Autocompleter.prototype._updateCandidates): Show the candidate window even when there is
36 exactly one test that matches the criteria so that the user can select this test.
38 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
40 New flakiness dashboard shouldn't treat tests with right expectations as failing
41 https://bugs.webkit.org/show_bug.cgi?id=123385
43 Reviewed by Alexey Proskuryakov.
45 We define failing tests to be tests with wrong expectations whose actual results are not PASS
46 since tests with TEXT, IMAGE, etc... failures do not turn the bots red as long as the expectation
47 of the same type is specified in TestExpectation files.
49 * public/include/test-results.php:
50 (FailingResultsJSONWriter): Inherit from WrongExpectationsResultsJSONWriter.
52 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
54 Build fix. The query results weren't sorted by the latest commit time,
55 yielding wrong set of tests to be listed in the builder pane.
57 * public/include/test-results.php:
59 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
61 Links in new flakiness dashboard could benefit from tooltips
62 https://bugs.webkit.org/show_bug.cgi?id=123381
64 Reviewed by Alexey Proskuryakov.
66 Add title content attribute on each hyperlink in the builder pane.
69 (TestResultsView._populateBuilderPane):
71 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
73 Commit the right change.
77 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
79 The new flakiness dashboard should sort builder and test names
80 https://bugs.webkit.org/show_bug.cgi?id=123363
82 Reviewed by Simon Fraser.
84 Sort the forgotten builders in the menu.
88 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
90 The new flakiness dashboard should sort builder and test names
91 https://bugs.webkit.org/show_bug.cgi?id=123363
93 Reviewed by Simon Fraser.
95 Sort builders and tests by their name in each pane.
98 (TestResultsView._populateTestPane): Lexicologically sort builders by their name.
99 (TestResultsView._sortObjectsByName): Added.
100 (TestResultsView._populateBuilderPane): Lexicologically sort builders by their name.
102 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
104 Merge revision columns in flakiness dashboard
105 https://bugs.webkit.org/show_bug.cgi?id=123360
107 Reviewed by Simon Fraser.
109 Merge revision numbers into one cell separated by /, and clearly label them as "latest revisions".
110 Also add colors for missing & audio failures so that they won't be an empty cell.
113 (TestResultsView._createTestResultHeader): Create a single th for the list of repository names.
114 (TestResultsView._createTestResultRow): Use single td for all revision numbers.
115 * public/js/build.js:
116 (.this.formattedRevision): Don't prefix revision numbers with '@' when we're not in the tooltip.
118 (.resultsTable .AUDIO a): Added.
119 (.resultsTable .MISSING a): Added.
121 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
123 One more build fix. Put each latest revision information in an actual td.
127 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
129 Yet another set of build fixes.
131 1. Manually strip / from revisions JSON if there is any.
132 2. Suppress warnings from ob_end_flush.
133 3. Allow "+" in actual and expected results as used in "TEXT+IMAGE".
135 * public/api/report.php:
136 * public/include/test-results.php:
138 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
140 Another build fix. Move .htaccess to public.
142 * .htaccess: Removed.
143 * public/.htaccess: Copied from .htaccess.
145 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
147 It turns out that the current instruction only works on Mountain Lion.
149 Also fixed some typos.
153 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
155 Add an instruction on how to setup test-results app
156 https://bugs.webkit.org/show_bug.cgi?id=123321
158 Rubber-stamped by Stephanie Lewis.
160 Added Install.md and updated config.json accordingly.
162 Also moved init-database.sql out of public/include since it doesn't need to be accessible via httpd.
166 * init-database.sql: Moved from public/include/init-database.sql.
168 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
170 Move everything except ChangeLog and config.json into public directory.
171 https://bugs.webkit.org/show_bug.cgi?id=123319
173 Rubber-stamped by Stephanie Lewis.
176 * admin/admin.css: Removed.
177 * admin/builders.php: Removed.
178 * admin/index.php: Removed.
179 * admin/repositories.php: Removed.
181 * api/failing-tests.php: Removed.
182 * api/manifest.php: Removed.
183 * api/report.php: Removed.
184 * api/results.php: Removed.
185 * common.css: Removed.
186 * config.json: Copied from include/config.json.
188 * include/admin-footer.php: Removed.
189 * include/admin-header.php: Removed.
190 * include/config.json: Removed.
191 * include/db.php: Removed.
192 * include/init-database.sql: Removed.
193 * include/json-shared.php: Removed.
194 * include/test-results.php: Removed.
195 * index.html: Removed.
197 * js/autocompleter.js: Removed.
198 * js/build.js: Removed.
199 * js/dom.js: Removed.
202 * public/admin: Copied from admin.
203 * public/api: Copied from api.
204 * public/common.css: Copied from common.css.
205 * public/include: Copied from include.
206 * public/include/config.json: Removed.
207 * public/include/db.php:
208 * public/index.html: Copied from index.html.
209 * public/js: Copied from js.
210 * public/main.css: Copied from main.css.
212 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
214 Showing lists of flaky tests for a builder takes too long
215 https://bugs.webkit.org/show_bug.cgi?id=123311
217 Reviewed by Sam Weinig.
219 Generate JSONs for tests failing, flaky, or with wrong expectation at the time a builder reports results
220 instead when the frontend requests to those those results since it takes multiple seconds or minutes to
221 generate those JSON files.
223 * api/failing-tests.php: Moved and renamed to manually generate all JSON files for a given builder.
226 * api/report.php: Manually flush and end the request (to avoid blocking run-webkit-tests on the other side
227 for minutes), then generate JSONs for tests that are failing, are flaky, and have wrong expectations.
229 * api/results.php: Merge format_result_rows here since it's not used anywhere else.
231 * include/config.json: Added the path to the data directory into which JSON files are generated.
234 (configPath): Takes a relative path value from config.json, and resolves it.
236 * include/json-shared.php:
237 (echo_success): Extracted from exit_with_success.
240 * include/test-results.php:
241 (add_builder): Extracted from add_build.
243 (ResultsJSONWriter): Extracted from api/failing-tests.php.
244 (ResultsJSONWriter.__construct):
245 (ResultsJSONWriter.start):
246 (ResultsJSONWriter.end):
247 (ResultsJSONWriter.add_results_for_test_if_matches):
248 (ResultsJSONWriter.pass_for_failure_type):
249 (FailingResultsJSONWriter): Extracted from index.html's TestResultsView._matchesFailureType.
250 (FailingResultsJSONWriter.__construct):
251 (FailingResultsJSONWriter.pass_for_failure_type):
252 (FlakyResultsJSONWriter): Ditto.
253 (FlakyResultsJSONWriter.__construct):
254 (FlakyResultsJSONWriter.pass_for_failure_type):
255 (WrongExpectationsResultsJSONWriter): Ditto.
256 (WrongExpectationsResultsJSONWriter.__construct):
257 (WrongExpectationsResultsJSONWriter.pass_for_failure_type):
258 (ResultsJSONGenerator): Ditto.
259 (ResultsJSONGenerator.__construct):
260 (ResultsJSONGenerator.generate):
261 (ResultsJSONGenerator.open_json_for_failure_type):
262 (ResultsJSONGenerator.write_jsons):
266 (TestResultsView.setBuilders):
267 (TestResultsView._createResultCell): Add a hyperlink to results.html in the tooltip.
268 (TestResultsView.fetchFailingTestsForBuilder): Fetch the generated JSON files.
270 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
272 Reverted erroneously committed changes from the previous commit.
276 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
278 Clicking on a test name on the new flakiness dashboard should add a new test pane
279 https://bugs.webkit.org/show_bug.cgi?id=123194
281 Reviewed by Simon Fraser.
283 Added a new click handler on each test name inside the builder test view add a new test pane.
284 Moved the old trac link to a right-arrow inline SVG icon.
286 Also tweaked the style so that the builder test view looks different from other test panes.
289 (TestResultsView._urlFromTest): Extracted from TestResultsView._linkifiedTestName.
290 (TestResultsView._populateBuilderPane): Fetch the test when its name is clicked.
291 Added a circled right arrow for the old trac link.
292 * main.css: Tweaked the style to move the rounded border around the builder test view to be
293 around the form controls to clearly differentiate it from a regular test pane.
295 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
297 New flakiness dashboard's test pane should show the latest WebKit revision for each builder
298 https://bugs.webkit.org/show_bug.cgi?id=123189
300 Reviewed by Simon Fraser.
303 (TestResultsView._populateTestPane): Call _createTestResultHeader and _createTestResultRow with
304 a list of repository information.
305 (TestResultsView._createTestResultHeader): Optionally creates headers for a list of repositories.
306 (TestResultsView._createTestResultRow): Add a hyperlinked revision information for each builder.
307 Also add a hyperlink to file a Bugzilla bug when there is no bug associated with the test already.
309 (Build.formattedRevision): Extracted from Build.formattedRevisions.
310 (Build.formattedRevisions):
312 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
314 Make tables on the new flakiness dashboard sortable
315 https://bugs.webkit.org/show_bug.cgi?id=123141
317 Reviewed by Simon Fraser.
319 Use jquery.tablesorter.js to make test and builder tables sortable. The jquery plugin is already used by run-perf-tests.
322 (TestResultsView._populateTestPane): Add tablesorter to the class name and wrap tr's inside a tbody so that tablesorter
324 (TestResultsView._populateBuilderPane): Ditto.
326 (.resultsTable thead): Use cursor: pointer to signify the fact it's clickable.
327 (.resultsTable th): Don't repeat arrows.
328 (.resultsTable th.headerSortUp): Inline SVG up arrow.
329 (.resultsTable th.headerSortDown): Inline SVG down arrow.
331 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
333 New flakiness dashboard should hyperlink test names, WebKit revisions, and bubbles
334 https://bugs.webkit.org/show_bug.cgi?id=123134
336 Reviewed by Stephanie Lewis.
338 Copied admin.css, admin-header.php, admin-footer.php, builders.php, repositories.php from WebKit Perf Monitor.
339 (Unfortunately WebKit Perf Monitor hasn't been committed into WebKit repository just yet.)
341 Updated various parts of index.html to linkify test names, build numbers, and bubbles (to results page).
343 * admin/admin.css: Added.
344 * admin/builders.php: Added.
345 * admin/index.php: Removed the duplicated code now that it uses admin-header.php.
346 * admin/repositories.php: Added.
347 * api/manifest.php: Use camelCase for blame_url and build_url to be consistent with other JSON properties.
348 Also exported testCategories from config so that we can linkify test names in the dashboard.
349 * include/admin-footer.php: Added.
350 * include/admin-header.php: Added.
351 * include/config.json: Added test categories. This avoids hard-coding the URL to trac in php/js.
352 * include/init-database.sql: Added name and build_url to builders table and category to tests.
353 * include/test-results.php: Assume the test category to be LayoutTest for now.
356 (TestResultsView): Initialize _builders, _slaves, _repositories, _testCategories as dictionaries as intended.
357 (TestResultsView.setTestCategories): Added.
358 (TestResultsView._createResultCell): Dynamically resolve URLs of results page and and build page.
359 (TestResultsView._populateTestPane): Linkify the test name. Unfortunately we don't have a test object anywhere.
360 We need to figure out a way to find the test object here eventually. For now, hard-coding "LayoutTest" works.
361 (TestResultsView._linkifiedTestName): Added.
362 (TestResultsView._createBuildsAndComputeSlownessOfResults): Takes builderId to set "builder" property on each
363 result object as it's used by Build class.
364 (TestResultsView._populateBuilderPane):
368 (Build.buildUrl): Support $builderName so that we don't have to keep repeating builder names in the database.
369 (Build.revision): Don't access [0] if revisions[repositoryId] was undefined.
371 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
373 New flakiness dashboard should align results by revision numbers
374 https://bugs.webkit.org/show_bug.cgi?id=123129
376 Reviewed by Tim Horton.
378 * include/config.json: Specify the default cache time to be 10 minutes.
379 * include/json-shared.php: Added Expires and Cache-Control headers. It's configurable via config.json.
381 (TestResultsView._createResultCell): Don't put '-' in a result cell without time.
382 (TestResultsView._populateTestPane): Create an array of build times ordered from the newest to the oldest.
383 Not that build.time() is the newest commit time among all repository for each result. e.g. if we had
384 both WebKit and Safari repository information in a given result, the newer of the two will be used.
385 (TestResultsView._createTestResultHeader): Added.
386 (TestResultsView._createBuildsAndComputeSlownessOfResults): Extracted from _createTestResultRow so
387 that _populateTestPane could use Build object before calling _createTestResultRow.
388 (TestResultsView._createTestResultRow): Takes buildTimes. Insert an empty cell for a build time if
389 the current row doesn't contain that a result for that build time.
390 (TestResultsView._populateBuilderPane):
391 * main.css: Tweaked the style so that bubbles are aligned vertically without '-'.
393 (.resultsTable thead th):
394 (.resultsTable .resultCell):
396 (.resultsTable span a):
398 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
400 New flakiness dashboard show test time, modifiers, and flaky tests
401 https://bugs.webkit.org/show_bug.cgi?id=123119
403 Reviewed by Tim Horton.
405 * api/failing-tests.php: Manually serialize each row in the results to avoid hitting the memory limit.
407 (Database::query): Added.
408 (Database::fetch_next_row): Added.
409 * include/init-database.sql: Added modifiers and time columns to results table.
410 * include/test-results.php:
411 (store_test_results): Update start_time and end_time to the union of the new interval and the existing interval.
412 (recursively_add_test_results): Handle empty $full_name to eliminate the loop over tests in store_test_results.
413 Also verify that each test name, expected and actual results conform to the specific format to prevent XSS.
414 Also use insert_row instead of select_or_insert_row to avoid issuing an unnecessary SQL query.
415 (format_result): Extracted from format_result_rows. Used in failing-tests.php.
417 (TestResultsView): Added _currentBuilderFailureType and _currentBuilderDays.
418 (TestResultsView._createResultCell): Show the test time and the expected result.
419 (TestResultsView._createTestResultRow): Compute the slowest run and also round time to tenth of second for time
420 less than 10s or second if it's more than 10s so that the test time will always be shown in two digits.
421 Also show the bug number and the latest expected result on the left columns after linkifying the bug numbers.
422 (TestResultsView._matchesFailureType): Added. Determines whether results is of a particular failure type.
423 (TestResultsView._populateBuilderPane):
424 (TestResultsView.fetchFailingTestsForBuilder): Store the failure type such as flaky, wrongtestexpectations.
425 (TestResultsView.updateLocationHash):
426 (TestResultsView.loadTestsFromLocationHash):
429 (element): appendChild if an item is a Node. Otherwise, e.g. integer, create a text node out of toString() call.
430 * main.css: Updated styles.
432 2013-10-18 Ryosuke Niwa <rniwa@webkit.org>
434 New flakiness dashboard should support showing the failing tests per builder
435 https://bugs.webkit.org/show_bug.cgi?id=123011
437 Reviewed by Timothy Hatcher.
439 Added the feature. Also did some refactoring to add this feature.
442 * api/failing-tests.php: Added.
443 * api/manifest.php: Removed the code to make maps by id. The work is now done in index.html.
445 * common.css: Added. Extracted from index.html.
446 * include/test-results.php: Extracted parse_revisions_array and format_result_rows from results.php.
449 (TestResultsView.setAvailableTests): Added.
450 (TestResultsView.showTooltip): Fixed the code to compute x and y coordinates of the tooltip to take
451 scrolled positions into account.
452 (TestResultsView._createTestResultRow): Extracted from _populateTestPane.
453 (TestResultsView.fetchTest): Added the code to show "Loading..." in the pane while loading the JSON.
454 (TestResultsView.fetchTests): Respect the doNotUpdateHash flag.
455 (TestResultsView._populateBuilderPane): Added.
456 (TestResultsView.fetchFailingTestsForBuilder): Added.
457 (TestResultsView.updateLocationHash): Serialize builder & builderDays.
458 (TestResultsView.locationHashChanged): Don't delete existing test panes since that's now done in
459 loadTestsFromLocationHash.
460 (TestResultsView.loadTestsFromLocationHash): Take care of both 'tests' and 'builder' components.
461 (fetchManifest): Setup the UI to select a builder.