|
| 1 | +2016-03-19 Ryosuke Niwa < [email protected]> |
| 2 | + |
| 3 | + Associated commits don't immediately show up on an analysis task page |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=155692 |
| 5 | + |
| 6 | + Reviewed by Darin Adler. |
| 7 | + |
| 8 | + The bug was caused by resolveCommits in AnalysisTask._constructAnalysisTasksFromRawData not being |
| 9 | + able to find the matching commit log if the commit log had been created by the charts which don't |
| 10 | + set the remote identifiers on each CommitLog objects. |
| 11 | + |
| 12 | + Fixed the bug by modifying /api/measurement-set to include the commit ID, and making CommitLog |
| 13 | + use the real database ID as its ID instead of a fake ID we create from repository and revision. |
| 14 | + |
| 15 | + Also added a bunch of Mocha unit tests for AnalysisTask.fetchAll. |
| 16 | + |
| 17 | + * public/api/measurement-set.php: |
| 18 | + (MeasurementSetFetcher::execute_query): Fetch commit_id. |
| 19 | + (MeasurementSetFetcher::format_run): Use pass-by-reference to avoid making a copy of the row. |
| 20 | + (MeasurementSetFetcher::parse_revisions_array): Include commit_id as the first item in the result. |
| 21 | + * public/v3/instrumentation.js: |
| 22 | + * public/v3/models/analysis-task.js: |
| 23 | + (AnalysisTask): Fixed a bug that _buildRequestCount and _finishedBuildRequestCount could be kept |
| 24 | + as strings and hasPendingRequests() could return a wrong result because it would perform string |
| 25 | + inequality instead of numerical inequality. |
| 26 | + (AnalysisTask.prototype.updateSingleton): Ditto. |
| 27 | + (AnalysisTask.prototype.dissociateCommit): |
| 28 | + (AnalysisTask._constructAnalysisTasksFromRawData): |
| 29 | + (AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Use findById now that CommitLog |
| 30 | + objects all use the same id as the database id. |
| 31 | + * public/v3/models/commit-log.js: |
| 32 | + (CommitLog): |
| 33 | + (CommitLog.prototype.remoteId): Deleted since we no longer create a fake id for commit logs for |
| 34 | + measurement sets. |
| 35 | + (CommitLog.findByRemoteId): Deleted. |
| 36 | + (CommitLog.ensureSingleton): Deleted. |
| 37 | + (CommitLog.fetchBetweenRevisions): |
| 38 | + |
| 39 | + * public/v3/models/data-model.js: |
| 40 | + (DataModelObject.clearStaticMap): Added to aid unit testing. |
| 41 | + (DataModelObject.ensureNamedStaticMap): Fixed a typo. Each map is a dictionary, not an array. |
| 42 | + * public/v3/models/metric.js: |
| 43 | + * public/v3/models/platform.js: |
| 44 | + * public/v3/models/root-set.js: |
| 45 | + (RootSet): Updated per the interface change in CommitLog.ensureSingleton. |
| 46 | + (MeasurementRootSet): Updated per /api/measurement-set change. Use the first value as the id. |
| 47 | + * public/v3/models/test.js: |
| 48 | + * unit-tests/analysis-task-tests.js: Added. |
| 49 | + (sampleAnalysisTask): |
| 50 | + (measurementCluster): |
| 51 | + * unit-tests/checkconfig.js: Added some assertion message to help aid diagnosing the failure. |
| 52 | + * unit-tests/measurement-adaptor-tests.js: Updated the sample data per the API change in |
| 53 | + /api/measurement-set and also added assertions for commit log ids. |
| 54 | + * unit-tests/measurement-set-tests.js: |
| 55 | + (beforeEach): |
| 56 | + * unit-tests/resources: Added. |
| 57 | + * unit-tests/resources/mock-remote-api.js: Added. Extracted from measurement-set-tests.js to be |
| 58 | + used in analysis-task-tests.js. |
| 59 | + (assert.notReached.assert.notReached): |
| 60 | + (global.RemoteAPI.getJSON): |
| 61 | + (global.RemoteAPI.getJSONWithStatus): |
| 62 | + (beforeEach): |
| 63 | + * unit-tests/resources/v3-models.js: Added. Extracted from measurement-set-tests.js to be used in |
| 64 | + analysis-task-tests.js and added more imports as needed. |
| 65 | + (importFromV3): |
| 66 | + (beforeEach): |
| 67 | + |
1 | 68 | 2016-03-18 Ryosuke Niwa < [email protected]>
|
2 | 69 |
|
3 | 70 | Build fix after r198464.
|
|
0 commit comments