RESOLVED FIXED 226894
[resultsdbpy] Add results-summary API
https://bugs.webkit.org/show_bug.cgi?id=226894
Summary [resultsdbpy] Add results-summary API
Chris Gambrell
Reported 2021-06-10 12:52:35 PDT
Adding functionality to predict the pass, fail, crash, etc percentages of a given test to the endpoint /api/confidence
Attachments
Patch (23.41 KB, patch)
2021-06-10 12:58 PDT, Chris Gambrell
no flags
Patch (10.20 KB, patch)
2021-06-10 14:01 PDT, Chris Gambrell
no flags
Patch (10.30 KB, patch)
2021-06-10 14:18 PDT, Chris Gambrell
no flags
Patch (10.25 KB, patch)
2021-06-10 14:27 PDT, Chris Gambrell
no flags
Patch (12.94 KB, patch)
2021-06-11 12:39 PDT, Chris Gambrell
no flags
Patch (18.67 KB, patch)
2021-08-09 16:15 PDT, Jonathan Bedard
no flags
Patch (22.03 KB, patch)
2021-08-10 10:05 PDT, Jonathan Bedard
no flags
Patch (21.95 KB, patch)
2021-08-10 10:39 PDT, Jonathan Bedard
no flags
Patch (22.71 KB, patch)
2021-08-10 14:19 PDT, Jonathan Bedard
no flags
Patch (22.71 KB, patch)
2021-08-10 14:26 PDT, Jonathan Bedard
no flags
Patch (22.70 KB, patch)
2021-08-10 14:51 PDT, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2021-06-10 12:53:30 PDT
Chris Gambrell
Comment 2 2021-06-10 12:58:38 PDT
Chris Gambrell
Comment 3 2021-06-10 14:01:07 PDT
Jonathan Bedard
Comment 4 2021-06-10 14:08:56 PDT
Comment on attachment 431125 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=431125&action=review > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:182 > + newer_data = [] Want to call out a problem here Chris and I discovered. Under the current code, this is always going to return the most recent `limit` of test results which occurred after the specified commit. The problem with this, is that it will still return the most recent test results even if the specified commit is ancient. I need to double check if there is a way for us to resolve in our Cassandra query, because I'm not sure there is.
Chris Gambrell
Comment 5 2021-06-10 14:18:01 PDT
Chris Gambrell
Comment 6 2021-06-10 14:27:27 PDT
Chris Gambrell
Comment 7 2021-06-11 12:39:18 PDT
Jonathan Bedard
Comment 8 2021-08-09 16:15:44 PDT
Aakash Jain
Comment 9 2021-08-10 08:40:51 PDT
Comment on attachment 435221 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435221&action=review > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:176 > + uds = [] better to name it uuids > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:199 > + return abort(400, description='No results for configuration in range') This error is non human-friendly. Should make it something which is easy to understand. If the test is not found, the error message should specify that. If the commit is not found, error message should indicate that. > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:363 > + '/api/aggregate-results/&ltsuite&gt/&lttest&gt', aggregate-results doesn't sounds like a right name for this api from user's perspective
Jonathan Bedard
Comment 10 2021-08-10 10:05:38 PDT
Jonathan Bedard
Comment 11 2021-08-10 10:16:08 PDT
Comment on attachment 435221 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435221&action=review >> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:176 >> + uds = [] > > better to name it uuids Need to delete this, was just a variable for testing. >> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:363 >> + '/api/aggregate-results/&ltsuite&gt/&lttest&gt', > > aggregate-results doesn't sounds like a right name for this api from user's perspective Discussing a better API name with Aakash, results-status, results-confidence, results-prediction are some candidates
Jonathan Bedard
Comment 12 2021-08-10 10:39:50 PDT
Aakash Jain
Comment 13 2021-08-10 14:18:08 PDT
Comment on attachment 435272 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435272&action=review > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:363 > + '/api/aggregate-results/&ltsuite&gt/&lttest&gt', let's call this results-summary endpoint > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:367 > + `Compute the combined results of a give test by aggregating results from a set of runs surrounding a specific commit:`, Nit: give => given > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:527 > + codeBlock('include_expectations=Flase'), Nit: Flase
Jonathan Bedard
Comment 14 2021-08-10 14:19:08 PDT
Aakash Jain
Comment 15 2021-08-10 14:20:07 PDT
rs=me with the above comments incorporated
Aakash Jain
Comment 16 2021-08-10 14:24:40 PDT
Comment on attachment 435288 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435288&action=review > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:203 > + for key_i in response.keys(): Nit: can rename key_i to key, and key_ii to key_i or something meaningful > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:206 > + response[key_i][key_ii] = 100 * response[key_i][key_ii] // (aggregate or 1) Nit: // => # > Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:364 > + ['Branch', 'Configuration', 'Include Expectations', 'Limit', 'Repository', 'Ref', 'UUID'], Rename: 'Include Expectations' => include_expectations. Better not to change the keyword.
Jonathan Bedard
Comment 17 2021-08-10 14:26:17 PDT
Jonathan Bedard
Comment 18 2021-08-10 14:42:27 PDT
Comment on attachment 435288 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=435288&action=review >> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller.py:206 >> + response[key_i][key_ii] = 100 * response[key_i][key_ii] // (aggregate or 1) > > Nit: // => # `//` is integer divide >> Tools/Scripts/libraries/resultsdbpy/resultsdbpy/view/templates/documentation.html:364 >> + ['Branch', 'Configuration', 'Include Expectations', 'Limit', 'Repository', 'Ref', 'UUID'], > > Rename: 'Include Expectations' => include_expectations. Better not to change the keyword. While we could do this, this ends up really breaking the way we use these parameters.
Jonathan Bedard
Comment 19 2021-08-10 14:51:36 PDT
Jonathan Bedard
Comment 20 2021-08-10 15:41:20 PDT
Note You need to log in before you can comment on or make changes to this bug.