1 2018-02-02 Aakash Jain <aakash_jain@apple.com>
3 Add support for fetching recent builds in Buildbot 0.9 format in BuildbotSyncer
4 https://bugs.webkit.org/show_bug.cgi?id=179743
6 Reviewed by Ryosuke Niwa.
8 * tools/js/buildbot-syncer.js:
9 (BuildbotSyncer.prototype._pullRecentBuildsDeprecated): Renamed from _pullRecentBuilds. This method fetch
10 from Buildbot 0.8 server.
11 (BuildbotSyncer.prototype._pullRecentBuilds): Method to fetch recent builds from Buildbot 0.9 server.
12 (BuildbotSyncer.prototype.pathForRecentBuilds): URL for fetching recent builds from Buildbot 0.9 server.
13 (BuildbotSyncer.prototype.pathForBuildJSONDeprecated): Renamed from pathForBuildJSON.
14 * unit-tests/buildbot-syncer-tests.js:
15 (_pullRecentBuilds.it): unit-test - should not fetch recent builds when count is zero.
16 (_pullRecentBuilds.it): unit-test - should pull the right number of recent builds.
17 (_pullRecentBuilds.it): unit-test - should handle unexpected error while fetching recent builds.
18 (_pullRecentBuilds.it): unit-test - should create BuildbotBuildEntry after fetching recent builds.
20 2018-02-01 Aakash Jain <aakash_jain@apple.com>
22 Create BuildbotBuildEntry in Buildbot syncer in Buildbot 0.9 format
23 https://bugs.webkit.org/show_bug.cgi?id=182036
25 Reviewed by Ryosuke Niwa.
27 * tools/js/buildbot-syncer.js:
28 (BuildbotBuildEntry): Class for Buildbot entry in Buildbot 0.9 data format.
29 (BuildbotBuildEntryDeprecated): Renamed from BuildbotBuildEntry, sub-classed from BuildBotEntry. Handles Buildbot 0.8 data format.
30 (BuildbotBuildEntryDeprecated.prototype.url): URL in buildbot 0.8 format.
31 (BuildbotSyncer.prototype.builderID): Added.
32 (BuildbotSyncer.prototype.pathForPendingBuildsJSONDeprecated): Renamed from BuildbotSyncer.prototype.pathForPendingBuildsJSON.
33 (BuildbotSyncer.prototype.pathForPendingBuilds): Path for pending builds in Buildbot 0.9 format.
34 (BuildbotSyncer.prototype.urlForBuildNumberDeprecated): Deprecated. Renamed from urlForBuildNumber.
35 (BuildbotSyncer.prototype.urlForBuildNumber): Updated in Buildbot 0.9 format.
36 (BuildbotSyncer.prototype.urlForPendingBuild): Buildbot 0.9 has individual webpage for pending buildrequests as well. URL to that page.
37 * unit-tests/buildbot-syncer-tests.js: Renamed BuildbotBuildEntry to BuildbotBuildEntryDeprecated.
38 (sampleBuildData): Sample build data. Common method for in-progress and finished build data.
39 (samplePendingBuildData): Sample data for a pending build. Separate method so that we can easily create sample data with multiple builds.
40 (sampleInProgressBuildData): Ditto for in-progress build.
41 (sampleFinishedBuildData): Ditto for finished build.
42 (samplePendingBuild): Sample data for single pending build.
43 (sampleInProgressBuild): Ditto for in-progress build.
44 (sampleFinishedBuild): Ditto for finished build.
45 (samplePendingBuildDeprecated): Renamed from samplePendingBuild.
46 (sampleInProgressBuildDeprecated): Renamed from sampleInProgressBuild.
47 (sampleFinishedBuildDeprecated): Renamed from sampleFinishedBuild.
48 (BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for pending build.
49 (BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for in-progress build.
50 (BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for finished build.
51 (BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for mix of in-progress and finished build.
53 2018-01-31 Dewei Zhu <dewei_zhu@apple.com>
55 Should chose the best match during 'route' if there are multiple matches.
56 https://bugs.webkit.org/show_bug.cgi?id=182326
58 Reviewed by Ryosuke Niwa.
60 r227749 made a change that 'analysisCategoryPage' will be added before 'analysisTaskPage'.
61 As route names for both pages starts with 'analysis', whichever added first will be chosen.
62 For a route like 'analysis/task/1'. As a result, 'analysisCategoryPage' will be chosen and
63 this is not expected behavior. Adding the logic on the cases when route name does not extact
64 match the route name, always choose the longest mathcing route name.
66 Also modernized the code of 'page-router.js' to use const & let instead of var.
68 Added a browser test to guard against this bug.
70 * browser-tests/index.html: Import 'page-router-tests.js'.
71 * browser-tests/page-router-tests.js: Added unit test to guard against this bug.
72 * public/v3/pages/page-router.js:
73 (PageRouter.prototype.route): Added logic to find best matching in the case of inexact match.
74 (PageRouter.prototype.pageDidOpen):
75 (PageRouter.prototype._updateURLState):
76 (PageRouter.prototype._serializeToHash):
77 (PageRouter.prototype._deserializeFromHash):
78 (PageRouter.prototype._serializeHashQueryValue):
79 (PageRouter.prototype._deserializeHashQueryValue):
80 (PageRouter.prototype._countOccurrences):
83 2018-01-29 Dewei Zhu <dewei_zhu@apple.com>
85 Should fetch owner commits in build-requests-fetcher.
86 https://bugs.webkit.org/show_bug.cgi?id=182266
88 Reviewed by Ryosuke Niwa.
90 In a build request, owner commit of a commit is not always one of a commit in the commit set.
91 Build request api should contain owner commits in the 'commits' field of the return value.
93 * public/include/build-requests-fetcher.php: Added logic to fetch owner commits and added them into 'commits'.
94 * server-tests/api-build-requests-tests.js: Added a unit test.
95 * server-tests/resources/mock-data.js:
96 (MockData.set addTestGroupWithOwnerCommitNotInCommitSet): Added a test group with a build request, the commit set of which does
97 not contain owner commit of one commit.
99 2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
101 Add the support for reporting Speedometer 2.0 results to perf dashboard
102 https://bugs.webkit.org/show_bug.cgi?id=182089
103 <rdar://problem/36172346>
105 Rubber-stamped by Chris Dumez.
107 Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
108 The relevant code is at the line 313 of report-processor.php now.
110 Added regression tests for this feature since we didn't have any tests four years ago.
112 * server-tests/api-report-tests.js:
114 2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
116 REGRESSION(r225898): The perf dashboard fails to open when there are no summary pages
117 https://bugs.webkit.org/show_bug.cgi?id=182210
119 Rubber-stamped by Chris Dumez.
121 The bug was caused by TestFreshnessPage unconditionally assuming that summaryPageConfiguration is set.
122 Fixed it by not creating TestFreshnessPage when there are no summary pages specified.
124 Also modernized the code to use const & let instead of var.
129 2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
131 Perf dashboard's page title can be set to a previously visited page
132 https://bugs.webkit.org/show_bug.cgi?id=182209
134 Rubber-stamped by Chris Dumez.
136 Before this patch, opening a page and navigating away from it could result in the page title
137 getting set to that of the previously visited page after the new page had been opened.
139 This bug was caused by Page.render keep setting document.title even though the page is no longer
140 the currently open page of the router. Fixed it by exiting early in Page.enqueueToRender when
141 this page is not the currently open page of the router.
143 Also added basic tests for Page.
145 * browser-tests/index.html:
146 * browser-tests/page-tests.js: Added.
147 * public/v3/pages/page.js:
148 (Page): Removed the unused second constructor argument.
149 (Page.prototype.enqueueToRender): Fixed the bug.
150 (Page.prototype.render): Use const instead of var.
152 2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
154 CommitLogViewer should not fetch commits in serial
155 https://bugs.webkit.org/show_bug.cgi?id=182207
157 Rubber-stamped by Chris Dumez.
159 Fetch both the commits in the range as well as the preceding commit at once instead of
160 fetching the preceding commit only after the commits in the range had been fetched.
162 * browser-tests/commit-log-viewer-tests.js: Fixed the tcoest case after r224227.
163 * public/v3/components/commit-log-viewer.js:
164 (CommitLogViewer.prototype._fetchCommitLogs): Fetch commits in parallel.
166 2018-01-24 Dewei Zhu <dewei_zhu@apple.com>
168 Check existence of 'node_modules_dir' before creating it.
169 https://bugs.webkit.org/show_bug.cgi?id=182040
171 Reviewed by Aakash Jain.
173 Fix the bug introduced in r227395.
175 * tools/run-tests.py: Added directory existence check.
177 2018-01-22 Dewei Zhu <dewei_zhu@apple.com>
179 Fix the bug that 'TestGroupResultsViewer' creates unnecessary rows.
180 https://bugs.webkit.org/show_bug.cgi?id=181967
182 Reviewed by Ryosuke Niwa.
184 Fixed a bug caused by a typo in CommitSet.equals, which makes it returns incorrect results for most
185 comparison between a CommitSet and a MeasurementCommitSet.
187 MeasurementCommitSet does not have full information for the commits, thus, it cannot build mappings
188 between root/patch/owner commit/requires build to repository. When querying whether a given repository
189 needs to be built, MeasurementCommitSet will return undefined. Due to 'undefined != false', this
190 equality check will fail. Making 'CommitSet.requiresBuildForRepository' defaults to 'false' would fix
193 * public/v3/models/commit-set.js:
194 (CommitSet.prototype.requiresBuildForRepository): Make it return false when key does not exist
195 instead of 'undefined'.
196 (CommitSet.prototype.equals): Fixed the typo that causes the bug.
197 Use wrapped functions instead of querying the mapping directly.
198 * unit-tests/commit-set-tests.js: Added unit tests.
200 2018-01-18 Dewei Zhu <dewei_zhu@apple.com>
202 'run-test.py' script should make sure 'node_modules' directory exists before installing node packages.
203 https://bugs.webkit.org/show_bug.cgi?id=181808
205 Reviewed by Ryosuke Niwa.
207 'run-test.py' will fail if 'node_modules' does not exist before running this script.
208 Instead of calling 'os.chdir' to change directory, use 'cwd' in subprocess instead.
210 * tools/run-tests.py: Added the logic to ensure 'node_modules' exists.
211 Also use 'cwd' in subprocess.call instead of calling 'os.chdir' ahead.
213 2018-01-20 Dewei Zhu <dewei_zhu@apple.com>
215 Extend 'ifBuilt' config key to set property based on whether certain repositories are built or not.
216 https://bugs.webkit.org/show_bug.cgi?id=181906
218 Reviewed by Ryosuke Niwa.
220 Before this change, 'ifBuilt' will always set specified property for test properties as long as there
221 is a build type build in the same build request group. However, this is no longer valid as we don't
222 want to set specified property for testing when only owned commit is built in previous build.
223 'ifBuilt' needs to conditionally set property based on whether certain required repositories are built.
224 Empty required repository list means no requirement on repository to set property.
226 * tools/js/buildbot-syncer.js:
227 (BuildbotSyncer.prototype._propertiesForBuildRequest):In the case of 'built', only set property when
228 repository requirment is meet and there is a 'build' root request in the same build request group.
229 (BuildbotSyncer._parseRepositoryGroup): Extend 'ifBuild' to pass information based on contition.
230 * unit-tests/buildbot-syncer-tests.js: Added unit tests.
232 2018-01-19 Dewei Zhu <dewei_zhu@apple.com>
234 Should reject updating a build request which has an associated build.
235 https://bugs.webkit.org/show_bug.cgi?id=181893
237 Reviewed by Ryosuke Niwa.
239 Current code does not prevent submitting to same build request multiple times.
240 This could lead to a build losing its associated build request.
241 As a result, this build will be visible in charts which is not right.
242 Added a check when a build request is reported.
243 Addressed a 'FIXME' for the race condition inside ReportProcessor->resolve_build_id by surrounding
244 it with a database transaction.
246 * public/include/report-processor.php:
247 Wrap adding platform and resolve_build_id with a database transaction.
248 Add a check to make sure only a build request has no associated build can be updated.
249 * server-tests/api-report-tests.js: Added unit tests accordingly.
251 2018-01-18 Dewei Zhu <dewei_zhu@apple.com>
253 Should allow updating a build-request to 'canceled'.
254 https://bugs.webkit.org/show_bug.cgi?id=181819
256 Reviewed by Ryosuke Niwa.
258 It's possible syncing script update a build-request to 'canceled' state.
260 * public/api/build-requests.php: Added 'canceled' as an acceptable update state.
261 * server-tests/api-build-requests-tests.js: Added a unit test to update a build-request to 'canceled'.
263 2018-01-18 Aakash Jain <aakash_jain@apple.com>
265 Add support for builderNameToIDMap in BuildbotSyncer
266 https://bugs.webkit.org/show_bug.cgi?id=176526
268 Reviewed by Ryosuke Niwa.
270 * tools/js/buildbot-syncer.js:
271 (BuildbotSyncer._loadConfig): Added builderNameToIDMap parameter. It would be used later on.
272 (BuildbotSyncer._resolveBuildersWithPlatforms): Ditto.
273 (BuildbotSyncer._validateAndMergeConfig): Added builderID as a valid config parameter.
274 * tools/js/buildbot-triggerable.js:
275 (BuildbotTriggerable.prototype.getBuilderNameToIDMap): Method to fetch BuilderNameToIDMap from Buildbot 0.9.
276 (BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Method to fetch BuilderNameToIDMap from Buildbot 0.8.
277 (BuildbotTriggerable.prototype.initSyncers): Updated to use getBuilderNameToIDMap.
278 * unit-tests/buildbot-syncer-tests.js: Updated unit-tests.
279 * server-tests/resources/mock-data.js:
280 (MockData.buildbotBuildersURLDeprecated): URL for fetching Builders list.
281 (MockData.buildbotBuildersURL): Ditto for Buildbot 0.9
282 (MockData.mockBuildbotBuildersDeprecated): Sample builders data for Buildbot 0.8
283 (MockData.mockBuildbotBuilders): Ditto for Buildbot 0.9
284 * server-tests/tools-buildbot-triggerable-tests.js: Added test for getBuilderNameToIDMap. Updated tests to handle
285 newly added promise for fetching builders list from Buildbot.
286 * server-tests/tools-sync-buildbot-integration-tests.js: Ditto.
288 2018-01-18 Ryosuke Niwa <rniwa@webkit.org>
290 Charts can be empty when values are all identical
291 https://bugs.webkit.org/show_bug.cgi?id=181828
293 Reviewed by Alexey Proskuryakov.
295 Fixed the bug that when SampleVarianceUpperTriangularMatrix can store -Infinity as the initial cost
296 of some entries when the sample standard deviation between two points turns out to be 0,
297 and cause splitIntoSegmentsUntilGoodEnough to return undefiend because no segmentation has a finite cost.
299 Also fixed the bug that the time series chart fails to show any data points when all data points have
300 identical values as the entire y-coordinate gets collapsed to an empty value range by adjusting the max value
301 when min & max values are identical.
303 * public/v3/components/time-series-chart.js:
304 (TimeSeriesChart.prototype._ensureValueRangeCache): Raise the max slightly when min & max are identical
305 to avoid the chart becoming empty. Otherwise valueDiff in _computeVerticalRenderingMetrics becomes 0
306 and value-to-y-coordinate conversion always results in NaN.
307 * public/shared/statistics.js:
308 (Statistics..SampleVarianceUpperTriangularMatrix):
309 * unit-tests/statistics-tests.js: Added a test case.
311 2018-01-18 Ryosuke Niwa <rniwa@webkit.org>
313 Don't fetch more than two builds to check duplicity of builds in ReportProcessor
314 https://bugs.webkit.org/show_bug.cgi?id=181786
316 Reviewed by Wenson Hsieh.
318 Limit the number of builds to check to avoid using a lot of memory with a long delay.
320 * public/include/report-processor.php:
321 (ReportProcessor::resolve_build_id):
323 2018-01-17 Ryosuke Niwa <rniwa@webkit.org>
325 Rename config.json to config.json.sample
326 https://bugs.webkit.org/show_bug.cgi?id=181785
328 Reviewed by Wenson Hsieh.
330 * .gitignore: Added config.json.
331 * ReadMe.md: Updated the instruction.
332 * config.json.sample: Renamed from config.json.
334 2018-01-17 Ryosuke Niwa <rniwa@webkit.org>
336 Unreviewed build fixes in TestGroupResultsViewer.
338 * public/v3/components/test-group-results-viewer.js:
339 (TestGroupResultsViewer.prototype.render): _renderCurrentMetricsLazily was never called.
340 (TestGroupResultsViewer.prototype._buildRowForMetric): Don't try to render null or NaN.
342 2018-01-17 Ryosuke Niwa <rniwa@webkit.org>
344 Fix perf dashboard tests for node v8
345 https://bugs.webkit.org/show_bug.cgi?id=181782
347 Reviewed by Wenson Hsieh.
349 Fixed the various tests for node.js v8, which is the latest LTS version.
351 * server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests
353 * server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date
354 in node.js parses using the local timezone by default.
355 * server-tests/resources/test-server.js:
356 (TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
357 function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.
358 * server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
359 * unit-tests/measurement-set-tests.js:
360 (waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.
362 2018-01-11 Ryosuke Niwa <rniwa@webkit.org>
364 Cannot trigger Dromaeo tests on internal perf try bots
365 https://bugs.webkit.org/show_bug.cgi?id=179712
367 Reviewed by Chris Dumez.
369 The bug was caused by CustomAnalysisTaskConfigurator only showing the top-level tests that are triggerable
370 instead of the list of highest level tests that are triggerable.
372 * public/v3/components/custom-analysis-task-configurator.js:
373 (CustomAnalysisTaskConfigurator.prototype.selectTests): Update the test group name when a new test is picked.
374 (CustomAnalysisTaskConfigurator.prototype.selectPlatform):
375 (CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Extracted from selectPlatform.
376 (CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Include the list of all highest-level tests
377 which are triggerable.
378 (CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Added labelForObject which returns the label
379 to be used in the list items. For tests, we want to use the full name, not just its label.
380 * public/v3/models/analysis-task.js:
381 (AnalysisTask.fetchById):
382 * public/v3/models/triggerable.js:
383 (Triggerable.prototype.acceptedTests): Added.
384 (Triggerable.prototype.acceptsTest): Deleted.
386 == Rolled over to ChangeLog-2018-01-01 ==