1 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
3 JSON generation on new flakiness dashboard is still too slow
4 https://bugs.webkit.org/show_bug.cgi?id=123776
8 * init-database.sql: Added a constraint that result is unique for each (build, test) pair.
10 * public/include/test-results.php:
11 (ResultsJSONGenerator::generate): Don't sort results by latest_revision_time since that's done
12 in the client side anyway.
13 (update_flakiness_for_build): Don't update is_flaky flag if it's already set to the right value.
16 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
18 Build fixes. In particular, we were missing the code to generate JSONs in report.php :(
20 * public/api/report.php:
21 * public/include/test-results.php:
23 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
25 Fix JSON generations on new flakiness dashboard
26 https://bugs.webkit.org/show_bug.cgi?id=123723
28 Reviewed by Andreas Kling.
30 Add is_flaky column on results table so that this column can be used to find flaky tests on a given builder
31 efficiently without having to through results for all tests in PHP. This column is updated in report.php
32 when a new build is added. Because is_flaky depends on the preceding and succeeding results, we must update
33 is_flaky flag on results for builds immediately before and after the new build as well.
35 To see why, suppose we had two consecutive results [PASS] [PASS]. If we were to insert [FAIL] result between
36 the two, those two results may also turn into flaky results if they were surrounded by [FAIL]. Similarly,
37 if we had [PASS] [FAIL] and the second result was marked flaky, inserting new [FAIL] must unmark it.
40 * init-database.sql: Added is_flaky column to results table with an index. Also added an index on
41 build_revisions.time as many queries filter results by this quantity. Also set the work_mem to 50MB avoid
42 disk thrashing while sorting results in various queries.
44 * public/api/failing-tests.php: Handle builder ids as well as names. Call generate() with failure types.
45 No longer generates *-failing.json since it's a subset of *-wrongexpectations.json to save time.
47 * public/api/report.php: Rewritten. Calls update_flakiness_after_inserting_build to update is_flaky flags
48 on the newly added results.
49 (store_results): Added.
52 * public/include/test-results.php:
54 (ResultsJSONWriter::add_results_for_test): Renamed from add_results_for_test_if_matches.
55 (ResultsJSONGenerator::generate): Takes the failure type. Instead of generating JSONs for all failure types
56 at once, generate one JSON for the specified type. We generate the list of test ids based on the failure type
57 and query results based on that. This dramatically cuts down the time spent in PHP.
58 (ResultsJSONGenerator::latest_build): Added.
59 (ResultsJSONGenerator::write_jsons): Takes single writer now.
60 (update_flakiness_for_build): Added.
61 (update_flakiness_after_inserting_build): Added.
64 (TestResultsView._populateBuilderPane): Emulate *-failing.json upon *-wrongexpectations.json.
65 (TestResultsView.fetchFailingTestsForBuilder): Ditto.
67 * public/main.css: Minor style tweaks.
68 (.testResults): Extend the border that wraps the test results as needed.
69 (.tooltip): Don't wrap text inside tooltips.
71 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
73 Make new bug link in flakiness dashboard configurable
74 https://bugs.webkit.org/show_bug.cgi?id=123386
76 Reviewed by Alexey Proskuryakov.
78 * config.json: Added Bugzilla as the default destination for new bugs.
79 * public/api/manifest.php: Include newBugLinks in the manifest.
81 (TestResultsView): Initialize _newBugLinks.
82 (TestResultsView.setNewBugLinks): Added.
83 (TestResultsView._populateTestPane):
84 (TestResultsView._createTestResultRow): Replaced the hard-coded Bugzilla URL by the code
85 to generate hyper-links based on _newBugLinks. Also added a nullity check while formatting
86 revision checks so that we don't blow up when some build doesn't contain all revision info.
87 (TestResultsView._populateBuilderPane):
89 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
91 New flakiness dashboard should support substring matching
92 https://bugs.webkit.org/show_bug.cgi?id=123393
94 Reviewed by Alexey Proskuryakov.
96 Addressed the use cases by
97 1. Always showing the candidate even when there is exactly one test matching the current value.
98 2. Adding all tests that match the current value upon the user pressing enter key.
101 (fetchManifest): Add all tests that match the current value. Confirm whether the user really
102 want to add all the tests when there are more than 15 tests to add.
103 * public/js/autocompleter.js:
104 (Autocompleter.prototype.filterCandidates): Extracted from _updateCandidates.
105 (Autocompleter.prototype._updateCandidates): Show the candidate window even when there is
106 exactly one test that matches the criteria so that the user can select this test.
108 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
110 New flakiness dashboard shouldn't treat tests with right expectations as failing
111 https://bugs.webkit.org/show_bug.cgi?id=123385
113 Reviewed by Alexey Proskuryakov.
115 We define failing tests to be tests with wrong expectations whose actual results are not PASS
116 since tests with TEXT, IMAGE, etc... failures do not turn the bots red as long as the expectation
117 of the same type is specified in TestExpectation files.
119 * public/include/test-results.php:
120 (FailingResultsJSONWriter): Inherit from WrongExpectationsResultsJSONWriter.
122 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
124 Build fix. The query results weren't sorted by the latest commit time,
125 yielding wrong set of tests to be listed in the builder pane.
127 * public/include/test-results.php:
129 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
131 Links in new flakiness dashboard could benefit from tooltips
132 https://bugs.webkit.org/show_bug.cgi?id=123381
134 Reviewed by Alexey Proskuryakov.
136 Add title content attribute on each hyperlink in the builder pane.
139 (TestResultsView._populateBuilderPane):
141 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
143 Commit the right change.
147 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
149 The new flakiness dashboard should sort builder and test names
150 https://bugs.webkit.org/show_bug.cgi?id=123363
152 Reviewed by Simon Fraser.
154 Sort the forgotten builders in the menu.
158 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
160 The new flakiness dashboard should sort builder and test names
161 https://bugs.webkit.org/show_bug.cgi?id=123363
163 Reviewed by Simon Fraser.
165 Sort builders and tests by their name in each pane.
168 (TestResultsView._populateTestPane): Lexicologically sort builders by their name.
169 (TestResultsView._sortObjectsByName): Added.
170 (TestResultsView._populateBuilderPane): Lexicologically sort builders by their name.
172 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
174 Merge revision columns in flakiness dashboard
175 https://bugs.webkit.org/show_bug.cgi?id=123360
177 Reviewed by Simon Fraser.
179 Merge revision numbers into one cell separated by /, and clearly label them as "latest revisions".
180 Also add colors for missing & audio failures so that they won't be an empty cell.
183 (TestResultsView._createTestResultHeader): Create a single th for the list of repository names.
184 (TestResultsView._createTestResultRow): Use single td for all revision numbers.
185 * public/js/build.js:
186 (.this.formattedRevision): Don't prefix revision numbers with '@' when we're not in the tooltip.
188 (.resultsTable .AUDIO a): Added.
189 (.resultsTable .MISSING a): Added.
191 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
193 One more build fix. Put each latest revision information in an actual td.
197 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
199 Yet another set of build fixes.
201 1. Manually strip / from revisions JSON if there is any.
202 2. Suppress warnings from ob_end_flush.
203 3. Allow "+" in actual and expected results as used in "TEXT+IMAGE".
205 * public/api/report.php:
206 * public/include/test-results.php:
208 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
210 Another build fix. Move .htaccess to public.
212 * .htaccess: Removed.
213 * public/.htaccess: Copied from .htaccess.
215 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
217 It turns out that the current instruction only works on Mountain Lion.
219 Also fixed some typos.
223 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
225 Add an instruction on how to setup test-results app
226 https://bugs.webkit.org/show_bug.cgi?id=123321
228 Rubber-stamped by Stephanie Lewis.
230 Added Install.md and updated config.json accordingly.
232 Also moved init-database.sql out of public/include since it doesn't need to be accessible via httpd.
236 * init-database.sql: Moved from public/include/init-database.sql.
238 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
240 Move everything except ChangeLog and config.json into public directory.
241 https://bugs.webkit.org/show_bug.cgi?id=123319
243 Rubber-stamped by Stephanie Lewis.
246 * admin/admin.css: Removed.
247 * admin/builders.php: Removed.
248 * admin/index.php: Removed.
249 * admin/repositories.php: Removed.
251 * api/failing-tests.php: Removed.
252 * api/manifest.php: Removed.
253 * api/report.php: Removed.
254 * api/results.php: Removed.
255 * common.css: Removed.
256 * config.json: Copied from include/config.json.
258 * include/admin-footer.php: Removed.
259 * include/admin-header.php: Removed.
260 * include/config.json: Removed.
261 * include/db.php: Removed.
262 * include/init-database.sql: Removed.
263 * include/json-shared.php: Removed.
264 * include/test-results.php: Removed.
265 * index.html: Removed.
267 * js/autocompleter.js: Removed.
268 * js/build.js: Removed.
269 * js/dom.js: Removed.
272 * public/admin: Copied from admin.
273 * public/api: Copied from api.
274 * public/common.css: Copied from common.css.
275 * public/include: Copied from include.
276 * public/include/config.json: Removed.
277 * public/include/db.php:
278 * public/index.html: Copied from index.html.
279 * public/js: Copied from js.
280 * public/main.css: Copied from main.css.
282 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
284 Showing lists of flaky tests for a builder takes too long
285 https://bugs.webkit.org/show_bug.cgi?id=123311
287 Reviewed by Sam Weinig.
289 Generate JSONs for tests failing, flaky, or with wrong expectation at the time a builder reports results
290 instead when the frontend requests to those those results since it takes multiple seconds or minutes to
291 generate those JSON files.
293 * api/failing-tests.php: Moved and renamed to manually generate all JSON files for a given builder.
296 * api/report.php: Manually flush and end the request (to avoid blocking run-webkit-tests on the other side
297 for minutes), then generate JSONs for tests that are failing, are flaky, and have wrong expectations.
299 * api/results.php: Merge format_result_rows here since it's not used anywhere else.
301 * include/config.json: Added the path to the data directory into which JSON files are generated.
304 (configPath): Takes a relative path value from config.json, and resolves it.
306 * include/json-shared.php:
307 (echo_success): Extracted from exit_with_success.
310 * include/test-results.php:
311 (add_builder): Extracted from add_build.
313 (ResultsJSONWriter): Extracted from api/failing-tests.php.
314 (ResultsJSONWriter.__construct):
315 (ResultsJSONWriter.start):
316 (ResultsJSONWriter.end):
317 (ResultsJSONWriter.add_results_for_test_if_matches):
318 (ResultsJSONWriter.pass_for_failure_type):
319 (FailingResultsJSONWriter): Extracted from index.html's TestResultsView._matchesFailureType.
320 (FailingResultsJSONWriter.__construct):
321 (FailingResultsJSONWriter.pass_for_failure_type):
322 (FlakyResultsJSONWriter): Ditto.
323 (FlakyResultsJSONWriter.__construct):
324 (FlakyResultsJSONWriter.pass_for_failure_type):
325 (WrongExpectationsResultsJSONWriter): Ditto.
326 (WrongExpectationsResultsJSONWriter.__construct):
327 (WrongExpectationsResultsJSONWriter.pass_for_failure_type):
328 (ResultsJSONGenerator): Ditto.
329 (ResultsJSONGenerator.__construct):
330 (ResultsJSONGenerator.generate):
331 (ResultsJSONGenerator.open_json_for_failure_type):
332 (ResultsJSONGenerator.write_jsons):
336 (TestResultsView.setBuilders):
337 (TestResultsView._createResultCell): Add a hyperlink to results.html in the tooltip.
338 (TestResultsView.fetchFailingTestsForBuilder): Fetch the generated JSON files.
340 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
342 Reverted erroneously committed changes from the previous commit.
346 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
348 Clicking on a test name on the new flakiness dashboard should add a new test pane
349 https://bugs.webkit.org/show_bug.cgi?id=123194
351 Reviewed by Simon Fraser.
353 Added a new click handler on each test name inside the builder test view add a new test pane.
354 Moved the old trac link to a right-arrow inline SVG icon.
356 Also tweaked the style so that the builder test view looks different from other test panes.
359 (TestResultsView._urlFromTest): Extracted from TestResultsView._linkifiedTestName.
360 (TestResultsView._populateBuilderPane): Fetch the test when its name is clicked.
361 Added a circled right arrow for the old trac link.
362 * main.css: Tweaked the style to move the rounded border around the builder test view to be
363 around the form controls to clearly differentiate it from a regular test pane.
365 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
367 New flakiness dashboard's test pane should show the latest WebKit revision for each builder
368 https://bugs.webkit.org/show_bug.cgi?id=123189
370 Reviewed by Simon Fraser.
373 (TestResultsView._populateTestPane): Call _createTestResultHeader and _createTestResultRow with
374 a list of repository information.
375 (TestResultsView._createTestResultHeader): Optionally creates headers for a list of repositories.
376 (TestResultsView._createTestResultRow): Add a hyperlinked revision information for each builder.
377 Also add a hyperlink to file a Bugzilla bug when there is no bug associated with the test already.
379 (Build.formattedRevision): Extracted from Build.formattedRevisions.
380 (Build.formattedRevisions):
382 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
384 Make tables on the new flakiness dashboard sortable
385 https://bugs.webkit.org/show_bug.cgi?id=123141
387 Reviewed by Simon Fraser.
389 Use jquery.tablesorter.js to make test and builder tables sortable. The jquery plugin is already used by run-perf-tests.
392 (TestResultsView._populateTestPane): Add tablesorter to the class name and wrap tr's inside a tbody so that tablesorter
394 (TestResultsView._populateBuilderPane): Ditto.
396 (.resultsTable thead): Use cursor: pointer to signify the fact it's clickable.
397 (.resultsTable th): Don't repeat arrows.
398 (.resultsTable th.headerSortUp): Inline SVG up arrow.
399 (.resultsTable th.headerSortDown): Inline SVG down arrow.
401 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
403 New flakiness dashboard should hyperlink test names, WebKit revisions, and bubbles
404 https://bugs.webkit.org/show_bug.cgi?id=123134
406 Reviewed by Stephanie Lewis.
408 Copied admin.css, admin-header.php, admin-footer.php, builders.php, repositories.php from WebKit Perf Monitor.
409 (Unfortunately WebKit Perf Monitor hasn't been committed into WebKit repository just yet.)
411 Updated various parts of index.html to linkify test names, build numbers, and bubbles (to results page).
413 * admin/admin.css: Added.
414 * admin/builders.php: Added.
415 * admin/index.php: Removed the duplicated code now that it uses admin-header.php.
416 * admin/repositories.php: Added.
417 * api/manifest.php: Use camelCase for blame_url and build_url to be consistent with other JSON properties.
418 Also exported testCategories from config so that we can linkify test names in the dashboard.
419 * include/admin-footer.php: Added.
420 * include/admin-header.php: Added.
421 * include/config.json: Added test categories. This avoids hard-coding the URL to trac in php/js.
422 * include/init-database.sql: Added name and build_url to builders table and category to tests.
423 * include/test-results.php: Assume the test category to be LayoutTest for now.
426 (TestResultsView): Initialize _builders, _slaves, _repositories, _testCategories as dictionaries as intended.
427 (TestResultsView.setTestCategories): Added.
428 (TestResultsView._createResultCell): Dynamically resolve URLs of results page and and build page.
429 (TestResultsView._populateTestPane): Linkify the test name. Unfortunately we don't have a test object anywhere.
430 We need to figure out a way to find the test object here eventually. For now, hard-coding "LayoutTest" works.
431 (TestResultsView._linkifiedTestName): Added.
432 (TestResultsView._createBuildsAndComputeSlownessOfResults): Takes builderId to set "builder" property on each
433 result object as it's used by Build class.
434 (TestResultsView._populateBuilderPane):
438 (Build.buildUrl): Support $builderName so that we don't have to keep repeating builder names in the database.
439 (Build.revision): Don't access [0] if revisions[repositoryId] was undefined.
441 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
443 New flakiness dashboard should align results by revision numbers
444 https://bugs.webkit.org/show_bug.cgi?id=123129
446 Reviewed by Tim Horton.
448 * include/config.json: Specify the default cache time to be 10 minutes.
449 * include/json-shared.php: Added Expires and Cache-Control headers. It's configurable via config.json.
451 (TestResultsView._createResultCell): Don't put '-' in a result cell without time.
452 (TestResultsView._populateTestPane): Create an array of build times ordered from the newest to the oldest.
453 Not that build.time() is the newest commit time among all repository for each result. e.g. if we had
454 both WebKit and Safari repository information in a given result, the newer of the two will be used.
455 (TestResultsView._createTestResultHeader): Added.
456 (TestResultsView._createBuildsAndComputeSlownessOfResults): Extracted from _createTestResultRow so
457 that _populateTestPane could use Build object before calling _createTestResultRow.
458 (TestResultsView._createTestResultRow): Takes buildTimes. Insert an empty cell for a build time if
459 the current row doesn't contain that a result for that build time.
460 (TestResultsView._populateBuilderPane):
461 * main.css: Tweaked the style so that bubbles are aligned vertically without '-'.
463 (.resultsTable thead th):
464 (.resultsTable .resultCell):
466 (.resultsTable span a):
468 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
470 New flakiness dashboard show test time, modifiers, and flaky tests
471 https://bugs.webkit.org/show_bug.cgi?id=123119
473 Reviewed by Tim Horton.
475 * api/failing-tests.php: Manually serialize each row in the results to avoid hitting the memory limit.
477 (Database::query): Added.
478 (Database::fetch_next_row): Added.
479 * include/init-database.sql: Added modifiers and time columns to results table.
480 * include/test-results.php:
481 (store_test_results): Update start_time and end_time to the union of the new interval and the existing interval.
482 (recursively_add_test_results): Handle empty $full_name to eliminate the loop over tests in store_test_results.
483 Also verify that each test name, expected and actual results conform to the specific format to prevent XSS.
484 Also use insert_row instead of select_or_insert_row to avoid issuing an unnecessary SQL query.
485 (format_result): Extracted from format_result_rows. Used in failing-tests.php.
487 (TestResultsView): Added _currentBuilderFailureType and _currentBuilderDays.
488 (TestResultsView._createResultCell): Show the test time and the expected result.
489 (TestResultsView._createTestResultRow): Compute the slowest run and also round time to tenth of second for time
490 less than 10s or second if it's more than 10s so that the test time will always be shown in two digits.
491 Also show the bug number and the latest expected result on the left columns after linkifying the bug numbers.
492 (TestResultsView._matchesFailureType): Added. Determines whether results is of a particular failure type.
493 (TestResultsView._populateBuilderPane):
494 (TestResultsView.fetchFailingTestsForBuilder): Store the failure type such as flaky, wrongtestexpectations.
495 (TestResultsView.updateLocationHash):
496 (TestResultsView.loadTestsFromLocationHash):
499 (element): appendChild if an item is a Node. Otherwise, e.g. integer, create a text node out of toString() call.
500 * main.css: Updated styles.
502 2013-10-18 Ryosuke Niwa <rniwa@webkit.org>
504 New flakiness dashboard should support showing the failing tests per builder
505 https://bugs.webkit.org/show_bug.cgi?id=123011
507 Reviewed by Timothy Hatcher.
509 Added the feature. Also did some refactoring to add this feature.
512 * api/failing-tests.php: Added.
513 * api/manifest.php: Removed the code to make maps by id. The work is now done in index.html.
515 * common.css: Added. Extracted from index.html.
516 * include/test-results.php: Extracted parse_revisions_array and format_result_rows from results.php.
519 (TestResultsView.setAvailableTests): Added.
520 (TestResultsView.showTooltip): Fixed the code to compute x and y coordinates of the tooltip to take
521 scrolled positions into account.
522 (TestResultsView._createTestResultRow): Extracted from _populateTestPane.
523 (TestResultsView.fetchTest): Added the code to show "Loading..." in the pane while loading the JSON.
524 (TestResultsView.fetchTests): Respect the doNotUpdateHash flag.
525 (TestResultsView._populateBuilderPane): Added.
526 (TestResultsView.fetchFailingTestsForBuilder): Added.
527 (TestResultsView.updateLocationHash): Serialize builder & builderDays.
528 (TestResultsView.locationHashChanged): Don't delete existing test panes since that's now done in
529 loadTestsFromLocationHash.
530 (TestResultsView.loadTestsFromLocationHash): Take care of both 'tests' and 'builder' components.
531 (fetchManifest): Setup the UI to select a builder.