1 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
3 New flakiness dashboard should support substring matching
4 https://bugs.webkit.org/show_bug.cgi?id=123393
6 Reviewed by Alexey Proskuryakov.
8 Addressed the use cases by
9 1. Always showing the candidate even when there is exactly one test matching the current value.
10 2. Adding all tests that match the current value upon the user pressing enter key.
13 (fetchManifest): Add all tests that match the current value. Confirm whether the user really
14 want to add all the tests when there are more than 15 tests to add.
15 * public/js/autocompleter.js:
16 (Autocompleter.prototype.filterCandidates): Extracted from _updateCandidates.
17 (Autocompleter.prototype._updateCandidates): Show the candidate window even when there is
18 exactly one test that matches the criteria so that the user can select this test.
20 2013-10-26 Ryosuke Niwa <rniwa@webkit.org>
22 New flakiness dashboard shouldn't treat tests with right expectations as failing
23 https://bugs.webkit.org/show_bug.cgi?id=123385
25 Reviewed by Alexey Proskuryakov.
27 We define failing tests to be tests with wrong expectations whose actual results are not PASS
28 since tests with TEXT, IMAGE, etc... failures do not turn the bots red as long as the expectation
29 of the same type is specified in TestExpectation files.
31 * public/include/test-results.php:
32 (FailingResultsJSONWriter): Inherit from WrongExpectationsResultsJSONWriter.
34 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
36 Build fix. The query results weren't sorted by the latest commit time,
37 yielding wrong set of tests to be listed in the builder pane.
39 * public/include/test-results.php:
41 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
43 Links in new flakiness dashboard could benefit from tooltips
44 https://bugs.webkit.org/show_bug.cgi?id=123381
46 Reviewed by Alexey Proskuryakov.
48 Add title content attribute on each hyperlink in the builder pane.
51 (TestResultsView._populateBuilderPane):
53 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
55 Commit the right change.
59 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
61 The new flakiness dashboard should sort builder and test names
62 https://bugs.webkit.org/show_bug.cgi?id=123363
64 Reviewed by Simon Fraser.
66 Sort the forgotten builders in the menu.
70 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
72 The new flakiness dashboard should sort builder and test names
73 https://bugs.webkit.org/show_bug.cgi?id=123363
75 Reviewed by Simon Fraser.
77 Sort builders and tests by their name in each pane.
80 (TestResultsView._populateTestPane): Lexicologically sort builders by their name.
81 (TestResultsView._sortObjectsByName): Added.
82 (TestResultsView._populateBuilderPane): Lexicologically sort builders by their name.
84 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
86 Merge revision columns in flakiness dashboard
87 https://bugs.webkit.org/show_bug.cgi?id=123360
89 Reviewed by Simon Fraser.
91 Merge revision numbers into one cell separated by /, and clearly label them as "latest revisions".
92 Also add colors for missing & audio failures so that they won't be an empty cell.
95 (TestResultsView._createTestResultHeader): Create a single th for the list of repository names.
96 (TestResultsView._createTestResultRow): Use single td for all revision numbers.
98 (.this.formattedRevision): Don't prefix revision numbers with '@' when we're not in the tooltip.
100 (.resultsTable .AUDIO a): Added.
101 (.resultsTable .MISSING a): Added.
103 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
105 One more build fix. Put each latest revision information in an actual td.
109 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
111 Yet another set of build fixes.
113 1. Manually strip / from revisions JSON if there is any.
114 2. Suppress warnings from ob_end_flush.
115 3. Allow "+" in actual and expected results as used in "TEXT+IMAGE".
117 * public/api/report.php:
118 * public/include/test-results.php:
120 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
122 Another build fix. Move .htaccess to public.
124 * .htaccess: Removed.
125 * public/.htaccess: Copied from .htaccess.
127 2013-10-25 Ryosuke Niwa <rniwa@webkit.org>
129 It turns out that the current instruction only works on Mountain Lion.
131 Also fixed some typos.
135 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
137 Add an instruction on how to setup test-results app
138 https://bugs.webkit.org/show_bug.cgi?id=123321
140 Rubber-stamped by Stephanie Lewis.
142 Added Install.md and updated config.json accordingly.
144 Also moved init-database.sql out of public/include since it doesn't need to be accessible via httpd.
148 * init-database.sql: Moved from public/include/init-database.sql.
150 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
152 Move everything except ChangeLog and config.json into public directory.
153 https://bugs.webkit.org/show_bug.cgi?id=123319
155 Rubber-stamped by Stephanie Lewis.
158 * admin/admin.css: Removed.
159 * admin/builders.php: Removed.
160 * admin/index.php: Removed.
161 * admin/repositories.php: Removed.
163 * api/failing-tests.php: Removed.
164 * api/manifest.php: Removed.
165 * api/report.php: Removed.
166 * api/results.php: Removed.
167 * common.css: Removed.
168 * config.json: Copied from include/config.json.
170 * include/admin-footer.php: Removed.
171 * include/admin-header.php: Removed.
172 * include/config.json: Removed.
173 * include/db.php: Removed.
174 * include/init-database.sql: Removed.
175 * include/json-shared.php: Removed.
176 * include/test-results.php: Removed.
177 * index.html: Removed.
179 * js/autocompleter.js: Removed.
180 * js/build.js: Removed.
181 * js/dom.js: Removed.
184 * public/admin: Copied from admin.
185 * public/api: Copied from api.
186 * public/common.css: Copied from common.css.
187 * public/include: Copied from include.
188 * public/include/config.json: Removed.
189 * public/include/db.php:
190 * public/index.html: Copied from index.html.
191 * public/js: Copied from js.
192 * public/main.css: Copied from main.css.
194 2013-10-24 Ryosuke Niwa <rniwa@webkit.org>
196 Showing lists of flaky tests for a builder takes too long
197 https://bugs.webkit.org/show_bug.cgi?id=123311
199 Reviewed by Sam Weinig.
201 Generate JSONs for tests failing, flaky, or with wrong expectation at the time a builder reports results
202 instead when the frontend requests to those those results since it takes multiple seconds or minutes to
203 generate those JSON files.
205 * api/failing-tests.php: Moved and renamed to manually generate all JSON files for a given builder.
208 * api/report.php: Manually flush and end the request (to avoid blocking run-webkit-tests on the other side
209 for minutes), then generate JSONs for tests that are failing, are flaky, and have wrong expectations.
211 * api/results.php: Merge format_result_rows here since it's not used anywhere else.
213 * include/config.json: Added the path to the data directory into which JSON files are generated.
216 (configPath): Takes a relative path value from config.json, and resolves it.
218 * include/json-shared.php:
219 (echo_success): Extracted from exit_with_success.
222 * include/test-results.php:
223 (add_builder): Extracted from add_build.
225 (ResultsJSONWriter): Extracted from api/failing-tests.php.
226 (ResultsJSONWriter.__construct):
227 (ResultsJSONWriter.start):
228 (ResultsJSONWriter.end):
229 (ResultsJSONWriter.add_results_for_test_if_matches):
230 (ResultsJSONWriter.pass_for_failure_type):
231 (FailingResultsJSONWriter): Extracted from index.html's TestResultsView._matchesFailureType.
232 (FailingResultsJSONWriter.__construct):
233 (FailingResultsJSONWriter.pass_for_failure_type):
234 (FlakyResultsJSONWriter): Ditto.
235 (FlakyResultsJSONWriter.__construct):
236 (FlakyResultsJSONWriter.pass_for_failure_type):
237 (WrongExpectationsResultsJSONWriter): Ditto.
238 (WrongExpectationsResultsJSONWriter.__construct):
239 (WrongExpectationsResultsJSONWriter.pass_for_failure_type):
240 (ResultsJSONGenerator): Ditto.
241 (ResultsJSONGenerator.__construct):
242 (ResultsJSONGenerator.generate):
243 (ResultsJSONGenerator.open_json_for_failure_type):
244 (ResultsJSONGenerator.write_jsons):
248 (TestResultsView.setBuilders):
249 (TestResultsView._createResultCell): Add a hyperlink to results.html in the tooltip.
250 (TestResultsView.fetchFailingTestsForBuilder): Fetch the generated JSON files.
252 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
254 Reverted erroneously committed changes from the previous commit.
258 2013-10-23 Ryosuke Niwa <rniwa@webkit.org>
260 Clicking on a test name on the new flakiness dashboard should add a new test pane
261 https://bugs.webkit.org/show_bug.cgi?id=123194
263 Reviewed by Simon Fraser.
265 Added a new click handler on each test name inside the builder test view add a new test pane.
266 Moved the old trac link to a right-arrow inline SVG icon.
268 Also tweaked the style so that the builder test view looks different from other test panes.
271 (TestResultsView._urlFromTest): Extracted from TestResultsView._linkifiedTestName.
272 (TestResultsView._populateBuilderPane): Fetch the test when its name is clicked.
273 Added a circled right arrow for the old trac link.
274 * main.css: Tweaked the style to move the rounded border around the builder test view to be
275 around the form controls to clearly differentiate it from a regular test pane.
277 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
279 New flakiness dashboard's test pane should show the latest WebKit revision for each builder
280 https://bugs.webkit.org/show_bug.cgi?id=123189
282 Reviewed by Simon Fraser.
285 (TestResultsView._populateTestPane): Call _createTestResultHeader and _createTestResultRow with
286 a list of repository information.
287 (TestResultsView._createTestResultHeader): Optionally creates headers for a list of repositories.
288 (TestResultsView._createTestResultRow): Add a hyperlinked revision information for each builder.
289 Also add a hyperlink to file a Bugzilla bug when there is no bug associated with the test already.
291 (Build.formattedRevision): Extracted from Build.formattedRevisions.
292 (Build.formattedRevisions):
294 2013-10-22 Ryosuke Niwa <rniwa@webkit.org>
296 Make tables on the new flakiness dashboard sortable
297 https://bugs.webkit.org/show_bug.cgi?id=123141
299 Reviewed by Simon Fraser.
301 Use jquery.tablesorter.js to make test and builder tables sortable. The jquery plugin is already used by run-perf-tests.
304 (TestResultsView._populateTestPane): Add tablesorter to the class name and wrap tr's inside a tbody so that tablesorter
306 (TestResultsView._populateBuilderPane): Ditto.
308 (.resultsTable thead): Use cursor: pointer to signify the fact it's clickable.
309 (.resultsTable th): Don't repeat arrows.
310 (.resultsTable th.headerSortUp): Inline SVG up arrow.
311 (.resultsTable th.headerSortDown): Inline SVG down arrow.
313 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
315 New flakiness dashboard should hyperlink test names, WebKit revisions, and bubbles
316 https://bugs.webkit.org/show_bug.cgi?id=123134
318 Reviewed by Stephanie Lewis.
320 Copied admin.css, admin-header.php, admin-footer.php, builders.php, repositories.php from WebKit Perf Monitor.
321 (Unfortunately WebKit Perf Monitor hasn't been committed into WebKit repository just yet.)
323 Updated various parts of index.html to linkify test names, build numbers, and bubbles (to results page).
325 * admin/admin.css: Added.
326 * admin/builders.php: Added.
327 * admin/index.php: Removed the duplicated code now that it uses admin-header.php.
328 * admin/repositories.php: Added.
329 * api/manifest.php: Use camelCase for blame_url and build_url to be consistent with other JSON properties.
330 Also exported testCategories from config so that we can linkify test names in the dashboard.
331 * include/admin-footer.php: Added.
332 * include/admin-header.php: Added.
333 * include/config.json: Added test categories. This avoids hard-coding the URL to trac in php/js.
334 * include/init-database.sql: Added name and build_url to builders table and category to tests.
335 * include/test-results.php: Assume the test category to be LayoutTest for now.
338 (TestResultsView): Initialize _builders, _slaves, _repositories, _testCategories as dictionaries as intended.
339 (TestResultsView.setTestCategories): Added.
340 (TestResultsView._createResultCell): Dynamically resolve URLs of results page and and build page.
341 (TestResultsView._populateTestPane): Linkify the test name. Unfortunately we don't have a test object anywhere.
342 We need to figure out a way to find the test object here eventually. For now, hard-coding "LayoutTest" works.
343 (TestResultsView._linkifiedTestName): Added.
344 (TestResultsView._createBuildsAndComputeSlownessOfResults): Takes builderId to set "builder" property on each
345 result object as it's used by Build class.
346 (TestResultsView._populateBuilderPane):
350 (Build.buildUrl): Support $builderName so that we don't have to keep repeating builder names in the database.
351 (Build.revision): Don't access [0] if revisions[repositoryId] was undefined.
353 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
355 New flakiness dashboard should align results by revision numbers
356 https://bugs.webkit.org/show_bug.cgi?id=123129
358 Reviewed by Tim Horton.
360 * include/config.json: Specify the default cache time to be 10 minutes.
361 * include/json-shared.php: Added Expires and Cache-Control headers. It's configurable via config.json.
363 (TestResultsView._createResultCell): Don't put '-' in a result cell without time.
364 (TestResultsView._populateTestPane): Create an array of build times ordered from the newest to the oldest.
365 Not that build.time() is the newest commit time among all repository for each result. e.g. if we had
366 both WebKit and Safari repository information in a given result, the newer of the two will be used.
367 (TestResultsView._createTestResultHeader): Added.
368 (TestResultsView._createBuildsAndComputeSlownessOfResults): Extracted from _createTestResultRow so
369 that _populateTestPane could use Build object before calling _createTestResultRow.
370 (TestResultsView._createTestResultRow): Takes buildTimes. Insert an empty cell for a build time if
371 the current row doesn't contain that a result for that build time.
372 (TestResultsView._populateBuilderPane):
373 * main.css: Tweaked the style so that bubbles are aligned vertically without '-'.
375 (.resultsTable thead th):
376 (.resultsTable .resultCell):
378 (.resultsTable span a):
380 2013-10-21 Ryosuke Niwa <rniwa@webkit.org>
382 New flakiness dashboard show test time, modifiers, and flaky tests
383 https://bugs.webkit.org/show_bug.cgi?id=123119
385 Reviewed by Tim Horton.
387 * api/failing-tests.php: Manually serialize each row in the results to avoid hitting the memory limit.
389 (Database::query): Added.
390 (Database::fetch_next_row): Added.
391 * include/init-database.sql: Added modifiers and time columns to results table.
392 * include/test-results.php:
393 (store_test_results): Update start_time and end_time to the union of the new interval and the existing interval.
394 (recursively_add_test_results): Handle empty $full_name to eliminate the loop over tests in store_test_results.
395 Also verify that each test name, expected and actual results conform to the specific format to prevent XSS.
396 Also use insert_row instead of select_or_insert_row to avoid issuing an unnecessary SQL query.
397 (format_result): Extracted from format_result_rows. Used in failing-tests.php.
399 (TestResultsView): Added _currentBuilderFailureType and _currentBuilderDays.
400 (TestResultsView._createResultCell): Show the test time and the expected result.
401 (TestResultsView._createTestResultRow): Compute the slowest run and also round time to tenth of second for time
402 less than 10s or second if it's more than 10s so that the test time will always be shown in two digits.
403 Also show the bug number and the latest expected result on the left columns after linkifying the bug numbers.
404 (TestResultsView._matchesFailureType): Added. Determines whether results is of a particular failure type.
405 (TestResultsView._populateBuilderPane):
406 (TestResultsView.fetchFailingTestsForBuilder): Store the failure type such as flaky, wrongtestexpectations.
407 (TestResultsView.updateLocationHash):
408 (TestResultsView.loadTestsFromLocationHash):
411 (element): appendChild if an item is a Node. Otherwise, e.g. integer, create a text node out of toString() call.
412 * main.css: Updated styles.
414 2013-10-18 Ryosuke Niwa <rniwa@webkit.org>
416 New flakiness dashboard should support showing the failing tests per builder
417 https://bugs.webkit.org/show_bug.cgi?id=123011
419 Reviewed by Timothy Hatcher.
421 Added the feature. Also did some refactoring to add this feature.
424 * api/failing-tests.php: Added.
425 * api/manifest.php: Removed the code to make maps by id. The work is now done in index.html.
427 * common.css: Added. Extracted from index.html.
428 * include/test-results.php: Extracted parse_revisions_array and format_result_rows from results.php.
431 (TestResultsView.setAvailableTests): Added.
432 (TestResultsView.showTooltip): Fixed the code to compute x and y coordinates of the tooltip to take
433 scrolled positions into account.
434 (TestResultsView._createTestResultRow): Extracted from _populateTestPane.
435 (TestResultsView.fetchTest): Added the code to show "Loading..." in the pane while loading the JSON.
436 (TestResultsView.fetchTests): Respect the doNotUpdateHash flag.
437 (TestResultsView._populateBuilderPane): Added.
438 (TestResultsView.fetchFailingTestsForBuilder): Added.
439 (TestResultsView.updateLocationHash): Serialize builder & builderDays.
440 (TestResultsView.locationHashChanged): Don't delete existing test panes since that's now done in
441 loadTestsFromLocationHash.
442 (TestResultsView.loadTestsFromLocationHash): Take care of both 'tests' and 'builder' components.
443 (fetchManifest): Setup the UI to select a builder.