1 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
3 Build fix. Update is_flaky when it's NULL.
5 * public/include/test-results.php:
7 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
9 JSON generation on new flakiness dashboard is still too slow
10 https://bugs.webkit.org/show_bug.cgi?id=123776
12 Reviewed by Mark Rowe.
14 * init-database.sql: Added a constraint that result is unique for each (build, test) pair.
16 * public/include/test-results.php:
17 (ResultsJSONGenerator::generate): Don't sort results by latest_revision_time since that's done
18 in the client side anyway.
19 (update_flakiness_for_build): Don't update is_flaky flag if it's already set to the right value.
22 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
24 Build fixes. In particular, we were missing the code to generate JSONs in report.php :(
26 * public/api/report.php:
27 * public/include/test-results.php:
29 2013-11-04 Ryosuke Niwa <rniwa@webkit.org>
31 Fix JSON generations on new flakiness dashboard
32 https://bugs.webkit.org/show_bug.cgi?id=123723
34 Reviewed by Andreas Kling.
36 Add is_flaky column on results table so that this column can be used to find flaky tests on a given builder
37 efficiently without having to through results for all tests in PHP. This column is updated in report.php
38 when a new build is added. Because is_flaky depends on the preceding and succeeding results, we must update
39 is_flaky flag on results for builds immediately before and after the new build as well.
41 To see why, suppose we had two consecutive results [PASS] [PASS]. If we were to insert [FAIL] result between
42 the two, those two results may also turn into flaky results if they were surrounded by [FAIL]. Similarly,
43 if we had [PASS] [FAIL] and the second result was marked flaky, inserting new [FAIL] must unmark it.
46 * init-database.sql: Added is_flaky column to results table with an index. Also added an index on
47 build_revisions.time as many queries filter results by this quantity. Also set the work_mem to 50MB avoid
48 disk thrashing while sorting results in various queries.
50 * public/api/failing-tests.php: Handle builder ids as well as names. Call generate() with failure types.
51 No longer generates *-failing.json since it's a subset of *-wrongexpectations.json to save time.
53 * public/api/report.php: Rewritten. Calls update_flakiness_after_inserting_build to update is_flaky flags
54 on the newly added results.
55 (store_results): Added.
58 * public/include/test-results.php:
60 (ResultsJSONWriter::add_results_for_test): Renamed from add_results_for_test_if_matches.
61 (ResultsJSONGenerator::generate): Takes the failure type. Instead of generating JSONs for all failure types
62 at once, generate one JSON for the specified type. We generate the list of test ids based on the failure type
63 and query results based on that. This dramatically cuts down the time spent in PHP.
64 (ResultsJSONGenerator::latest_build): Added.
65 (ResultsJSONGenerator::write_jsons): Takes single writer now.
66 (update_flakiness_for_build): Added.
67 (update_flakiness_after_inserting_build): Added.
70 (TestResultsView._populateBuilderPane): Emulate *-failing.json upon *-wrongexpectations.json.
71 (TestResultsView.fetchFailingTestsForBuilder): Ditto.
73 * public/main.css: Minor style tweaks.
74 (.testResults): Extend the border that wraps the test results as needed.
75 (.tooltip): Don't wrap text inside tooltips.
77 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
79 Make new bug link in flakiness dashboard configurable
80 https://bugs.webkit.org/show_bug.cgi?id=123386
82 Reviewed by Alexey Proskuryakov.
84 * config.json: Added Bugzilla as the default destination for new bugs.
85 * public/api/manifest.php: Include newBugLinks in the manifest.
87 (TestResultsView): Initialize _newBugLinks.
88 (TestResultsView.setNewBugLinks): Added.
89 (TestResultsView._populateTestPane):
90 (TestResultsView._createTestResultRow): Replaced the hard-coded Bugzilla URL by the code
91 to generate hyper-links based on _newBugLinks. Also added a nullity check while formatting
92 revision checks so that we don't blow up when some build doesn't contain all revision info.
93 (TestResultsView._populateBuilderPane):
95 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
97 New flakiness dashboard should support substring matching
98 https://bugs.webkit.org/show_bug.cgi?id=123393
100 Reviewed by Alexey Proskuryakov.
102 Addressed the use cases by
103 1. Always showing the candidate even when there is exactly one test matching the current value.
104 2. Adding all tests that match the current value upon the user pressing enter key.
107 (fetchManifest): Add all tests that match the current value. Confirm whether the user really
108 want to add all the tests when there are more than 15 tests to add.
109 * public/js/autocompleter.js:
110 (Autocompleter.prototype.filterCandidates): Extracted from _updateCandidates.
111 (Autocompleter.prototype._updateCandidates): Show the candidate window even when there is
112 exactly one test that matches the criteria so that the user can select this test.
114 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
116 New flakiness dashboard shouldn't treat tests with right expectations as failing
117 https://bugs.webkit.org/show_bug.cgi?id=123385
119 Reviewed by Alexey Proskuryakov.
121 We define failing tests to be tests with wrong expectations whose actual results are not PASS
122 since tests with TEXT, IMAGE, etc... failures do not turn the bots red as long as the expectation
123 of the same type is specified in TestExpectation files.
125 * public/include/test-results.php:
126 (FailingResultsJSONWriter): Inherit from WrongExpectationsResultsJSONWriter.
128 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
130 Build fix. The query results weren't sorted by the latest commit time,
131 yielding wrong set of tests to be listed in the builder pane.
133 * public/include/test-results.php:
135 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
137 Links in new flakiness dashboard could benefit from tooltips
138 https://bugs.webkit.org/show_bug.cgi?id=123381
140 Reviewed by Alexey Proskuryakov.
142 Add title content attribute on each hyperlink in the builder pane.
145 (TestResultsView._populateBuilderPane):
147 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
149 Commit the right change.
153 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
155 The new flakiness dashboard should sort builder and test names
156 https://bugs.webkit.org/show_bug.cgi?id=123363
158 Reviewed by Simon Fraser.
160 Sort the forgotten builders in the menu.
164 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
166 The new flakiness dashboard should sort builder and test names
167 https://bugs.webkit.org/show_bug.cgi?id=123363
169 Reviewed by Simon Fraser.
171 Sort builders and tests by their name in each pane.
174 (TestResultsView._populateTestPane): Lexicologically sort builders by their name.
175 (TestResultsView._sortObjectsByName): Added.
176 (TestResultsView._populateBuilderPane): Lexicologically sort builders by their name.
178 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
180 Merge revision columns in flakiness dashboard
181 https://bugs.webkit.org/show_bug.cgi?id=123360
183 Reviewed by Simon Fraser.
185 Merge revision numbers into one cell separated by /, and clearly label them as "latest revisions".
186 Also add colors for missing & audio failures so that they won't be an empty cell.
189 (TestResultsView._createTestResultHeader): Create a single th for the list of repository names.
190 (TestResultsView._createTestResultRow): Use single td for all revision numbers.
191 * public/js/build.js:
192 (.this.formattedRevision): Don't prefix revision numbers with '@' when we're not in the tooltip.
194 (.resultsTable .AUDIO a): Added.
195 (.resultsTable .MISSING a): Added.
197 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
199 One more build fix. Put each latest revision information in an actual td.
203 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
205 Yet another set of build fixes.
207 1. Manually strip / from revisions JSON if there is any.
208 2. Suppress warnings from ob_end_flush.
209 3. Allow "+" in actual and expected results as used in "TEXT+IMAGE".
211 * public/api/report.php:
212 * public/include/test-results.php:
214 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
216 Another build fix. Move .htaccess to public.
218 * .htaccess: Removed.
219 * public/.htaccess: Copied from .htaccess.
221 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
223 It turns out that the current instruction only works on Mountain Lion.
225 Also fixed some typos.
229 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
231 Add an instruction on how to setup test-results app
232 https://bugs.webkit.org/show_bug.cgi?id=123321
234 Rubber-stamped by Stephanie Lewis.
236 Added Install.md and updated config.json accordingly.
238 Also moved init-database.sql out of public/include since it doesn't need to be accessible via httpd.
242 * init-database.sql: Moved from public/include/init-database.sql.
244 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
246 Move everything except ChangeLog and config.json into public directory.
247 https://bugs.webkit.org/show_bug.cgi?id=123319
249 Rubber-stamped by Stephanie Lewis.
252 * admin/admin.css: Removed.
253 * admin/builders.php: Removed.
254 * admin/index.php: Removed.
255 * admin/repositories.php: Removed.
257 * api/failing-tests.php: Removed.
258 * api/manifest.php: Removed.
259 * api/report.php: Removed.
260 * api/results.php: Removed.
261 * common.css: Removed.
262 * config.json: Copied from include/config.json.
264 * include/admin-footer.php: Removed.
265 * include/admin-header.php: Removed.
266 * include/config.json: Removed.
267 * include/db.php: Removed.
268 * include/init-database.sql: Removed.
269 * include/json-shared.php: Removed.
270 * include/test-results.php: Removed.
271 * index.html: Removed.
273 * js/autocompleter.js: Removed.
274 * js/build.js: Removed.
275 * js/dom.js: Removed.
278 * public/admin: Copied from admin.
279 * public/api: Copied from api.
280 * public/common.css: Copied from common.css.
281 * public/include: Copied from include.
282 * public/include/config.json: Removed.
283 * public/include/db.php:
284 * public/index.html: Copied from index.html.
285 * public/js: Copied from js.
286 * public/main.css: Copied from main.css.
288 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
290 Showing lists of flaky tests for a builder takes too long
291 https://bugs.webkit.org/show_bug.cgi?id=123311
293 Reviewed by Sam Weinig.
295 Generate JSONs for tests failing, flaky, or with wrong expectation at the time a builder reports results
296 instead when the frontend requests to those those results since it takes multiple seconds or minutes to
297 generate those JSON files.
299 * api/failing-tests.php: Moved and renamed to manually generate all JSON files for a given builder.
302 * api/report.php: Manually flush and end the request (to avoid blocking run-webkit-tests on the other side
303 for minutes), then generate JSONs for tests that are failing, are flaky, and have wrong expectations.
305 * api/results.php: Merge format_result_rows here since it's not used anywhere else.
307 * include/config.json: Added the path to the data directory into which JSON files are generated.
310 (configPath): Takes a relative path value from config.json, and resolves it.
312 * include/json-shared.php:
313 (echo_success): Extracted from exit_with_success.
316 * include/test-results.php:
317 (add_builder): Extracted from add_build.
319 (ResultsJSONWriter): Extracted from api/failing-tests.php.
320 (ResultsJSONWriter.__construct):
321 (ResultsJSONWriter.start):
322 (ResultsJSONWriter.end):
323 (ResultsJSONWriter.add_results_for_test_if_matches):
324 (ResultsJSONWriter.pass_for_failure_type):
325 (FailingResultsJSONWriter): Extracted from index.html's TestResultsView._matchesFailureType.
326 (FailingResultsJSONWriter.__construct):
327 (FailingResultsJSONWriter.pass_for_failure_type):
328 (FlakyResultsJSONWriter): Ditto.
329 (FlakyResultsJSONWriter.__construct):
330 (FlakyResultsJSONWriter.pass_for_failure_type):
331 (WrongExpectationsResultsJSONWriter): Ditto.
332 (WrongExpectationsResultsJSONWriter.__construct):
333 (WrongExpectationsResultsJSONWriter.pass_for_failure_type):
334 (ResultsJSONGenerator): Ditto.
335 (ResultsJSONGenerator.__construct):
336 (ResultsJSONGenerator.generate):
337 (ResultsJSONGenerator.open_json_for_failure_type):
338 (ResultsJSONGenerator.write_jsons):
342 (TestResultsView.setBuilders):
343 (TestResultsView._createResultCell): Add a hyperlink to results.html in the tooltip.
344 (TestResultsView.fetchFailingTestsForBuilder): Fetch the generated JSON files.
346 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
348 Reverted erroneously committed changes from the previous commit.
352 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
354 Clicking on a test name on the new flakiness dashboard should add a new test pane
355 https://bugs.webkit.org/show_bug.cgi?id=123194
357 Reviewed by Simon Fraser.
359 Added a new click handler on each test name inside the builder test view add a new test pane.
360 Moved the old trac link to a right-arrow inline SVG icon.
362 Also tweaked the style so that the builder test view looks different from other test panes.
365 (TestResultsView._urlFromTest): Extracted from TestResultsView._linkifiedTestName.
366 (TestResultsView._populateBuilderPane): Fetch the test when its name is clicked.
367 Added a circled right arrow for the old trac link.
368 * main.css: Tweaked the style to move the rounded border around the builder test view to be
369 around the form controls to clearly differentiate it from a regular test pane.
371 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
373 New flakiness dashboard's test pane should show the latest WebKit revision for each builder
374 https://bugs.webkit.org/show_bug.cgi?id=123189
376 Reviewed by Simon Fraser.
379 (TestResultsView._populateTestPane): Call _createTestResultHeader and _createTestResultRow with
380 a list of repository information.
381 (TestResultsView._createTestResultHeader): Optionally creates headers for a list of repositories.
382 (TestResultsView._createTestResultRow): Add a hyperlinked revision information for each builder.
383 Also add a hyperlink to file a Bugzilla bug when there is no bug associated with the test already.
385 (Build.formattedRevision): Extracted from Build.formattedRevisions.
386 (Build.formattedRevisions):
388 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
390 Make tables on the new flakiness dashboard sortable
391 https://bugs.webkit.org/show_bug.cgi?id=123141
393 Reviewed by Simon Fraser.
395 Use jquery.tablesorter.js to make test and builder tables sortable. The jquery plugin is already used by run-perf-tests.
398 (TestResultsView._populateTestPane): Add tablesorter to the class name and wrap tr's inside a tbody so that tablesorter
400 (TestResultsView._populateBuilderPane): Ditto.
402 (.resultsTable thead): Use cursor: pointer to signify the fact it's clickable.
403 (.resultsTable th): Don't repeat arrows.
404 (.resultsTable th.headerSortUp): Inline SVG up arrow.
405 (.resultsTable th.headerSortDown): Inline SVG down arrow.
407 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
409 New flakiness dashboard should hyperlink test names, WebKit revisions, and bubbles
410 https://bugs.webkit.org/show_bug.cgi?id=123134
412 Reviewed by Stephanie Lewis.
414 Copied admin.css, admin-header.php, admin-footer.php, builders.php, repositories.php from WebKit Perf Monitor.
415 (Unfortunately WebKit Perf Monitor hasn't been committed into WebKit repository just yet.)
417 Updated various parts of index.html to linkify test names, build numbers, and bubbles (to results page).
419 * admin/admin.css: Added.
420 * admin/builders.php: Added.
421 * admin/index.php: Removed the duplicated code now that it uses admin-header.php.
422 * admin/repositories.php: Added.
423 * api/manifest.php: Use camelCase for blame_url and build_url to be consistent with other JSON properties.
424 Also exported testCategories from config so that we can linkify test names in the dashboard.
425 * include/admin-footer.php: Added.
426 * include/admin-header.php: Added.
427 * include/config.json: Added test categories. This avoids hard-coding the URL to trac in php/js.
428 * include/init-database.sql: Added name and build_url to builders table and category to tests.
429 * include/test-results.php: Assume the test category to be LayoutTest for now.
432 (TestResultsView): Initialize _builders, _slaves, _repositories, _testCategories as dictionaries as intended.
433 (TestResultsView.setTestCategories): Added.
434 (TestResultsView._createResultCell): Dynamically resolve URLs of results page and and build page.
435 (TestResultsView._populateTestPane): Linkify the test name. Unfortunately we don't have a test object anywhere.
436 We need to figure out a way to find the test object here eventually. For now, hard-coding "LayoutTest" works.
437 (TestResultsView._linkifiedTestName): Added.
438 (TestResultsView._createBuildsAndComputeSlownessOfResults): Takes builderId to set "builder" property on each
439 result object as it's used by Build class.
440 (TestResultsView._populateBuilderPane):
444 (Build.buildUrl): Support $builderName so that we don't have to keep repeating builder names in the database.
445 (Build.revision): Don't access [0] if revisions[repositoryId] was undefined.
447 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
449 New flakiness dashboard should align results by revision numbers
450 https://bugs.webkit.org/show_bug.cgi?id=123129
452 Reviewed by Tim Horton.
454 * include/config.json: Specify the default cache time to be 10 minutes.
455 * include/json-shared.php: Added Expires and Cache-Control headers. It's configurable via config.json.
457 (TestResultsView._createResultCell): Don't put '-' in a result cell without time.
458 (TestResultsView._populateTestPane): Create an array of build times ordered from the newest to the oldest.
459 Not that build.time() is the newest commit time among all repository for each result. e.g. if we had
460 both WebKit and Safari repository information in a given result, the newer of the two will be used.
461 (TestResultsView._createTestResultHeader): Added.
462 (TestResultsView._createBuildsAndComputeSlownessOfResults): Extracted from _createTestResultRow so
463 that _populateTestPane could use Build object before calling _createTestResultRow.
464 (TestResultsView._createTestResultRow): Takes buildTimes. Insert an empty cell for a build time if
465 the current row doesn't contain that a result for that build time.
466 (TestResultsView._populateBuilderPane):
467 * main.css: Tweaked the style so that bubbles are aligned vertically without '-'.
469 (.resultsTable thead th):
470 (.resultsTable .resultCell):
472 (.resultsTable span a):
474 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
476 New flakiness dashboard show test time, modifiers, and flaky tests
477 https://bugs.webkit.org/show_bug.cgi?id=123119
479 Reviewed by Tim Horton.
481 * api/failing-tests.php: Manually serialize each row in the results to avoid hitting the memory limit.
483 (Database::query): Added.
484 (Database::fetch_next_row): Added.
485 * include/init-database.sql: Added modifiers and time columns to results table.
486 * include/test-results.php:
487 (store_test_results): Update start_time and end_time to the union of the new interval and the existing interval.
488 (recursively_add_test_results): Handle empty $full_name to eliminate the loop over tests in store_test_results.
489 Also verify that each test name, expected and actual results conform to the specific format to prevent XSS.
490 Also use insert_row instead of select_or_insert_row to avoid issuing an unnecessary SQL query.
491 (format_result): Extracted from format_result_rows. Used in failing-tests.php.
493 (TestResultsView): Added _currentBuilderFailureType and _currentBuilderDays.
494 (TestResultsView._createResultCell): Show the test time and the expected result.
495 (TestResultsView._createTestResultRow): Compute the slowest run and also round time to tenth of second for time
496 less than 10s or second if it's more than 10s so that the test time will always be shown in two digits.
497 Also show the bug number and the latest expected result on the left columns after linkifying the bug numbers.
498 (TestResultsView._matchesFailureType): Added. Determines whether results is of a particular failure type.
499 (TestResultsView._populateBuilderPane):
500 (TestResultsView.fetchFailingTestsForBuilder): Store the failure type such as flaky, wrongtestexpectations.
501 (TestResultsView.updateLocationHash):
502 (TestResultsView.loadTestsFromLocationHash):
505 (element): appendChild if an item is a Node. Otherwise, e.g. integer, create a text node out of toString() call.
506 * main.css: Updated styles.
508 2013-10-18 Ryosuke Niwa <rniwa@webkit.org>
510 New flakiness dashboard should support showing the failing tests per builder
511 https://bugs.webkit.org/show_bug.cgi?id=123011
513 Reviewed by Timothy Hatcher.
515 Added the feature. Also did some refactoring to add this feature.
518 * api/failing-tests.php: Added.
519 * api/manifest.php: Removed the code to make maps by id. The work is now done in index.html.
521 * common.css: Added. Extracted from index.html.
522 * include/test-results.php: Extracted parse_revisions_array and format_result_rows from results.php.
525 (TestResultsView.setAvailableTests): Added.
526 (TestResultsView.showTooltip): Fixed the code to compute x and y coordinates of the tooltip to take
527 scrolled positions into account.
528 (TestResultsView._createTestResultRow): Extracted from _populateTestPane.
529 (TestResultsView.fetchTest): Added the code to show "Loading..." in the pane while loading the JSON.
530 (TestResultsView.fetchTests): Respect the doNotUpdateHash flag.
531 (TestResultsView._populateBuilderPane): Added.
532 (TestResultsView.fetchFailingTestsForBuilder): Added.
533 (TestResultsView.updateLocationHash): Serialize builder & builderDays.
534 (TestResultsView.locationHashChanged): Don't delete existing test panes since that's now done in
535 loadTestsFromLocationHash.
536 (TestResultsView.loadTestsFromLocationHash): Take care of both 'tests' and 'builder' components.
537 (fetchManifest): Setup the UI to select a builder.