blob: 5730fec7adf29dcffb0a9a9a452124bb3b9625fc [file] [log] [blame]
2021-11-06 David Kilzer <ddkilzer@apple.com>
Remove empty directories from from svn.webkit.org repository as of r285357
<https://webkit.org/b/232773>
Unreviewed clean up.
* public/js: Removed.
* public/v2/js: Removed.
2021-11-02 Dewei Zhu <dewei_zhu@apple.com>
Add 'paired-parallel' repetition type for A/B testing.
https://bugs.webkit.org/show_bug.cgi?id=229545
Reviewed by Ryosuke Niwa and Alexey Proskuryakov.
Add 'paired-parallel' repetition type for A/B testing.
Add 'TriggerableConfiguration' model to store repetition type information for each (platform, test) pair.
Add new component 'repetition-type-selection' to unify A/B testing UI for repetition type selection.
Extend A/B testing syncing script to update repetition types for each triggerable configuration and only
schedule A/B testing on a builder which supports a given repetition type.
* browser-tests/custom-analysis-task-configurator-tests.js: Updated unit tests accordingly.
(async createCustomAnalysisTaskConfiguratorWithContext):
* browser-tests/customizable-test-group-form-tests.js: Updated unit tests accordingly.
(async createCustomizableTestGroupFormWithContext):
* browser-tests/test-group-form-tests.js: Updated unit tests accordingly.
(async createTestGroupFormWithContext):
* init-database.sql: Added 'triggerable_configuration_repetition_types' table to store supported
repetition types for each triggerable configuration.
Added 'paired-parallel' repetition type.
* migrate-database.sql: Updated migration scripts.
* public/api/update-triggerable.php: Added logic to update repetition types for each tirggerable configurations.
* public/include/commit-sets-helpers.php: Added support for 'paired-parallel' repetition type.
* public/include/json-header.php: Extended 'find_triggerable_for_task' to include supported repetition types in
return value.
* public/include/manifest-generator.php: Added logic to include supported repetition types in manifest.
* public/privileged-api/add-build-requests.php: Extended API to support 'paired-parallel' repetition type.
* public/privileged-api/create-analysis-task.php: Extended API to support 'paired-parallel' repetition type.
* public/privileged-api/create-test-group.php: Extended API to support 'paired-parallel' repetition type.
* public/v3/commit-set-range-bisector.js:
(CommitSetRangeBisector._closestCommitSetsToBisectingCommitByTime): Fix a bug that error is raise when there is
no middle commit set in a range.
* public/v3/components/custom-configuration-test-group-form.js: Added code to update supported repetition types
on test config change.
(CustomConfigurationTestGroupForm.prototype.startTesting):
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree):
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype.startTesting):
* public/v3/components/repetition-type-selection.js: Added a new model that stores repetition types information
for each (platform, test) pair.
(RepetitionTypeSelection):
(RepetitionTypeSelection.prototype.didConstructShadowTree):
(RepetitionTypeSelection.prototype.get selectedRepetitionType):
(RepetitionTypeSelection.prototype.set selectedRepetitionType):
(RepetitionTypeSelection.prototype.set disabled):
(RepetitionTypeSelection.prototype.setTestAndPlatform):
(RepetitionTypeSelection.prototype.labelForRepetitionType):
(RepetitionTypeSelection.prototype.render):
(RepetitionTypeSelection.prototype._renderRepetitionTypeList):
(RepetitionTypeSelection.htmlTemplate):
* public/v3/components/test-group-form.js: Adopt 'repetition-type-selection'.
(TestGroupForm.prototype.setTestAndPlatform):
(TestGroupForm.prototype.updateWithTestGroup):
(TestGroupForm.prototype.startTesting):
* public/v3/index.html:
* public/v3/models/manifest.js: Pass 'supportedRepetitionTypes' and 'id' for TriggerableConfiguration.
(Manifest.reset):
(Manifest._didFetchManifest):
(Manifest):
* public/v3/models/test-group.js: Updated logic to share retry logic of 'alternating' test group with 'paired-parallel'
test group.
(TestGroup.prototype.async scheduleMoreRequestsOrClearFlag):
* public/v3/models/triggerable.js: Added TriggerableConfiguration model.
Added code to creat TriggerableConfiguration in 'Triggerable' constructor.
(Triggerable):
(Triggerable.findByTestConfiguration):
(prototype.get triggerable):
(prototype.get supportedRepetitionTypes):
(findByTestAndPlatform):
* public/v3/pages/analysis-task-page.js: Added code to update repetition type in the UI based on (test, platform) pair.
(AnalysisTaskResultsPane.prototype.setTestGroups):
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
(AnalysisTaskTestGroupPane.prototype._renderTestGroupForm):
* public/v3/pages/chart-pane.js: Adopt 'repetition-type-selection'.
(ChartPane.prototype.didConstructShadowTree):
(ChartPane.prototype.async _analyzeRange):
(ChartPane.prototype._renderActionToolbar):
* server-tests/api-manifest-tests.js:
* server-tests/api-update-triggerable-tests.js: Added and updated unit tests.
(updateWithMacWebKitRepositoryGroups):
* server-tests/api-upload-root-tests.js: Updated unit tests.
* server-tests/privileged-api-add-build-requests-tests.js: Added and updated unit tests.
(async addTriggerableAndCreateTask):
* server-tests/privileged-api-create-analysis-task-tests.js: Added and updated unit tests.
* server-tests/privileged-api-create-test-group-tests.js: Added and updated unit tests.
* server-tests/privileged-api-update-test-group-tests.js: Updated unit tests.
(async addTriggerableAndCreateTask):
* server-tests/resources/mock-data.js:
(MockData.someTestConfigurationId):
(MockData.otherTestConfigurationId):
(MockData.addMockConfiguration):
(MockData.set mockTestSyncConfigWithSingleBuilder):
(MockData.mockTestSyncConfigWithPatchAcceptingBuilder):
(MockData.mockTestSyncConfigWithTwoBuilders):
* server-tests/tools-sync-buildbot-integration-tests.js: Added and updated unit tests.
* tools/js/buildbot-syncer.js: Added code to update supported repetition types on triggerable updates.
Update configuration match code to only scheduler build requests the repetition types of which are both
supported by builder and triggerable configuration.
(BuildbotSyncer):
(BuildbotSyncer.prototype.addTestConfiguration):
(BuildbotSyncer.prototype.matchesConfiguration):
(BuildbotSyncer._loadConfig):
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.updateTriggerable):
(BuildbotTriggerable.prototype.async syncOnce): Move the code that fetches all related test groups before
invoking 'BuildbotTriggerable._validateRequests' which needs repetition types stored in test group in
'BuildbotSyncer.matchesConfiguration'.
* tools/js/v3-models.js:
* unit-tests/buildbot-syncer-tests.js: Added and updated unit tests.
(sampleiOSConfig):
(sampleiOSConfigWithExpansions):
(smallConfiguration):
(smallConfigurationWithCustomRepetitionTypes):
(createSampleBuildRequest):
* unit-tests/measurement-set-analyzer-tests.js: Updated unit tests.
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject):
2021-09-26 Dewei Zhu <dewei_zhu@apple.com>
Summary page should support calculating summary using weighted mean.
https://bugs.webkit.org/show_bug.cgi?id=230810
Reviewed by Ryosuke Niwa.
Add a way to specify weight for a platform or (plafform, metric) which will be used while calculating a summary.
* public/shared/statistics.js: Added 'weightedMean' function.
(Statistics.new.this.weightedMean):
* public/v3/pages/summary-page.js: Added support for specifying a weight for platform or (platform, metric).
(SummaryPage):
(SummaryPage.prototype._createConfigurationGroup):
(SummaryPageConfigurationGroup):
* unit-tests/statistics-tests.js: Added unit tests.
2021-07-20 Dewei Zhu <dewei_zhu@apple.com>
Use bigint for 'commit_order' field in 'commits' table to support larger range.
https://bugs.webkit.org/show_bug.cgi?id=228133
Reviewed by Ryosuke Niwa.
'integer' in postgres has range from -2147483648 to +2147483647 which is not big enough.
Use 'bigint' to support wider range (-9223372036854775808 to 9223372036854775807).
SQL query for migration:
`ALTER TABLE commits ALTER commit_order TYPE bigint;`
* init-database.sql: Update 'integer' to 'bigint' for 'commit_order'.
* migrate-database.sql: Added migration SQL for this change.
* server-tests/api-report-commits-tests.js: Add a unit test.
2021-05-03 Dewei Zhu <dewei_zhu@apple.com>
[perf dashboard] Add sequential mode for perf dashboard A/B testing.
https://bugs.webkit.org/show_bug.cgi?id=223886
Reviewed by Ryosuke Niwa.
Add 'testgroup_repetition_type' to 'analysis_test_groups' table to store repetition type which defaults to 'alternating'.
Add support to schedule 'sequential' A/B testing which schedules all iterations for the first configuration (A)
before the iterations for the second configuration (B).
Before this patch, all A/B testing alternated between two different configurations for each iteration.
Add retry logic for 'sequential' A/B testing.
Update syncing script to not proceed with next configuration the current configuration successfully completed
more iterations than the initially requested or retries exceeded the list.
Fix a potential race in syncing script that 'Promise.all' may cause test group not scheduled in order.
* browser-tests/test-group-form-tests.js: Updated and added unit tests.
* init-database.sql: Added 'testgroup_repetition_type' field to 'analysis_test_groups' table.
* migrate-database.sql: Updated migration script to conditionally add 'testgroup_repetition_type' field.
* public/api/test-groups.php: Added 'repetitionType' field in api return value.
* public/include/build-requests-fetcher.php: Fetching build requests under a triggerable should include test
group with all test groups finished but still need retry. This will allow syncing script to resolve the build
request by ID and block other request to be scheduled on the builder.
* public/include/commit-sets-helpers.php: Added code to create build requests based on test mode.
* public/privileged-api/add-build-requests.php: Added support to only add build requests to one commit set.
* public/privileged-api/create-analysis-task.php: Added 'repetitionType' support.
* public/privileged-api/create-test-group.php: Added 'repetitionType' support.
* public/privileged-api/update-test-group.php:
* public/shared/common-component-base.js:
* public/v3/components/custom-configuration-test-group-form.js: Added 'repetitionType' support.
(CustomConfigurationTestGroupForm.prototype.startTesting):
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype.startTesting):
* public/v3/components/test-group-form.js:
(TestGroupForm.prototype.startTesting):
* public/v3/models/analysis-task.js:
(AnalysisTask.async create):
(AnalysisTask):
* public/v3/models/build-request.js:
(BuildRequest):
(BuildRequest.prototype.updateSingleton): Allow build request order to be updated.
* public/v3/models/test-group.js:
(TestGroup):
(TestGroup.prototype.updateSingleton):
(TestGroup.prototype.repetitionType):
(TestGroup.prototype.repetitionCountForCommitSet): Refactored `repetitionCount` since repetition may be different
between configurations.
(TestGroup.prototype.hasRetries): A helper function to tell if a test group has retry runs.
(TestGroup.prototype.additionalRepetitionNeededToReachInitialRepetitionCount):
(TestGroup.prototype.successfulTestCount):
(TestGroup.prototype.isFirstTestRequest):
(TestGroup.prototype.precedingBuildRequest):
(TestGroup.prototype.retryCountForCommitSet):
(TestGroup.prototype.retryCountsAreSameForAllCommitSets):
(TestGroup.prototype.async _createAlternatingRetriesForTestGroup): Moved from 'retry-failed-build-requests' module.
(TestGroup.async _createSequentialRetriesForTestGroup): Moved from 'retry-failed-build-requests' module.
(TestGroup.prototype.async cancelPendingRequests):
(TestGroup.prototype.async didSendNotification):
(TestGroup.prototype.async addMoreBuildRequests):
(TestGroup.async createWithTask):
(TestGroup.async createWithCustomConfiguration):
(TestGroup.async createAndRefetchTestGroups):
(TestGroup.prototype.async scheduleMoreRequestsOrClearFlag): Moved from 'retry-failed-build-requests' module.
(TestGroup.async fetchById): Added support to fetch test group by ID.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskChartPane.prototype.didConstructShadowTree):
(AnalysisTaskResultsPane.prototype.didConstructShadowTree):
(AnalysisTaskConfiguratorPane.prototype.setTestGroups):
(AnalysisTaskConfiguratorPane):
(AnalysisTaskTestGroupPane.prototype.didConstructShadowTree):
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
(AnalysisTaskTestGroupPane.prototype._retrySummary):
(AnalysisTaskPage.prototype.didConstructShadowTree):
(AnalysisTaskPage.prototype.async _retryCurrentTestGroup):
(AnalysisTaskPage.prototype.async _bisectCurrentTestGroup):
(AnalysisTaskPage.set const):
(AnalysisTaskPage.prototype.async _createTestGroupAfterVerifyingCommitSetList):
(AnalysisTaskPage.prototype.async _createCustomTestGroup):
* public/v3/pages/chart-pane.js:
(ChartPane.prototype.didConstructShadowTree):
(ChartPane.prototype.async _analyzeRange):
* public/v3/pages/create-analysis-task-page.js:
(CreateAnalysisTaskPage.prototype.async _createAnalysisTaskWithGroup):
* server-tests/api-build-requests-tests.js: Added a unit test.
* server-tests/api-upload-root-tests.js: Updated unit tests.
* server-tests/privileged-api-add-build-requests-tests.js: Updated and added unit tests.
* server-tests/privileged-api-create-analysis-task-tests.js: Added unit tests.
* server-tests/privileged-api-create-test-group-tests.js: Updated and added unit tests.
* server-tests/privileged-api-update-test-group-tests.js: Updated and added unit tests.
* server-tests/resources/common-operations.js:
(async assertThrows):
* server-tests/resources/mock-data.js:
(MockData.addMockData):
(MockData.set addMockBuildRequestsWithRoots):
(MockData.set addAnotherMockTestGroup):
(MockData.set mockTestSyncConfigWithSingleBuilder):
(MockData.sampleBuildData):
* server-tests/tools-buildbot-triggerable-tests.js: Updated and added unit tests.
* server-tests/tools-sync-buildbot-integration-tests.js: Updated unit tests.
(async createTestGroupWithPatch):
(createTestGroupWihOwnedCommit):
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable):
(BuildbotSyncer.prototype.pullBuildbot):
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable):
(BuildbotTriggerable.prototype.async syncOnce):
(BuildbotTriggerable.prototype.async _scheduleRequest):
(BuildbotTriggerable.prototype._shouldDeferSequentialTestingRequestWithNewCommitSet):
* tools/js/measurement-set-analyzer.js:
(MeasurementSetAnalyzer.prototype.async _analyzeMeasurementSet):
(MeasurementSetAnalyzer):
* tools/js/retry-failed-build-requests.js: Removed.
* tools/run-analysis.js: Use updated API to retry.
(async analysisLoop):
(async processTestGroupMayNeedMoreRequests):
* tools/sync-buildbot.js: Added command line option '--max-retry-factor'.
* unit-tests/analysis-task-tests.js: Updated unit tests.
* unit-tests/buildbot-syncer-tests.js: Updated unit tests.
(createSampleBuildRequest):
* unit-tests/measurement-set-analyzer-tests.js:
* unit-tests/retry-failed-build-requests-tests.js: Moved unit tests to test-group-tests.js.
* unit-tests/test-groups-tests.js: Added unit tests from 'retry-failed-build-requests-tests.js'.
2021-05-19 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that incorrect timestamp is reported for Git repositories.
https://bugs.webkit.org/show_bug.cgi?id=225987
Reviewed by Ryosuke Niwa.
'datetime.fromtimestamp' will use the current timezone.
However, '/api/report-commits' will interprete it as a timestamp string from UTC.
In order to keep the consistency, we should always use 'datetime.utcfromtimestamp'.
* tools/sync-commits.py: Use 'datetime.utcfromtimestamp' instead of 'datetime.fromtimestamp'.
(GitRepository._revision_from_tokens):
2021-05-20 Zhifei Fang <zhifei_fang@apple.com>
Need to use default git pull to remove the fake svn commit when syncing with SVN
https://bugs.webkit.org/show_bug.cgi?id=226039
Reviewed by Jonathan Bedard.
* tools/sync-commits.py:
(GitRepository._fetch_remote):
2021-05-18 Zhifei Fang <zhifei_fang@apple.com>
Clean up git svn mapping when git pull
https://bugs.webkit.org/show_bug.cgi?id=225934
Reviewed by Ryosuke Niwa.
* tools/sync-commits.py:
(GitRepository._fetch_remote):
2021-05-18 Zhifei Fang <zhifei_fang@apple.com>
Commits updater should ignore null revision identifier
https://bugs.webkit.org/show_bug.cgi?id=225911
Reviewed by Ryosuke Niwa.
* public/include/commit-updater.php:
* server-tests/api-report-commits-tests.js:
2021-05-07 Zhifei Fang <zhifei_fang@apple.com>
Add support for syncing repo with commit revision label.
https://bugs.webkit.org/show_bug.cgi?id=221982
Reviewed by Ryosuke Niwa.
Add new syncing option reportRevisionIdentifier, which will let the script try to sync the commit revision identifier from the commit message.
Add new syncing option reportSVNRevision, which will let the script try to report SVN revision from a git-svn repo.
* tools/sync-commits.py:
(main):
(load_repository):
(GitRepository.__init__):
(GitRepository.fetch_next_commit):
(GitRepository._git_hash_to_svn_revision):
(GitRepository._svn_revision_to_git_hash):
(GitRepository._revision_from_tokens):
(GitRepository._fetch_all_hashes):
2021-04-14 Zhifei Fang <zhifei_fang@apple.com>
Support Commit revision identifier in the Chart
https://bugs.webkit.org/show_bug.cgi?id=224496
Reviewed by Dewei Zhu.
In the measurement-set, we include the commit info but not the commit revision identifier column.
Make the API return the commit revision identifier as part of the commit data.
* browser-tests/customizable-test-group-form-tests.js: Fix flaky tests.
* browser-tests/index.html: Add commit revision identifier info.
* browser-tests/time-series-chart-tests.js: Fix flaky tests.
* public/api/measurement-set.php: Make this API provide commit revision identifier info.
* public/include/build-requests-fetcher.php: Ditto.
* public/v3/models/commit-set.js: Make the commit model can be constructed with the API respose format.
* server-tests/api-measurement-set-tests.js: Adding test for commit revision identifier.
* server-tests/api-build-requests-tests.js: Ditto.
* unit-tests/analysis-task-tests.js: Ditto.
(measurementCluster):
* unit-tests/commit-set-tests.js: Ditto.
* unit-tests/measurement-adaptor-tests.js: Ditto.
* unit-tests/measurement-set-tests.js: Ditto.
2021-03-31 Zhifei Fang <zhifei_fang@apple.com>
Add commit revision label support
https://bugs.webkit.org/show_bug.cgi?id=222897
Reviewed by Ryosuke Niwa.
Add new column revision label.
Make all commit api also can work with revision label.
Change the commit label display with commit revision label.
* browser-tests/commit-log-viewer-tests.js: Fix a failed test case, while requesting the remote api,
we should wait for those promises resolved and then wait for commponent to render.
* init-database.sql: Add new column revision_identifier.
* migrate-database.sql: Add new column revision_identifier.
* public/include/commit-log-fetcher.php: Make api that works with revision should work with revision label.
* public/include/commit-updater.php: Ditto.
* public/include/report-processor.php: Make the processor can also insert revision label.
* public/v3/models/commit-log.js:
(CommitLog.prototype.updateSingleton):
(CommitLog.prototype.revisionIdentifier):
(CommitLog.prototype.label): Make the label include revision label and revision.
(CommitLog.prototype.diff): Make the diff label include revision label and revision.
* server-tests/api-commits-tests.js:
* server-tests/api-report-commits-tests.js:
* server-tests/api-report-tests.js:
(reportWithRevisionIdentifierCommit):
* unit-tests/commit-log-tests.js:
2021-03-22 Dewei Zhu <dewei_zhu@apple.com>
[perf dashboard] Remove v1 and v2 code.
https://bugs.webkit.org/show_bug.cgi?id=223617
Reviewed by Ryosuke Niwa.
Remove v1 and v2 code from perf dashboard.
Remove detect-changes.js script since run-analysis.js is the v3 version equivalent.
* public/index.html: Keep the redirection to v3.
* public/js/helper-classes.js: Removed.
* public/js/jquery.colorhelpers.js: Removed.
* public/js/jquery.flot.categories.js: Removed.
* public/js/jquery.flot.crosshair.js: Removed.
* public/js/jquery.flot.errorbars.js: Removed.
* public/js/jquery.flot.fillbetween.js: Removed.
* public/js/jquery.flot.js: Removed.
* public/js/jquery.flot.navigate.js: Removed.
* public/js/jquery.flot.plugins.js: Removed.
* public/js/jquery.flot.resize.js: Removed.
* public/js/jquery.flot.selection.js: Removed.
* public/js/jquery.flot.stack.js: Removed.
* public/js/jquery.flot.symbol.js: Removed.
* public/js/jquery.flot.threshold.js: Removed.
* public/js/jquery.flot.time.js: Removed.
* public/js/jquery.js: Removed.
* public/v2/analysis.js: Removed.
* public/v2/app.css: Removed.
* public/v2/app.js: Removed.
* public/v2/chart-pane.css: Removed.
* public/v2/commits-viewer.js: Removed.
* public/v2/data.js: Removed.
* public/v2/index.html: Keep the redirection to v3.
* public/v2/interactive-chart.js: Removed.
* public/v2/js/d3/LICENSE: Removed.
* public/v2/js/d3/d3.js: Removed.
* public/v2/js/d3/d3.min.js: Removed.
* public/v2/js/ember-data.js: Removed.
* public/v2/js/ember.js: Removed.
* public/v2/js/handlebars.js: Removed.
* public/v2/js/jquery.min.js: Removed.
* public/v2/manifest.js: Removed.
* public/v2/popup.js: Removed.
* public/v2/statistics-strategies.js: Removed.
* tools/detect-changes.js: Removed.
2021-03-21 Dewei Zhu <dewei_zhu@apple.com>
[perf dashboard] Remove non-inclusive words from perf dashboard.
https://bugs.webkit.org/show_bug.cgi?id=223505
Reviewed by Ryosuke Niwa.
Removed most of non-inclusive terminology and replaced it with 'worker'.
Make impacted APIs backward compatible during transition.
The non-inclusive terminology will be removed after transition.
* ReadMe.md: Removed non-inclusive words.
* init-database.sql: Rename tables with non-inclusive words.
* migrate-database.sql: Added migration SQL for existing database.
* public/admin/build-workers.php: Renamed from Websites/perf.webkit.org/public/admin/build-slaves.php.
* public/api/build-requests.php:
* public/api/measurement-set.php:
* public/api/report-commits.php:
* public/api/runs.php:
* public/api/update-triggerable.php:
* public/api/upload-root.php:
* public/include/admin-header.php:
* public/include/json-header.php:
* public/include/report-processor.php:
* public/privileged-api/add-build-requests.php:
* public/privileged-api/create-analysis-task.php:
* public/privileged-api/create-test-group.php:
* public/privileged-api/update-test-group.php:
* public/v2/js/ember.js:
* server-tests/api-build-requests-tests.js:
* server-tests/api-commits-tests.js:
* server-tests/api-report-commits-tests.js:
* server-tests/api-report-tests.js:
(emptyReport):
(reportWitMismatchingCommitTime):
(reportWithOneSecondCommitTimeDifference):
(emptyWorkerReport):
(emptySlaveReport): Deleted.
* server-tests/api-test-groups.js:
* server-tests/api-update-triggerable-tests.js:
(updateWithOSXRepositoryGroup):
(updateWithMacWebKitRepositoryGroups):
* server-tests/api-upload-root-tests.js:
(makeReport):
(addWorkerAndCreateRootFile):
* server-tests/privileged-api-add-build-requests-tests.js:
(async createAnalysisTask):
(async addTriggerableAndCreateTask):
* server-tests/privileged-api-create-analysis-task-tests.js:
* server-tests/privileged-api-create-test-group-tests.js:
(createAnalysisTask):
* server-tests/privileged-api-update-test-group-tests.js:
(async createAnalysisTask):
(async addTriggerableAndCreateTask):
* server-tests/resources/common-operations.js:
* server-tests/resources/mock-data.js:
(MockData.addMockConfiguration):
(MockData.set mockTestSyncConfigWithSingleBuilder):
(MockData.sampleBuildData):
* server-tests/resources/test-server.js:
(TestServer.prototype.testConfig):
* server-tests/tools-buildbot-triggerable-tests.js:
* server-tests/tools-os-build-fetcher-tests.js:
* server-tests/tools-sync-buildbot-integration-tests.js:
(createTriggerable):
* tools/detect-changes.js:
(loadServerConfig):
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.buildTag):
(BuildbotSyncer):
(BuildbotSyncer.prototype.scheduleRequest):
(BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable):
(BuildbotSyncer.prototype.pullBuildbot):
(BuildbotSyncer._loadConfig):
(BuildbotSyncer._validateAndMergeConfig):
(BuildbotBuildEntry.prototype.slaveName): Deleted.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable):
(BuildbotTriggerable.prototype.updateTriggerable):
(BuildbotTriggerable.prototype.async syncOnce):
(BuildbotTriggerable.prototype.async _scheduleRequest):
(BuildbotTriggerable.prototype._scheduleRequestIfWorkerIsAvailable):
(BuildbotTriggerable.prototype._scheduleRequestWithLog):
(BuildbotTriggerable._testGroupMapForBuildRequests):
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable): Deleted.
* tools/js/database.js:
* tools/js/os-build-fetcher.js:
(prototype.async _reportCommits):
* tools/js/privileged-api.js:
(NodePrivilegedAPI.prototype.sendRequest):
(NodePrivilegedAPI.configure):
(NodePrivilegedAPI):
* tools/pull-os-versions.py:
(OSBuildFetcher.fetch_and_report_new_builds):
* tools/run-analysis.js:
(async analysisLoop):
* tools/sync-buildbot.js:
(syncLoop.const.makeTriggerable):
(syncLoop):
* tools/sync-commits.py:
(Repository.fetch_commits_and_submit):
* tools/sync-os-versions.js:
(syncLoop):
* tools/util.py:
(submit_commits):
* unit-tests/analysis-task-tests.js:
* unit-tests/buildbot-syncer-tests.js:
(sampleiOSConfig):
(sampleBuildData):
(async const):
* unit-tests/checkconfig.js:
* unit-tests/measurement-set-analyzer-tests.js:
* unit-tests/privileged-api-tests.js:
* unit-tests/retry-failed-build-requests-tests.js:
* unit-tests/test-groups-tests.js:
2021-03-21 Dewei Zhu <dewei_zhu@apple.com>
[perf dashboard] Perf dashboard should be compatible with newer version of postgres.
https://bugs.webkit.org/show_bug.cgi?id=223567
Reviewed by Ryosuke Niwa.
Newer version of postgres requires explicit ROW expression while updating a single column
using multi-column update syntax. However, 'ROW' is not supported in postgres < 10. In order
to keep compatibility, using a separate query when only updating one row.
* public/include/db.php: Use 'column = value' when there is only one column to update.
2021-03-06 Ryosuke Niwa <rniwa@webkit.org>
[perf dashboard] Use async/await in tests for TimeSeriesChart and InteractiveTimeSeriesChart
https://bugs.webkit.org/show_bug.cgi?id=222876
Reviewed by Sam Weinig.
Use async/await instead of chaining promises manually in the browser tests for
TimeSeriesChart and InteractiveTimeSeriesChart for better readability.
* browser-tests/interactive-time-series-chart-tests.js:
* browser-tests/time-series-chart-tests.js:
2021-03-06 Ryosuke Niwa <rniwa@webkit.org>
[perf dashboard] Modernize TimeSeries and TimeSeriesView
https://bugs.webkit.org/show_bug.cgi?id=222872
Reviewed by Dewei Zhu.
Declare instance fields in class declarations, use const/let instead of var, and use generators
for forward and backward iterations instead of manually implementing the iterator protocol.
This patch also splits FilteredTimeSeriesView out of TimeSeriesView.
* public/v3/models/time-series.js:
(TimeSeries): Moved the declaration of _data instance field to the class declaration.
(TimeSeries.prototype.constructor): Deleted.
(TimeSeries.prototype.extendToFuture):
(TimeSeries.prototype.valuesBetweenRange):
(TimeSeries.prototype.findById):
(TimeSeries.prototype.findPointAfterTime):
(TimeSeriesView): Declared the instance fields in the class declaration.
(TimeSeriesView.prototype.constructor): Removed filteredData from the argument since it's split
out to FilteredTimeSeriesView now.
(TimeSeriesView.prototype.get _data): Added. An abstraction needed for FilteredTimeSeriesView.
(TimeSeriesView.prototype._findIndexForPoint): Ditto. Moved out of the constructor.
(TimeSeriesView.prototype.filter): Return a FilteredTimeSeriesView.
(TimeSeriesView.prototype.viewTimeRange): Use _subRange to return either TimeSeriesView or
FilteredTimeSeriesView which ever is needed.
(TimeSeriesView.prototype._subRange): An abstraction needed for FilteredTimeSeriesView.
(TimeSeriesView.prototype.Symbol.iterator): Made this a generator instead of implementing
the iterator protocol directly.
(TimeSeriesView.prototype._reverse): Ditto.
(FilteredTimeSeriesView): Added.
(FilteredTimeSeriesView.prototype.constructor): Added. Assert that afterEndingIndex is less than
the length of the filtered data. This assertion was missing in TimeSeries prior to this patch
when filteredData is specified.
(FilteredTimeSeriesView.prototype.get _data): Added.
(FilteredTimeSeriesView.prototype._subRange): Added. Instantiate FilteredTimeSeriesView with
the same filtered data.
(FilteredTimeSeriesView.prototype._findIndexForPoint): Moved from TimeSeriesView's constructor.
(FilteredTimeSeriesView.prototype._buildPointIndexMap): Moved from TimeSeriesView.
2021-03-06 Ryosuke Niwa <rniwa@webkit.org>
[perf dashboard] Some browser tests are flaky or failing
https://bugs.webkit.org/show_bug.cgi?id=222874
Reviewed by Dewei Zhu.
There were two tests in TimeSeriesChart tests that were intermittently failing due to the test
not reliably waiting for the iframe's resize to take effect and not waiting for the time series'
fetching logic to run 'til completion before waiting for canvas charts to be re-drawn. Fixing
these by adding code to wait for these conditons.
All browser tests for markup-component.js was broken in r274036 as `require` function is not
available in browsers. Added a workaround in BrowsingContext to add a make assert.ok function
using expect(~).to.be.true().
* browser-tests/index.html:
(BrowsingContext.prototype.constructor):
(waitForElementResize): Added.
* browser-tests/time-series-chart-tests.js: Fixed bugs in the tests.
2021-03-06 Ryosuke Niwa <rniwa@webkit.org>
[perf dashboard] Modernize DataModelObject and LabeledObject
https://bugs.webkit.org/show_bug.cgi?id=222871
Reviewed by Dewei Zhu.
Use const/let instead of var, async/await instead of Promise.then, and Map instead
of a regular object for a dictionary.
Also define instance fields in the class declaration instead of simply adding them
in the class constructors, and set the default parameter values instead of relying
on the unspecified argument being undefined.
* public/v3/models/data-model.js:
(DataModelObject.ensureSingleton):
(DataModelObject.namedStaticMap):
(DataModelObject.ensureNamedStaticMap):
(DataModelObject.findById):
(DataModelObject.listForStaticMap):
(DataModelObject.async cachedFetch):
(DataModelObject):
(LabeledObject.sortByName):
(DataModelObject.cachedFetch): Deleted.
2021-03-06 Ryosuke Niwa <rniwa@webkit.org>
[perf dashboard] Modernize MeasurementSet
https://bugs.webkit.org/show_bug.cgi?id=222857
Reviewed by Dewei Zhu.
Modernized MeasurementSet by using new instance field syntax, let/const instead of var,
async/await instead of then/catch, and Map instead of an object as a dictionary.
* public/v3/models/measurement-set.js:
(Array.prototype.includes): Deleted this polyfill which was needed for an old node.js.
(MeasurementSet): Moved the initialization of instance variables here. Also use Map
for this._allFetches instead of using a regular object as a dictionary.
(MeasurementSet.findSet): Use Map for MeasurementSet mapping.
(MeasurementSet.prototype.findClusters): Use const and let instead of var.
(MeasurementSet.prototype.async fetchBetween): Use async & await instead of Promise.then.
(MeasurementSet.prototype._ensureClusterPromise): Use let/const instead of var.
(MeasurementSet.prototype._urlForCache): Renamed from _constructUrl and removed the argument
for useCache since this function is now only used for feteching JSON caches.
(MeasurementSet.async _fetchPrimaryCluster): Use async/await and let/const. Consolidated
the API call to re-generate new JSON files and inlined API path here.
(MeasurementSet.async _fetchSecondaryCluster): Use async/await.
(MeasurementSet._addFetchedCluster): Use let/const instead of var.
(MeasurementSet.async fetchSegmentation): Use async/await and let/const.
(MeasurementSet.async _cachedClusterSegmentation): Ditto.
(MeasurementSet.prototype.async _invokeSegmentationAlgorithm): Ditto.
* unit-tests/measurement-set-tests.js:
(beforeEach): Updated the logic to reset measurement sets since the static variable was
renamed in MeasurementSet.findSet above.
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject): Ditto.
2021-03-06 Zhifei Fang <zhifei_fang@apple.com>
Make server test run with new node version
https://bugs.webkit.org/show_bug.cgi?id=222463
Change assert.equal to assert.strictEqual since node deprecated this API
Add a new function console.assert to make sure it will throw an error
Reviewed by Ryosuke Niwa.
* public/v3/models/repository.js:
(Repository.sortByNamePreferringOnesWithURL):
(Repository):
* server-tests/admin-platforms-tests.js:
* server-tests/admin-reprocess-report-tests.js:
* server-tests/api-build-requests-tests.js:
(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):
* server-tests/api-commits-tests.js:
(assertCommitIsSameAsOneSubmitted):
(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):
* server-tests/api-manifest-tests.js:
(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):
* server-tests/api-measurement-set-tests.js:
* server-tests/api-report-commits-tests.js:
(emptyReport.then):
(async initialReportCommits):
(async setUpTestsWithExpectedStatus):
(async testWithExpectedFailure):
* server-tests/api-report-tests.js:
(emptyReport.then):
* server-tests/api-test-groups.js:
* server-tests/api-update-triggerable-tests.js:
(update.then):
(then.response.db.selectAll.string_appeared_here.then):
(then.db.selectAll.string_appeared_here.then):
(then.Manifest.fetch.then):
* server-tests/api-upload-root-tests.js:
* server-tests/api-uploaded-file-tests.js:
(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):
* server-tests/privileged-api-add-build-requests-tests.js:
(async createAnalysisTask):
(const.commitSet.of.updatedGroups.0.requestedCommitSets):
* server-tests/privileged-api-create-analysis-task-tests.js:
* server-tests/privileged-api-create-test-group-tests.js:
(createAnalysisTask):
(return.createAnalysisTask.string_appeared_here.then):
(return.addTriggerableAndCreateTask.string_appeared_here.then):
(string_appeared_here.then):
* server-tests/privileged-api-upate-run-status.js:
* server-tests/privileged-api-update-test-group-tests.js:
(async createAnalysisTask):
* server-tests/privileged-api-upload-file-tests.js:
(TestServer.testConfig.uploadFileLimitInMB.1.then):
* server-tests/resources/common-operations.js:
(async assertThrows):
* server-tests/resources/temporary-file.js:
(TemporaryFile.makeTemporaryFileOfSizeInMB):
* server-tests/tools-buildbot-triggerable-tests.js:
(assertRequestAndResolve):
(then.refetchManifest.then):
(getBuilderNameToIDMapPromise.then):
* server-tests/tools-os-build-fetcher-tests.js:
* server-tests/tools-sync-buildbot-integration-tests.js:
(assertAndResolveRequest):
* tools/js/assert-override.js: Added.
(makeConsoleAssertThrow):
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.buildRequestStatusIfUpdateIsNeeded):
(BuildbotBuildEntry):
(BuildbotSyncer.prototype.scheduleRequest):
(BuildbotSyncer._loadConfig):
(BuildbotSyncer._parseRepositoryGroup):
(BuildbotSyncer._validateAndMergeConfig):
(BuildbotSyncer):
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._validateRequests):
* tools/js/markup-component.js:
(const.MarkupDocument.new.MarkupDocument.prototype._idForClone):
(const.MarkupDocument.new.MarkupDocument.prototype.markup):
* tools/js/os-build-fetcher.js:
(prototype._addOwnedCommitsForBuild):
* tools/js/remote.js:
(NodeRemoteAPI.prototype.configure):
* tools/js/v3-models.js:
* unit-tests/commit-set-tests.js:
2021-02-18 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that a syncing script may try to reuse a delete root.
https://bugs.webkit.org/show_bug.cgi?id=222144
Reviewed by Ryosuke Niwa.
UploadedFile.deletedAt is not returned by API which makes UploadedFile instance always claims
the file it not deleted.
Fix a logical bug in CommitSet.areAllRootsAvailable.
* public/include/uploaded-file-helpers.php: Include 'deletedAt' filed in the API response.
* public/v3/models/commit-set.js:
(CommitSet.prototype.areAllRootsAvailable): Fixed an syntax error and a logical bug.
* server-tests/api-build-requests-tests.js: Added check on 'deletedAt' to be set on deleted files.
* unit-tests/commit-set-tests.js: Added unit tests for CommitSet.areAllRootsAvailable.
* unit-tests/resources/mock-v3-models.js: Cleared static map for UploadedFile.
2021-02-16 Dean Johnson <dean_johnson@apple.com>
[perf.webkit.org] Do not schedule jobs to Buildbot if the last job failed
https://bugs.webkit.org/show_bug.cgi?id=221943
Reviewed by Dewei Zhu.
* server-tests/resources/mock-data.js:
(MockData.sampleBuildData): Allow options.results to be specified.
* server-tests/tools-buildbot-triggerable-tests.js:
(async const): Add tests for new functionality. Existing tests still pass.
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize): Track the 'results' key from a build.
(BuildbotBuildEntry.prototype.result): Make the build result available.
(BuildbotSyncer): Track the last completed build.
(BuildbotSyncer.prototype.lastCompletedBuildSuccessful): Check if the last completed
build was successful.
(BuildbotSyncer.prototype.pullBuildbot):
* tools/js/buildbot-triggerable.js: Do not schedule a job to a builder who failed
its last completedd build.
(BuildbotTriggerable.prototype._scheduleRequestIfSlaveIsAvailable):
2021-02-11 Dewei Zhu <dewei_zhu@apple.com>
'sync-commits.py' should be able to limit reporting scope to a specific branch on a Git repository.
https://bugs.webkit.org/show_bug.cgi?id=221799
Reviewed by Ryosuke Niwa.
Fetching git commits with 'git log --all ...' may end up fetching commits from branches created for
pull requests. Add 'branch' variable to allow us to limit to a certain branch.
* tools/sync-commits.py: Added 'branch' variable to GitRepository so that we can fetch from a specific branch.
If branch is not specified, it will still use '--all' to list commits.
(load_repository):
(GitRepository.__init__):
(GitRepository._fetch_all_hashes):
2021-02-12 Roy Reapor <rreapor@apple.com>
perf.webkit.org/tools/js/analysis-results-notifier.js should allow sending of completion emails regardless of test name
https://bugs.webkit.org/show_bug.cgi?id=221712
Reviewed by Dewei Zhu.
Rule `platforms` and `tests` can be undefined, an empty array, or an array of strings. Undefined will match everything.
Empty array will match nothing. Array of strings will match items in the array.
Rule will not match if either `tests` or `platforms` is an empty array.
* tools/js/analysis-results-notifier.js:
(AnalysisResultsNotifier._validateRules.isUnderfinedOrEmptyArrayOrArrayOfStrings):
- `platforms` and `tests` can now be undefined or an empty array officially
(AnalysisResultsNotifier._validateRules):
- switched to `assert.ok()`. `console.assert()` no longer throws since node v10 (https://github.com/facebook/jest/issues/5634)
- both rule `platforms` and `tests` must pass `isUnderfinedOrEmptyArrayOrArrayOfStrings()`. previously, rules like `{tests: [1, 3], platforms: ['speedometer']}` passes validation.
(AnalysisResultsNotifier._applyUpdate):
- switched to `assert.ok()`. `console.assert()` no longer throws since node v10 (https://github.com/facebook/jest/issues/5634)
(AnalysisResultsNotifier._validateRules.isNonemptyArrayOfStrings): Deleted.
* unit-tests/analysis-results-notifier-tests.js:
- added a bunch of unittests
- specify the exact regex match for `assert.throws()` and `assert.doesNotThrow()` argument.
2021-01-20 Dewei Zhu <dewei_zhu@apple.com>
BuildbotTriggerable should not update build requests from another triggerable.
https://bugs.webkit.org/show_bug.cgi?id=220762
Reviewed by Ryosuke Niwa.
BuildbotTriggerable._pullBuildbotOnAllSyncers assumes 'BuildRequest.all()' returns all build requests under current triggerable.
However, this assumption got broken when root reuse change was introduced because build requests under same analysis task are
fetched. Thus, 'BuildRequest.all()' may contain build requests those are not under current triggerable. And those build requests
will be updated to 'failedIfNotCompleted'.
Update 'api/build-requests' so that 'url' and 'status_description' fields are not cleared if update does not specify them.
* public/api/build-requests.php: Added logic to avoid updating 'url' and 'status_description' if they are not specified.
* server-tests/api-build-requests-tests.js: Added an unit test.
* server-tests/resources/mock-data.js:
(MockData.async set addMockBuildRequestsForTwoTriggerablesUnderOneAnalysisTask):
* server-tests/tools-buildbot-triggerable-tests.js: Added an unit test.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.async syncOnce): Fixed a typo.
(BuildbotTriggerable._pullBuildbotOnAllSyncers): Instead of iterating over 'BuildRequest.all()', only set 'failedIfNotCompleted'
for build requests those are under current triggerable and satisfy the condition.
2020-12-09 Dewei Zhu <dewei_zhu@apple.com>
'AnalysisTask._commitSetsInSamePlatformGroup' should not fetch an invalid platform and metric config for a MeasurementSet.
https://bugs.webkit.org/show_bug.cgi?id=219721
Reviewed by Ryosuke Niwa.
Selected test group on analysis task page may not highlight when 'AnalysisTask._commitSetsInSamePlatformGroup' fetches
an invalid platform and metric config for a MeasurementSet.
* public/v3/models/analysis-task.js: Added a logic to avoid fetching MeasurementSet with an invalid config.
(AnalysisTask.prototype._commitSetsInSamePlatformGroup):
2020-12-09 Dewei Zhu <dewei_zhu@apple.com>
Add max age for a root to be reused.
https://bugs.webkit.org/show_bug.cgi?id=219628
Reviewed by Ryosuke Niwa.
In order to prevent reusing a stale root, we should set a limit on the age of a root to be reused.
* public/include/manifest-generator.php: Added 'maxRootReuseAgeInDays' to manifest.
* public/v3/models/build-request.js: Added root age check.
(BuildRequest.prototype.async findBuildRequestWithSameRoots):
* public/v3/models/commit-set.js: Extended 'areAllRootsAvailable' with root age check.
(CommitSet.prototype.areAllRootsAvailable):
* public/v3/models/manifest.js:
(Manifest.fetch): Made it async.
(Manifest.async fetchRawResponse): Extract fetching raw manifest out so that 'maxRootReuseAgeInDays'
can be read without resetting other data models. Also added code to only fetch from API if requesting
/data/manifest.json returns 404.
(Manifest._didFetchManifest):
* server-tests/api-manifest-tests.js: Updated unit tests.
* unit-tests/build-request-tests.js: Updated unit tests and add new tests.
* unit-tests/manifest-test.js: Added unit tests.
2020-11-20 Dewei Zhu <dewei_zhu@apple.com>
'run-analysis' script should schedule retries for A/B tests even after chart analysis failure.
https://bugs.webkit.org/show_bug.cgi?id=219116
Reviewed by Ryosuke Niwa.
Anlyzing charts and schedule retries for A/B tests on run-analysis script are independent task.
It should not skip scheduling retries even when chart analysis part fails.
* tools/run-analysis.js:
(async analysisLoop): Change the logic so that chart analysis failure will not stop scheduling retries.
Fix a typo for 'notificationRemoteAPI'.
2020-11-18 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that platform groups cannot be updated on 'admin/platform'.
https://bugs.webkit.org/show_bug.cgi?id=219118
Reviewed by Ryosuke Niwa.
Admins should be able to update platform group on 'admin/platform'.
Update the assertion on BuildbotTriggerable._pullBuildbotOnAllSyncers so that when there is no
corresponding entry in buildRequestByGroup, the test group for the request should be finished.
* public/admin/platforms.php:
* tools/js/buildbot-triggerable.js: Updated the assert statement.
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):
2020-11-16 Dewei Zhu <dewei_zhu@apple.com>
BuildbotTriggerable should not process a completed build request from a completed test group.
https://bugs.webkit.org/show_bug.cgi?id=219016
Reviewed by Ryosuke Niwa.
BuildBotTriggerable._pullBuildbotOnAllSyncers relies on buildReqeustsByGroup to contain all build requests found by
BuildRequest.findById. However, since re-use root change is landed, above assumption is no longer valid. BuildRequest.all()
may includes build requests under same analysis task. Thus, `_pullBuildbotOnAllSyncers` will fail due to 'info' is undefined.
* server-tests/tools-buildbot-triggerable-tests.js: Added a unit test.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers): Added logic to stop processing the build request if it's not
from incomplete build requests under a triggerable.
2020-10-30 Dewei Zhu <dewei_zhu@apple.com>
Performance dashboard should avoid building same configuration under one analysis task.
https://bugs.webkit.org/show_bug.cgi?id=218413
Reviewed by Ryosuke Niwa.
Add logic in syncing script to reuse already built roots from same build request under current analysis task.
If there is another same build request scheduled/running, will defer scheduling current build request.
* public/admin/platforms.php: Fixed newer version of PHP warns on accessing invalid key in an array.
* public/admin/tests.php: Added a null check against $selected_parent.
* public/api/build-requests.php: Extended this API to allow reusing roots from existing build request.
* public/v3/models/build-request.js:
(BuildRequest.prototype.async findBuildRequestWithSameRoots): Find build type build request with same commit set
which can/will be reused under current analysis task.
* public/v3/models/commit-set.js:
(CommitSet.prototype.equalsIgnoringRoot): Added a helper function which checks commit set equality ignoring the root.
(CommitSet.prototype.equals): Use '_equalsOptionallyIgnoringRoot' as underlying implementation.
(CommitSet.prototype._equalsOptionallyIgnoringRoot): Implementation for both equals and equalsIngnoringRoot.
* server-tests/api-build-requests-tests.js: Added unit tests.
* server-tests/resources/mock-data.js: Added new mock data for new unit tests.
(MockData.addMockConfiguration):
(MockData.addMockData):
(MockData.set addMockBuildRequestsWithRoots):
(MockData.set addTwoMockTestGroupWithOwnedCommits):
(MockData.mockTestSyncConfigWithPatchAcceptingBuilder):
* server-tests/tools-buildbot-triggerable-tests.js: Added unit tests.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.async syncOnce):
(BuildbotTriggerable.prototype.async _scheduleRequest): A helper function to reuse the roots if there are built
roots available for same build type build request. If there is another build scheduled for same build request,
will defer scheduling the build request.
* unit-tests/build-request-tests.js: Add unit tests.
2020-10-27 Dewei Zhu <dewei_zhu@apple.com>
Refactor 'platforms' table to contain group information.
https://bugs.webkit.org/show_bug.cgi?id=193132
Reviewed by Ryosuke Niwa.
Group 'platforms' so that bisecting can use commit sets from other platforms which are in the same platform group.
This will help to enhance the bisecting capability to higher granularity.
Added admin page to manage platform groups.
Updated platform admin page to allow update platform group.
SQL query to update existing database:
'''
BEGIN;
CREATE TABLE platform_groups (
platformgroup_id serial PRIMARY KEY,
platformgroup_name varchar(64) NOT NULL,
CONSTRAINT platform_group_name_must_be_unique UNIQUE (platformgroup_name));
ALTER TABLE platforms ADD COLUMN platform_group integer REFERENCES platform_groups DEFAULT NULL;
END;
'''
* init-database.sql: Added 'platform_group' column to 'platforms' table.
Added 'platform_groups' table.
* migrate-database.sql: Updated migration script accordingly.
* public/admin/platform-groups.php: Added a page to manage platform groups.
* public/admin/platforms.php: Added support to update platform group in admin page.
* public/include/admin-header.php: Added link to page that maneges platform groups.
* public/include/manifest-generator.php: Added 'platformGroup' in manifest.
* public/v3/index.html: Included 'platform-groups.js'.
* public/v3/models/analysis-task.js:
(AnalysisTask.prototype.async.commitSetsFromTestGroupsAndMeasurementSet):
Included measurement commit sets from other platforms in the same platform group.
(AnalysisTask.prototype._commitSetsInSamePlatformGroup):
Helper function to find measurement commit set for other platforms in same platform group.
* public/v3/models/manifest.js: Added step to build 'PlatformGroup' instances.
* public/v3/models/platform-group.js: Added 'PlatformGroup' to represent entries in 'platform_groups' table.
(PlatformGroup):
(PlatformGroup.prototype.addPlatform):
(PlatformGroup.prototype.platforms):
* public/v3/models/platform.js: Added itself to 'PlatformGroup' in constructor if it belongs
to a group.
(Platform.prototype.group): Return the platform group of current platform.
* public/v3/models/time-series.js: Added helper function to show view between a given time range.
(TimeSeries.prototype.viewBetweenTime):
* server-tests/api-manifest-tests.js: Updated unit test to also test platform group initialization.
* tools/js/database.js: Added prefix for 'platform_groups'.
* tools/js/v3-models.js: Added import for platform group.
2020-10-26 Dewei Zhu <dewei_zhu@apple.com>
Fix and update performance dashboard tests
https://bugs.webkit.org/show_bug.cgi?id=218222
Reviewed by Ryosuke Niwa.
* public/api/upload-root.php: Add a null check against empty array
when accessing invalid key which will show warning since php 7.4.
Per https://wiki.php.net/rfc/notice-for-non-valid-array-container.
* server-tests/tools-sync-buildbot-integration-tests.js:
Fixed a unit test that assumes build request IDs under one test group is
one after another. This assumption is wrong when 'StartServers' under
'mpm_prefork_module' is set more than one in apache config.
Fixed antoher incorrect unit test.
* unit-tests/analysis-results-notifier-tests.js:
Fixed unit tests which incorrectly used 'assert.throws' per
https://nodejs.org/docs/latest-v7.x/api/assert.html#assert_assert_throws_block_error_message.
2020-03-04 Zhifei Fang <zhifei_fang@apple.com>
Test-freshness page table heaer misplaced
Some platform name is too long
https://bugs.webkit.org/show_bug.cgi?id=208617
Reviewed by Ryosuke Niwa.
* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage.cssTemplate):
2019-12-15 Zhifei Fang <zhifei_fang@apple.com>
Add power metric to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=205227
Reviewed by Ryosuke Niwa.
* public/v3/models/metric.js:
(Metric):
2019-12-05 Dewei Zhu <dewei_zhu@apple.com>
Custom analysis task page should allow schedule any triggerable accepted tests.
https://bugs.webkit.org/show_bug.cgi?id=204925
Reviewed by Ryosuke Niwa.
Fix a bug that subtest will not show on custom analysis task page if both itself and parent test are
accepted by triggerable.
Order test list in alphabetical order.
* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests):
2019-10-28 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that cannot unhide a platform.
https://bugs.webkit.org/show_bug.cgi?id=203521
Reviewed by Ryosuke Niwa.
Before this change, the there is no value in POST when 'hidden' checkbox is unchecked.
Then the update will fail because platform_hidden cannot be NULL.
* public/admin/platforms.php: Adapted 'update_boolean_field'.
* public/admin/triggerables.php: Adapted 'update_boolean_field'.
* public/include/admin-header.php: Added 'update_boolean_field' helper function to set explict
boolean value for update.
2019-10-25 Dewei Zhu <dewei_zhu@apple.com>
Add SSL support for peformance dashboard database connection.
https://bugs.webkit.org/show_bug.cgi?id=203426
Reviewed by Ryosuke Niwa.
Performance dashboard should allow connecting Postgres database with SSL.
* public/include/db.php: Add SSL configuration to connection string if specified.
* tools/js/database.js: Add SSL configuration to connection string if specified.
(Database.prototype._prepareSSLConfig):
(Database.prototype.connect):
* unit-tests/checkconfig.js: Added unit tests for optional ssl fields.
2019-10-22 Dewei Zhu <dewei_zhu@apple.com>
Refactor "builds" table "build_number" row to "build_tag" to fit more generic use cases.
https://bugs.webkit.org/show_bug.cgi?id=203270
Reviewed by Ryosuke Niwa.
Rename "build_number" to "build_tag" to fit more generic use cases.
Add support to be backward compatible to accept reports contain either
"buildNumber" or "buildTag".
* browser-tests/index.html:
* init-database.sql:
* migrate-database.sql: Updated migration sql for this change.
* public/admin/test-configurations.php:
* public/api/measurement-set.php:
* public/api/runs.php:
* public/api/upload-root.php: Added support for both "buildNumber" and "buildTag".
* public/include/report-processor.php: Added support for both "buildNumber" and "buildTag".
* public/v3/models/builder.js:
(Builder.prototype.urlForBuild):
(Builder):
(Build):
(Build.prototype.buildTag):
(Build.prototype.label):
(Build.prototype.url):
(Build.prototype.buildNumber): Deleted.
* public/v3/models/measurement-adaptor.js:
(MeasurementAdaptor):
(MeasurementAdaptor.prototype.applyTo.return.build):
* public/v3/pages/chart-pane-status-view.js:
* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage.prototype._renderTooltip):
* server-tests/admin-platforms-tests.js:
(reportsForDifferentPlatforms):
* server-tests/admin-reprocess-report-tests.js:
* server-tests/api-commits-tests.js:
* server-tests/api-manifest-tests.js:
* server-tests/api-measurement-set-tests.js:
* server-tests/api-report-tests.js: Added unit tests for testing "buildNumber" and "buildTag".
(emptyReport):
(reportWitMismatchingCommitTime):
(reportWithOneSecondCommitTimeDifference):
(emptySlaveReport):
(makeReport):
(reportWithSameSubtestName):
* server-tests/api-upload-root-tests.js: Added unit tests for testing "buildNumber" and "buildTag".
* server-tests/privileged-api-add-build-requests-tests.js:
* server-tests/privileged-api-create-analysis-task-tests.js:
* server-tests/privileged-api-create-test-group-tests.js:
(createAnalysisTask):
* server-tests/privileged-api-upate-run-status.js:
* server-tests/privileged-api-update-test-group-tests.js:
(async.createAnalysisTask):
* server-tests/resources/mock-data.js:
(MockData.addMockConfiguration):
(MockData.sampleBuildData):
(MockData.finishedBuildData):
* server-tests/tools-sync-buildbot-integration-tests.js:
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.buildTag):
(BuildbotBuildEntry.prototype.url):
(BuildbotSyncer.prototype.urlForBuildTag):
(BuildbotBuildEntry.prototype.buildNumber): Deleted.
(BuildbotSyncer.prototype.urlForBuildNumber): Deleted.
* unit-tests/analysis-task-tests.js:
(measurementCluster):
* unit-tests/buildbot-syncer-tests.js:
* unit-tests/measurement-adaptor-tests.js:
* unit-tests/measurement-set-analyzer-tests.js:
* unit-tests/measurement-set-tests.js:
* unit-tests/resources/mock-v3-models.js:
2019-10-11 Dewei Zhu <dewei_zhu@apple.com>
Improve test freshness page interaction experience.
https://bugs.webkit.org/show_bug.cgi?id=202684
Reviewed by Ryosuke Niwa.
Change test freshness page show tooltip on click instead of popuping on mouse hover.
And clicking anywhere in 'page-with-heading' section except the tooltip can dismiss tooltip.
Add keyboard support to move focus around including 'Tab' key support.
Add support to use 'Enter' key to show or dismiss tooltip.
Add support to use 'Escape' key to dismiss tooltip.
* public/shared/common-component-base.js: Added support for link to specify 'tabindex'.
(CommonComponentBase.prototype.createLink):
(CommonComponentBase.createLink):
(CommonComponentBase):
* public/v3/components/base.js: Added support for customizing whether or not prevent default and stop propagation
while creating event handler.
(ComponentBase.prototype.createEventHandler):
(ComponentBase.createEventHandler):
(ComponentBase):
* public/v3/components/freshness-indicator.js:
(FreshnessIndicator): Removed 'url' property and removed customization for mouse event.
(FreshnessIndicator.prototype.update):
(FreshnessIndicator.prototype.didConstructShadowTree): Deleted.
* public/v3/pages/test-freshness-page.js:
(TestFreshnessPage): Changed to show tooltip on click and added key board event.
(TestFreshnessPage.prototype.didConstructShadowTree): Added key event support.
(TestFreshnessPage.prototype._findClosestIndicatorAnchorForCoordinate):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.prototype._constructTableCell): Added tabIndex for each cell that contains freshness indicator.
(TestFreshnessPage.prototype._configureAnchorForIndicator):
(TestFreshnessPage.prototype._clearIndicatorState): Changed the color of links in tooltip to a more readable color.
Added styles when anchor for status cell and links on tooltip are focused.
(TestFreshnessPage.cssTemplate):
2019-10-04 Zhifei Fang <zhifei_fang@apple.com>
[perf dashboard] Test fressness popover sometimes point to wrong place
https://bugs.webkit.org/show_bug.cgi?id=202606
Reviewed by Ryosuke Niwa.
* public/v3/pages/test-freshness-page.js: Use a invisable tooltip anchor to cacluate tooltip position. It also helps to get rid of caculation for determine the tooltip table position.
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.cssTemplate):
2019-10-04 Zhifei Fang <zhifei_fang@apple.com>
[perf dashboard] Make test fressness head and indicator perfect centered
https://bugs.webkit.org/show_bug.cgi?id=202602
Reviewed by Ryosuke Niwa.
* public/v3/components/freshness-indicator.js: make indicator margin auto, it will then horizontally centered in the container
(FreshnessIndicator.cssTemplate):
(FreshnessIndicator):
* public/v3/pages/test-freshness-page.js: make the table head transform based on the center left
(TestFreshnessPage.cssTemplate):
2019-10-02 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that warning icon causes infinite rendering when it has warning message.
https://bugs.webkit.org/show_bug.cgi?id=202502
Reviewed by Ryosuke Niwa.
Fix the problem that a warning icon with a warning message will result in infinite rendering.
* public/v3/components/button-base.js:
(ButtonBase):
(ButtonBase.prototype.setButtonTitle): Fixed a typo in function name and moved the title update to
render function.
(ButtonBase.prototype.render): Added the logic to render title.
* public/v3/components/test-group-revision-table.js: Set warning message by invoking setButtonTitle.
* public/v3/components/warning-icon.js: Removed the warning messge related code and leave the responsibility
to ButtonBase.
(WarningIcon):
(WarningIcon.prototype.render):
2019-07-30 Dewei Zhu <dewei_zhu@apple.com>
Provide build request status description information on dashboard.
https://bugs.webkit.org/show_bug.cgi?id=199810
Reviewed by Ryosuke Niwa.
Add build request status description to show detailed information for a build and show it in dashboard.
Update SQL for existing instance:
ALTER TABLE build_requests ADD COLUMN IF NOT EXISTS request_status_description varchar(1024) DEFAULT NULL;
* ReadMe.md: Updated instructions for initializing a database to include running 'migrate-database.sql'.
* init-database.sql: Added request_status_description column.
* migrate-database.sql: A file stores migration SQL for existing instance.
* public/api/build-requests.php: Added support for updating request_status_description.
* public/include/build-requests-fetcher.php: Exposed `statusDescription` to API.
* public/v3/components/test-group-revision-table.js: Added UI for showing build request status detail.
(TestGroupRevisionTable.prototype._renderTable):
(TestGroupRevisionTable.prototype._buildDescriptionCell):
(TestGroupRevisionTable.cssTemplate):
* public/v3/components/warning-icon.js: Extended warning icon to be able to customize information on hover.
(WarningIcon):
(WarningIcon.prototype.render):
* public/v3/components/button-base.js: Added a instance method to set button title.
(ButtonBase.prototype.setButtonTitle):
* public/v3/models/build-request.js: Added 'statusDescription' field.
(BuildRequest):
(BuildRequest.prototype.updateSingleton):
(BuildRequest.prototype.statusDescription):
* server-tests/api-build-requests-tests.js: Fixed unit tests.
* server-tests/resources/mock-data.js:
(MockData.set mockTestSyncConfigWithSingleBuilder): Added 'status_description' in buildbot mock data.
(MockData.sampleBuildData):
* server-tests/resources/test-server.js:
(TestServer.prototype.initDatabase): Added code to execute 'migrate-database.sql' on initialization.
* server-tests/tools-sync-buildbot-integration-tests.js: Added unit tests.
* tools/js/buildbot-syncer.js: Added 'statusDescription' field to 'BuildbotBuildEntry'.
(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.statusDescription):
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype._pullBuildbotOnAllSyncers):
* unit-tests/buildbot-syncer-tests.js: Added test code for BuildbotBuildEntry.statusDescription.
2019-07-26 Dewei Zhu <dewei_zhu@apple.com>
Dashboard should defaults to first dashboard page when summary page is not available.
https://bugs.webkit.org/show_bug.cgi?id=200180
Reviewed by Ryosuke Niwa.
Fix a bug that charts page will become the default when there is no summary page but there
is at least one dashboard page.
* public/v3/main.js: Charts page and analysis category page should not be considered as summay pages.
(main):
2019-07-30 Dewei Zhu <dewei_zhu@apple.com>
Analysis task page should show build request author and creation time.
https://bugs.webkit.org/show_bug.cgi?id=200274
Reviewed by Ryosuke Niwa.
Author and creation time of a build request should be visible in analysis task page.
* public/v3/pages/analysis-task-page.js: Added UI to show build request creation time and author.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
2019-07-29 Dewei Zhu <dewei_zhu@apple.com>
Should not render latest build information if there is no data points for a config.
https://bugs.webkit.org/show_bug.cgi?id=200250
Reviewed by Ryosuke Niwa.
Fix a bug test freshness page that tooltip cannot be rendered when a cell does not have
a data point.
* public/v3/pages/test-freshness-page.js: Added a null check on commit set before rendering
latest build informaiton.
(TestFreshnessPage.prototype._renderTooltip):
2019-07-25 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that cannot update builder password on builders administrative page.
https://bugs.webkit.org/show_bug.cgi?id=200154
Reviewed by Ryosuke Niwa.
'builders' administrative page should be able to update password for a builder.
* public/admin/builders.php: Should be able to update builder password.
2019-07-23 Dewei Zhu <dewei_zhu@apple.com>
Use 12 digits to show a git commit.
https://bugs.webkit.org/show_bug.cgi?id=200067
Reviewed by Ryosuke Niwa.
Use 12 digits to show a git commit to reasonably descrease commit prefix collision probability
for repository with large amount of commits.
* public/v3/models/commit-log.js: Increase digits from 8 to 12 for git SHA.
(CommitLog.prototype.label):
(CommitLog.prototype.diff):
* unit-tests/commit-log-tests.js: Updated unit tests.
* unit-tests/commit-set-tests.js: Updated unit tests.
2019-07-03 Dewei Zhu <dewei_zhu@apple.com>
Test freshness page should expose revision information for latest build on tooltip.
https://bugs.webkit.org/show_bug.cgi?id=199483
Reviewed by Ryosuke Niwa.
Added latest build revision information on test freshness page tooltip.
* public/v3/pages/test-freshness-page.js: Add build revision information on tooltip.
(TestFreshnessPage.prototype.didConstructShadowTree):
(TestFreshnessPage.prototype._fetchTestResults):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.cssTemplate):
2019-06-26 Dewei Zhu <dewei_zhu@apple.com>
commit api should not return 'AmbiguousRevisionPrefix' if there is an exact revision match
https://bugs.webkit.org/show_bug.cgi?id=199227
Reviewed by Ryosuke Niwa.
When prefix match is specified, api should check whether there is an exact match when multiple commits
match the prefix.
* public/include/commit-log-fetcher.php: Added the logic to check if there is an exact match when multiple matches are found.
* server-tests/api-commits-tests.js: Added an unit test.
2019-06-24 Dean Johnson <dean_johnson@apple.com>
[perf.webkit.org] Update summary page calculations to use mean instead of median
https://bugs.webkit.org/show_bug.cgi?id=199050
Reviewed by Dewei Zhu.
* public/v3/pages/summary-page.js:
(SummaryPageConfigurationGroup): Updated 'median' references to 'mean'.
(SummaryPageConfigurationGroup.set _startAndEndPointForTimeRange): Factored out logic for finding data
points in a timeSeries, within a specified timeRange.
(SummaryPageConfigurationGroup.set _meanForTimeRange): New. Returns the mean of a timeSeries across a
given timeRange.
2019-06-20 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug that 'test_metrics' and 'tests' tables are not joined correctly in CommitLogFetcher.fetch_latest_for_platform
https://bugs.webkit.org/show_bug.cgi?id=199062
Reviewed by Ryosuke Niwa.
'test_metrics' and 'tests' should be joined based on 'metric_test' and 'test_id'.
* public/include/commit-log-fetcher.php: Fix the typo in the query.
* server-tests/api-commits-tests.js: Added a unit test for this change.
2019-06-17 Dewei Zhu <dewei_zhu@apple.com>
Customizable test group form should allow user to supply a revision prefix of a commit and revision starts with 'r'.
https://bugs.webkit.org/show_bug.cgi?id=198940
Reviewed by Ryosuke Niwa.
Customizable test group form should adapt prefix matching when fetching for a commit.
* browser-tests/customizable-test-group-form-tests.js: Updated and added unit tests.
* public/v3/components/customizable-test-group-form.js: Removed loggings those a unintentionally committed.
* public/v3/models/commit-set.js: Adapted prefix matching API when fetching a commit.
(IntermediateCommitSet.prototype._fetchCommitLogAndOwnedCommits):
* unit-tests/commit-set-tests.js: Updated unit tests accordingly.
2019-06-13 Dewei Zhu <dewei_zhu@apple.com>
Custom analysis task configurator should allow supplying commit prefix and revision starts 'r'.
https://bugs.webkit.org/show_bug.cgi?id=198847
Reviewed by Ryosuke Niwa.
Custom analysis task configurator should not require full SHA to start an A/B test.
Custom analysis task configurator should accept svn revision starts with 'r'.
* browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for this change.
* public/api/commits.php: Extend this API to allow prefix matching when fethcing a single commit.
* public/include/commit-log-fetcher.php: Added a function to fetch a commit with prefix.
* public/v3/components/custom-analysis-task-configurator.js: Add UI support for accepting partial revision.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet):
(CustomAnalysisTaskConfigurator.prototype.async._resolveRevision):
(CustomAnalysisTaskConfigurator.prototype._buildTestabilityList):
* public/v3/models/commit-log.js:
(CommitLog.async.fetchForSingleRevision): Added third argument to specify prefix matching which defaults to false.
* server-tests/api-commits-tests.js: Added unit tests.
* unit-tests/commit-log-tests.js: Added a unit test.
2019-05-15 Dewei Zhu <dewei_zhu@apple.com>
Perf dashboard erroneously rejects a build request to build owned components when there are no patches.
https://bugs.webkit.org/show_bug.cgi?id=197928
Reviewed by Ryosuke Niwa.
Fix a bug that build type build request that only builds owned components failed to pass sanity check when there
is no repository accepts patch in triggerable repository group.
Add a sanity check to throw an error when build request type is build but there is no repository group template.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest): Changed sanity check the always requires repository accepts patch when there is a build to make it also works for build request only builds owned components.
(BuildbotSyncer._parseRepositoryGroup): Added check for repository group templates not null when build requiest type is build.
* unit-tests/buildbot-syncer-tests.js: Added unit tests for this change.
* unit-tests/resources/mock-v3-models.js: Added mock date for unit tests.
2019-05-14 Dewei Zhu <dewei_zhu@apple.com>
Pruning old file logic should not stop after removing 10 files if there are more files to be removed.
https://bugs.webkit.org/show_bug.cgi?id=197870
Reviewed by Ryosuke Niwa.
Pruning old file logic should keep removing removable files to make enough space for a new file upload.
It should only attempt to remve the files that have not been removed.
* public/include/uploaded-file-helpers.php: Modified 'prune_old_files' to allow to remove more than 10 files.
Fixed a bug that a removed file keep getting removed but never free up new space.
* server-tests/privileged-api-upload-file-tests.js:
(makeRandomAlnumStringForLength): Helper function to generate random content for a given length.
* server-tests/resources/test-server.js: Update total file size limit for this change.
(TestServer.prototype.testConfig):
2019-03-25 Dewei Zhu <dewei_zhu@apple.com>
Primary cluster of measurement set should always contain latest point.
https://bugs.webkit.org/show_bug.cgi?id=196243
Reviewed by Ryosuke Niwa.
Fix a bug in measurement-set api that primary cluster may not contain latest data point as
'carry_over' row may not be updated.
* public/api/measurement-set.php: Should always keep 'carry_over' data points up to date.
* server-tests/api-measurement-set-tests.js: Added an unit test for this change.
Fixed a typo.
2019-03-21 Dewei Zhu <dewei_zhu@apple.com>
'custom-configuration-test-group-form' should update test name when selected test or platform changes.
https://bugs.webkit.org/show_bug.cgi?id=196114
Reviewed by Ryosuke Niwa.
r240104 fixes commit sets unnecessarily get updated even there is no change.
However, this made changing test or platform no longer triggers 'commitSetChange' action.
Test name should change not only when 'commitSet' gets change, but also platform or test changes.
Renaming the action name from 'commitSetChange' to a more accurate description 'testConfigChange'.
Dispatch 'testConfigChange' when platform or test changes.
* browser-tests/custom-analysis-task-configurator-tests.js: Changed action name to 'commitSetChange'.
* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should dispatch 'commitSetChange' action.
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Changed action name to 'commitSetChange'.
* public/v3/components/custom-configuration-test-group-form.js: Added a unit test for this change.
(CustomConfigurationTestGroupForm.prototype.didConstructShadowTree):
2019-03-18 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug from r226303 that latest build time is not correctly calculated.
https://bugs.webkit.org/show_bug.cgi?id=195912
Reviewed by Ryosuke Niwa.
Time series is ordered by revision time which does not grantee the build time is
monotonically increasing.
* public/v3/pages/test-freshness-page.js: Use the latest build time instead of the build time of
last point on the chart.
2019-03-13 Dewei Zhu <dewei_zhu@apple.com>
Test freshness page should improve the ability to correlating issues from same builder.
https://bugs.webkit.org/show_bug.cgi?id=195242
Reviewed by Ryosuke Niwa.
Added the ability to highlight indicators with same builder when mouse is hovering over one indicator.
This is a very useful visualization for correlating issues specific to a builder.
Added tooltip with latest build link when hovering over an indicator.
* public/v3/components/freshness-indicator.js:
(FreshnessIndicator): Removed 'summary' field as it's no longer needed.
Added 'highlighted' field.
(FreshnessIndicator.prototype.update): Added 'highlighted' argument.
(FreshnessIndicator.prototype.didConstructShadowTree): Make indicator to dispatch mouse enter and leave
messages so that UI can highlight corresponding cells.
(FreshnessIndicator.prototype.render):
(FreshnessIndicator.cssTemplate):
* public/v3/pages/test-freshness-page.js: Added tooltip to show latest build time and build link.
Added logic to manually compute table body height.
(TestFreshnessPage):
(TestFreshnessPage.prototype.didConstructShadowTree):
(TestFreshnessPage.prototype._fetchTestResults):
(TestFreshnessPage.prototype.render):
(TestFreshnessPage.prototype._renderTooltip):
(TestFreshnessPage.prototype._constructTableCell):
(TestFreshnessPage.cssTemplate):
2019-02-26 Dewei Zhu <dewei_zhu@apple.com>
The table head of test freshness page should not scroll with the page.
https://bugs.webkit.org/show_bug.cgi?id=195092
Reviewed by Ryosuke Niwa.
Fix the location of the freshness table head to make it easier to corelate cell with test.
* public/v3/pages/test-freshness-page.js: Changed some style rules to make the table head fixed.
(TestFreshnessPage.prototype._renderTable):
(TestFreshnessPage.cssTemplate):
2019-01-17 Dewei Zhu <dewei_zhu@apple.com>
Analyzing a chart that does not exist should not halt whole run-analysis script.
https://bugs.webkit.org/show_bug.cgi?id=193563
Reviewed by Ryosuke Niwa.
Halting whole run-analysis script while there is any invalid chart specified in Manifest makes the script fragile.
Run-analysis is also responsible for adding retry and sending notification which should not be block by this error.
Skipping analyzing the corresponding configuration seems reasonable.
* public/v3/models/measurement-set.js:
(MeasurementSet.prototype._ensureClusterPromise): Only add callback when callback is specified.
This will help to fix 'UnhandledPromiseRejectionWarning' while running the test.
* tools/js/measurement-set-analyzer.js:
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Catch the exception while failing to fetch a measurement set and skip the analysis for this config.
* unit-tests/measurement-set-analyzer-tests.js: Added unit tests for this.
2019-01-17 Dewei Zhu <dewei_zhu@apple.com>
Updating commit in OSBuildFetcher should respect revision range in config.
https://bugs.webkit.org/show_bug.cgi?id=193558
Reviewed by Ryosuke Niwa.
OSBuildFetcher._fetchAvailableBuilds should filter out commits those are not in
revision range specified by cofnig.
* server-tests/tools-os-build-fetcher-tests.js: Added a unit test for this change.
* tools/js/os-build-fetcher.js:
(prototype.async._fetchAvailableBuilds): Filter out commits from update list if commit
revision is out of range.
2018-12-31 Dewei Zhu <dewei_zhu@apple.com>
Test group results notification should not say a build request to build had failed even when it had successfully completed.
https://bugs.webkit.org/show_bug.cgi?id=193064
Reviewed by Ryosuke Niwa.
Should show 'Build completed' or 'Build failed' for build type build requests.
* browser-tests/test-group-result-page-tests.js: Added a unit test to guard this bug.
* tools/js/test-group-result-page.js: Show 'Build completed' or 'Build failed' for build type build requests.
2018-12-21 Dewei Zhu <dewei_zhu@apple.com>
Add UI in analysis task page to show commit testability information.
https://bugs.webkit.org/show_bug.cgi?id=192972
Reviewed by Ryosuke Niwa.
Add UI in custom analysis task configuration and customizable test group form to show testability information.
Fix a bug in 'CustomAnalysisTaskConfigurator._updateCommitSetMap' that 'currentComparison' is incorrectly set.
SQL to update existing database:
ALTER TABLE commits ADD COLUMN IF NOT EXISTS commit_testability varchar(128) DEFAULT NULL;
* browser-tests/custom-analysis-task-configurator-tests.js: Added a unit test for the bug in
'CustomAnalysisTaskConfigurator._updateCommitSetMap'.
Added a unit test to make sure 'CustomAnalysisTaskConfigurator' still works when commit fetching never returns.
* browser-tests/index.html: Imported ''custom-analysis-task-configurator-tests.js'.
* init-database.sql: Increase 'commit_testability' field length from 64 characters to 128.
* public/v3/components/custom-analysis-task-configurator.js: Added UI to show testability information.
(CustomAnalysisTaskConfigurator):
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Should reset related field for corresponding
repositories that user does not specify revision.
(CustomAnalysisTaskConfigurator.prototype._updateMapFromSpecifiedRevisionsForConfiguration): A helper function
to update '_specifiedCommits' and '_invalidRevisionsByConfiguration' per '_specifiedRevisions'.
(CustomAnalysisTaskConfigurator.prototype.render):
(CustomAnalysisTaskConfigurator.prototype._updateCommitSetMap): Fixed a bug that 'currentComparison' is incorrectly set.
(CustomAnalysisTaskConfigurator.prototype._computeCommitSet):
(CustomAnalysisTaskConfigurator.prototype.async._fetchCommitsForConfiguration):
(CustomAnalysisTaskConfigurator.prototype.async._resolveRevision):
(CustomAnalysisTaskConfigurator.prototype._buildRevisionTable):
(CustomAnalysisTaskConfigurator.prototype._buildTestabilityList):
(CustomAnalysisTaskConfigurator.prototype._selectRepositoryGroup):
(CustomAnalysisTaskConfigurator.prototype._buildRevisionInput):
(CustomAnalysisTaskConfigurator.cssTemplate):
* public/v3/components/customizable-test-group-form.js: Added UI to show testability information.
(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
(CustomizableTestGroupForm.prototype._constructTestabilityRows.):
(CustomizableTestGroupForm.prototype._constructTestabilityRows):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
Changing either revision editor or radio button should trigger a re-render as testability
information for updated revision may change.
(CustomizableTestGroupForm.cssTemplate):
* public/v3/models/commit-set.js:
(IntermediateCommitSet.prototype.commitsWithTestability): Renamed from 'commitsWithTestabilityWarnings'.
(IntermediateCommitSet.prototype.commitsWithTestabilityWarnings): Deleted.
2018-12-14 Dewei Zhu <dewei_zhu@apple.com>
Extend commits table to contain testability information.
https://bugs.webkit.org/show_bug.cgi?id=191557
Reviewed by Ryosuke Niwa.
Added the ability to store testability message in commits table.
Refactored '/api/report-commits' to support updating commit only.
Updated os version syncing script to be able to update testability information.
* init-database.sql: Added 'commit_testability' field to 'commits' table.
* public/api/report-commits.php: Refactor this api to allow only update existing commits.
* public/include/commit-log-fetcher.php: Expose testability warning information in this API.
* public/include/commit-updater.php: Added 'CommitUpdater' to manage commit insert and update.
* public/v3/models/commit-log.js: CommitLog object should expose testability warning information.
(CommitLog.prototype.updateSingleton):
(CommitLog.prototype.testability):
* public/v3/models/commit-set.js: Added 'commitsWithTestability' and 'commits' to CommitSet and
IntermediateCommitSet instances.
(CommitSet.prototype.commitsWithTestability):
(CommitSet.prototype.commits):
(IntermediateCommitSet.prototype.commitsWithTestability):
(IntermediateCommitSet.prototype.commits):
* server-tests/api-report-commits-tests.js: Added unit tests for '/api/report-commits' when `insert=false`.
* server-tests/tools-os-build-fetcher-tests.js: Added and updated unit tests.
* tools/js/os-build-fetcher.js: Added the ability to update commit testability warnings.
(async.fetchReportAndUpdateCommits):
(prototype.async.fetchReportAndUpdateBuilds):
(prototype.async._fetchAvailableBuilds):
(prototype.async._commitsForAvailableBuilds):
(prototype._commitsWithinRange):
(prototype.async._reportCommits):
(fetchAndReportAllInOrder): Deleted.
(prototype.fetchAndReportNewBuilds): Deleted.
(prototype._fetchAvailableBuilds): Deleted.
(prototype._commitsForAvailableBuilds): Deleted.
(prototype._submitCommits): Deleted.
* tools/sync-os-versions.js:
* unit-tests/commit-log-tests.js: Added a unit test for 'testability'.
* unit-tests/commit-set-tests.js: Added unit tests for 'commitsWithTestability'.
2018-11-16 Ryosuke Niwa <rniwa@webkit.org>
Manifest file can contain a test metric which references a non-existent test
https://bugs.webkit.org/show_bug.cgi?id=191796
Reviewed by Dewei Zhu.
The bug was caused by a race condition between the manifest file fetching the list of tests and test metrics
and new tests and test metrics being added. Because we would fetch tests before test metrics, it was possible
for new test metrics which references a test not included in the fetched tests to be present in the test metrics.
Fixed the bug by changing the order of the queries so that test metrics are fetched before tests. This guarantees
that any test referenced by a test metric always exists and thefore included in the manifest file.
Unfortunately no new tests beucase this involes a race condition.
* public/include/manifest-generator.php:
2018-11-13 Dewei Zhu <dewei_zhu@apple.com>
Add cache for CommitLog objects to avoid refetching same commit.
https://bugs.webkit.org/show_bug.cgi?id=191621
Reviewed by Ryosuke Niwa.
Added a cache for fully fetched commit log objects to avoid refetching.
* public/v3/models/commit-log.js:
(CommitLog): Added assertion for id.
Removed unused 'remoteId' as it has been removed since r198479.
(CommitLog.async.fetchBetweenRevisions): Turned it into async function.
(CommitLog.async.fetchForSingleRevision): Added the logic to check cache before fetching.
(CommitLog._constructFromRawData): Added logic to add entries to cache.
* public/v3/models/repository.js: Added the ability to track fetched commit for certain repository.
(Repository.commitForRevision): Fixed measurement set not passing commit id while constructing a
commit log object.
(Repository.setCommitForRevision): Sets commit for a given revision.
* public/v3/models/commit-set.js: Fixed unit tests.
* unit-tests/commit-log-tests.js: Added unit tests for this change.
Fixed existing tests.
* unit-tests/commit-set-range-bisector-tests.js: Fixed unit tests.
* unit-tests/commit-set-tests.js: Fixed unit tests.
2018-11-08 Dewei Zhu <dewei_zhu@apple.com>
commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.
https://bugs.webkit.org/show_bug.cgi?id=191457
Reviewed by Dean Jackson and Ryosuke Niwa.
Commit time returned by '/api/measurement-set' sometimes is calculated by 'epoch from ..'.
This function may return a floating number with 5 or 6 decimal digits due to double precision limitations.
However, some commits may be reported with 6 decimal decimal.
So the commit time for those commits will sometime be rounded to 5 decimal digits.
In order to avoid front end assertion failure in CommitLog, Database::to_js_time need to round to 5 digits.
* public/include/db.php: Change the behavior to match that of postgres.
Added logic to avoid losing precision in php.
* server-tests/api-measurement-set-tests.js: Added unit tests for this bug.
(queryPlatformAndMetric): Fix a bug that arguments are not used at all.
2018-11-07 Dewei Zhu <dewei_zhu@apple.com>
"/api/report" does not check commit time correctly.
https://bugs.webkit.org/show_bug.cgi?id=191351
Reviewed by Ryosuke Niwa.
Test result report API does not convert formated time string to timestamp correctly
which result in not checking commit time correctly.
* public/include/report-processor.php: Use 'strtotime' instead of 'floatval'.
Accepts the time delta within 1 seconds.
* server-tests/api-report-tests.js: Added unit tests.
(reportWitMismatchingCommitTime):
(reportWithOneSecondCommitTimeDifference):
2018-11-06 Dewei Zhu <dewei_zhu@apple.com>
Custom test group form should use commit set map before customization as the behavior of radio buttons.
https://bugs.webkit.org/show_bug.cgi?id=191347
Reviewed by Ryosuke Niwa.
The radio button behavior should always set the same revision while editing the revision input.
That means we should not use the intermediate commit set map but use the commit set map before
"Customize" link is clicked.
* browser-tests/customizable-test-group-form-tests.js: Added a unit test for this bug.
* public/v3/components/customizable-test-group-form.js: Pass uncustomized commit set so that the radio button
behavoir preserves.
(CustomizableTestGroupForm):
(CustomizableTestGroupForm.prototype.setCommitSetMap):
(CustomizableTestGroupForm.prototype.didConstructShadowTree):
(CustomizableTestGroupForm.prototype.render):
(CustomizableTestGroupForm.prototype._renderCustomRevisionTable):
(CustomizableTestGroupForm.prototype._constructTableBodyList):
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner):
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
2018-11-06 Dewei Zhu <dewei_zhu@apple.com>
Customizable test group form should not reset manually edited commit value sometimes.
https://bugs.webkit.org/show_bug.cgi?id=190863
Reviewed by Ryosuke Niwa.
After changing the radio button and manually editing the commit value, commit value should not be reset
while changing the name of the test group.
Add the logic to prompt warning when manually typed commit does not exist.
* browser-tests/customizable-test-group-form-tests.js: Added a unit test for this bug.
* browser-tests/index.html:
* public/v3/components/customizable-test-group-form.js: Should always update commit set as long as
the repository of that row does not have a owner repository.
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithoutOwner):
(CustomizableTestGroupForm.prototype._constructTableRowForCommitsWithOwner):
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
2018-10-16 Dewei Zhu <dewei_zhu@apple.com>
Unreviewed, rolling out r236996.
Temporarily rollout to fix a manifest generation bug.
"lastModified" field for certain platform & metric configurations may be missing.
Reverted changeset:
"ManifestGenerator shouldn't need more than 1GB of memory or
run for 30 seconds"
https://bugs.webkit.org/show_bug.cgi?id=190393
https://trac.webkit.org/changeset/236996
2018-10-12 Ryosuke Niwa <rniwa@webkit.org>
Perf dashboard: add a test for aggregating subtests without a matching metric in /api/report
https://bugs.webkit.org/show_bug.cgi?id=190544
Rubber-stamped by Keith Miller and unofficially reviewed by Dewei Zhu.
Added tests for reporting results to /api/report where a test with aggregated metrics has a subtest
without a matching metric type. The aggregation should simply skip such a subtest instead of returning
an error or aggregating with a mismatching metric type.
* server-tests/api-report-tests.js:
(.makeReport): Extracted out of a test case.
2018-10-11 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r236956. Use array_get to avoid warnings.
* public/include/report-processor.php:
2018-10-09 Dewei Zhu <dewei_zhu@apple.com>
Performance dashboard should show added iterations due failed build requests.
https://bugs.webkit.org/show_bug.cgi?id=190419
Reviewed by Ryosuke Niwa.
Added UI to show added build requests due to previous failed build requests.
Updated the retry/bisect button to default to initial repetition count when test group is created.
* public/v3/pages/analysis-task-page.js: Added a div to show added build requests.
Retry and bisect button should default to initial repetion count.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup):
(AnalysisTaskTestGroupPane.cssTemplate):
2018-10-09 Ryosuke Niwa <rniwa@webkit.org>
ManifestGenerator shouldn't need more than 1GB of memory or run for 30 seconds
https://bugs.webkit.org/show_bug.cgi?id=190393
Reviewed by Antti Koivisto and unofficially reviewed by Dewei Zhu.
This patch reduces the runtime of /api/manifest from 13s to 7s and reduces the memory requirement from
1GB to 400MB for the internal dashboard in my local testing.
The biggest perf win comes from avoid running a complex query over test_configurations to compute
the latest modified date across different test configuration types ("current" vs. "baseline").
Instead, we now fetch the entire table row by row and compute the latest modified date in memory.
Also call intval in many more places to avoid generating double quotes, which is a pretty significant
proportion of the JSON file size at this point.
Finally, use references in more places to avoid deep copying of arrays.
* public/include/manifest-generator.php:
(ManifestGenerator::generate): Skip the generation of "dashboard" since it's only used by v1 UI.
(ManifestGenerator::tests): Don't copy each row.
(ManifestGenerator::metrics): Ditto.
(ManifestGenerator::platforms): Implement the aforementioned optimization. Instead of grouping
test configurations for a given metric and platform together, fetch them all and do in-memory
processing in PHP. Avoid more copying as well.
(ManifestGenerator::repositories): Avoid more copying.
(ManifestGenerator::bug_trackers): Ditto.
(ManifestGenerator::fetch_triggerables): Ditto.
2018-10-08 Ryosuke Niwa <rniwa@webkit.org>
/api/report takes 15+ minutes submitting some test results
https://bugs.webkit.org/show_bug.cgi?id=190382
Rubber-stamped by Alexey Proskuryakov and unofficially reviewed by Dewei Zhu.
The issue was that recursively_ensure_tests would issue thousands of dependent queries.
Since most reporting of results would be happening after all the tests and test metrics had been created,
simply fetch the list of all tests and test metrics upfront in memory.
This would slow-down the reporting of other test results but in practice doesn't matter (an extra few seconds
of overhead) but for slow reporting, it can significantly reduce the runtime from ~10 minutes to ~10 seconds.
* public/include/report-processor.php:
(ReportProcessor::process): Call fetch_tests before recursively_ensure_tests.
(ReportProcessor::fetch_tests): Added. This builds up a mapping of tests based on a parent test ID as well as
a mapping of metrics per test based on its name and then its aggregator's name.
(ReportProcessor::recursively_ensure_tests): Added. Use the in-memory maps built in fetch_tests when possible.
(ReportProcessor::aggregator_list_if_exists): Take a reference instead of passing it by value.
(TestRunsGenerator::add_aggregated_metric): Now takes metric ID. The code to add the test metric had been moved
to recursively_ensure_tests.
2018-10-01 Dewei Zhu <dewei_zhu@apple.com>
Add retry for test groups with failed build requests.
https://bugs.webkit.org/show_bug.cgi?id=190188
Reviewed by Ryosuke Niwa.
Added retry logic in run-analysis script.
Current retry logic will only be triggered when there is at least one successful build request for each commit set
in a test group.
* init-database.sql: Added 'testgroup_initial_repetition_count' and 'testgroup_may_need_more_requests'.
SQL to update existing database:
'''
BEGIN;
ALTER TABLE analysis_test_groups
ADD COLUMN testgroup_initial_repetition_count integer DEFAULT NULL,
ADD COLUMN testgroup_may_need_more_requests boolean DEFAULT FALSE;
UPDATE analysis_test_groups SET testgroup_initial_repetition_count = (
SELECT DISTINCT(COUNT(*)) FROM build_requests WHERE request_group = testgroup_id AND request_order >= 0 GROUP BY request_commit_set
);
ALTER TABLE analysis_test_groups ALTER COLUMN testgroup_initial_repetition_count DROP DEFAULT, ALTER COLUMN testgroup_may_need_more_requests SET NOT NULL;
END;
'''
'testgroup_initial_repetition_count' represents the number of successful build request for each commit set when
test group is created.
'testgroup_may_need_more_requests' will be set when any build request in test group is set to 'failed'.
* public/api/build-requests.php: Added the logic to set 'testgroup_may_need_more_requests'.
* public/api/test-groups.php: Updated 'ready-for-notification' to 'ready-for-further-processing' so that it returns finished test
groups those either have 'needs_notification' or 'may_need_more_requests' set.
* public/include/commit-sets-helpers.php: Set 'initial_repetition_count' to repetition count.
* public/privileged-api/update-test-group.php: Added APIs to add build request for a test group and
update 'may_need_more_requests' flag.
* public/v3/models/test-group.js:
(TestGroup): Added '_mayNeedMoreRequests' and '_initialRepetitionCount' field.
Refactored code that interacts with '/api/update-test-group'.
(TestGroup.prototype.updateSingleton):
(TestGroup.prototype.mayNeedMoreRequests):
(TestGroup.prototype.initialRepetitionCount):
(TestGroup.prototype.async._updateBuildRequest):
(TestGroup.prototype.updateName):
(TestGroup.prototype.updateHiddenFlag):
(TestGroup.prototype.async.didSendNotification):
(TestGroup.prototype.async.addMoreBuildRequests):
(TestGroup.prototype.async.clearMayNeedMoreBuildRequests): Added API to clear 'may_need_more_requests' flag.
(TestGroup.fetchAllReadyForFurtherProcessing): Refactored 'TestGroup.fetchAllWithNotificationReady' to return test groups either
have 'needs_notification' or 'may_need_more_requests' set.
(TestGroup.fetchAllThatMayNeedMoreRequests): Fetches test groups those may need more build requests.
* server-tests/api-test-groups.js: Added unit tests.
* server-tests/privileged-api-add-build-requests-tests.js: Added unit tests for 'add-build-requests' API.
* server-tests/privileged-api-update-test-group-tests.js: Added unit tests.
* server-tests/resources/mock-data.js:
(MockData.addMockData):
* server-tests/resources/test-server.js:
(TestServer.prototype._determinePgsqlDirectory): Fixed a bug that 'childProcess.execFileSync' may return a buffer.
* tools/run-analysis.js: Added logic to add extra build request before sennding notification.
* tools/js/retry-failed-build-requests.js:
(async.createAdditionalBuildRequestsForTestGroupsWithFailedRequests): Module that add extra build requests.
* unit-tests/retry-failed-build-requests-tests.js: Added.
* unit-tests/test-groups-tests.js: Added unit tests.
2018-09-21 Dewei Zhu <dewei_zhu@apple.com>
Apache can return a corrupt manifest file while ManifestGenerator::store is running
https://bugs.webkit.org/show_bug.cgi?id=189822
Reviewed by Ryosuke Niwa.
Updating a file on performance dashboard should be transactional between php and apache.
Otherwise, partial content may be served.
* public/api/measurement-set.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
* public/api/runs.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
* public/include/db.php: Make creating file transactionaly by taking advantage of
'move/rename' operation is atomic in OS.
Added logic to avoid overwriting file if all content except specified filed are identical.
* public/include/json-header.php: Added a helper function that added 'status' but does not
convert content to json.
* public/include/manifest-generator.php: Adapted invocation of 'generate_json_date_with_elapsed_time_if_needed'.
* public/shared/statistics.js: Removed unnecessary logging.
(Statistics.new.sampleMeanAndVarianceFromMultipleSamples):
* server-tests/api-manifest-tests.js: Updated one unit test.
2018-08-22 Dewei Zhu <dewei_zhu@apple.com>
Show t-test results based on individual measurements to analysis task page.
https://bugs.webkit.org/show_bug.cgi?id=188425
Reviewed by Ryosuke Niwa.
Added comparison for individual iterations in analysis task page.
Added comparison for individual iterations for notification on A/B tests completion.
Refactored t-distribution inverse lookup to any degree of freedom with 5 significant figures.
* public/shared/statistics.js: Refactored t-distribution inverse lookup function and adapted this
change to all invocations.
(Statistics.new.this.supportedConfidenceIntervalProbabilities):
(Statistics.new.this.supportedOneSideTTestProbabilities):
(Statistics.new.this.confidenceIntervalDelta):
(Statistics.new.sampleMeanAndVarianceForMultipleSamples):
(Statistics.new.this.probabilityRangeForWelchsT):
(Statistics.new.this.probabilityRangeForWelchsTFromTwoSampleSets):
(Statistics.new.this._determinetwoSidedProbabilityBoundaryForWelchsT):
(Statistics.new.this.computeWelchsT):
(Statistics.new.this._computeWelchsTFromStatistics):
(Statistics.new.this.minimumTForOneSidedProbability): Function that does t-distribution inverse lookup.
* public/v3/components/analysis-results-viewer.js: Adapted TestGroup.compareTestResults change.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._measurementsForCommitSet):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._valuesForCommitSet): Deleted.
* public/v3/components/test-group-results-viewer.js: Show both comparisions for both individual and mean.
(TestGroupResultsViewer.prototype._renderResultsTable):
(TestGroupResultsViewer.prototype._buildRowForMetric.):
(TestGroupResultsViewer.prototype._buildValueMap):
* public/v3/models/test-group.js:
(TestGroup.compareTestResults): Added comparison for individual iterations.
* tools/js/test-group-result-page.js:
(TestGroupResultPage.prototype._constructTableForMetric):
(TestGroupResultPage.prototype.get styleTemplate):
(TestGroupResultPage):
(TestGroupResultPage.prototype._URLForAnalysisTask): Renamed to '_resultsForTestGroup'
* unit-tests/statistics-tests.js: Updated and added unit tests.
2018-07-13 Dewei Zhu <dewei_zhu@apple.com>
CustomConfigurationTestGroupForm should dispatch different arguments based on whether analysis task is created.
https://bugs.webkit.org/show_bug.cgi?id=187675
Reviewed by Ryosuke Niwa.
This change will fix the bug that no notification will be sent for any test groups except the
first one in any custom perf-try A/B task.
* public/v3/components/custom-configuration-test-group-form.js:
(CustomConfigurationTestGroupForm.prototype.startTesting): Conditionally includes taskName based on
whether or not analysis task is created.
2018-07-03 Dewei Zhu <dewei_zhu@apple.com>
MeasurementSet should merge last four segments into two if values are identical.
https://bugs.webkit.org/show_bug.cgi?id=187311
Reviewed by Ryosuke Niwa.
If last four segments has the same value, MeasurmentSet should merge them.
* public/v3/models/measurement-set.js: Added the logic to conditionally merge last segments.
(MeasurementSet.prototype.fetchSegmentation):
* unit-tests/measurement-set-tests.js: Added a unit test for this change.
2018-06-29 Dewei Zhu <dewei_zhu@apple.com>
Manifest.reset should clear static map for BugTracker and Bug objects.
https://bugs.webkit.org/show_bug.cgi?id=187186
Reviewed by Ryosuke Niwa.
If static maps of BugTracker and Bug objects are not cleared up, updating singleton
of Bug object will fail assertion.
* public/v3/models/manifest.js: Clear static map for BugTracker and Bug.
(Manifest.reset):
* server-tests/api-manifest-tests.js: Added a unit test for this change.
2018-06-29 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug in range bisector that start commit may be counted twice.
https://bugs.webkit.org/show_bug.cgi?id=187205
Reviewed by Darin Adler.
Range bisector counted start commit twice if start commit is the same as end commit.
* public/v3/commit-set-range-bisector.js:
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
* unit-tests/commit-set-range-bisector-tests.js: Added a unit test for this change.
2018-06-28 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug ComponentBase that wrong content template may be used.
https://bugs.webkit.org/show_bug.cgi?id=187159
Reviewed by Ryosuke Niwa.
ComponentBase uses '_parsed' to mark whether content and style templates of a class
is parsed. However, derived class parsing will be skipped as 'Derive._parsed' is available
via prototype chain whenever the base class is parsed.
* browser-tests/component-base-tests.js: Added unit tests.
* public/v3/components/base.js: Added 'hasOwnProperty' to make sure current class is parsed.
(ComponentBase.prototype._ensureShadowTree):
2018-06-25 Dewei Zhu <dewei_zhu@apple.com>
MeasurementSetAnalyzer should check triggerable availability before creating confirming A/B tests.
https://bugs.webkit.org/show_bug.cgi?id=187028
Reviewed by Ryosuke Niwa.
If the triggerable is not available, MeasurmentSetAnalyzer should only create analysis task without
confirming A/B tests.
* tools/js/measurement-set-analyzer.js: Added logic to check triggerable availability.
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
(MeasurementSetAnalyzer):
* unit-tests/measurement-set-analyzer-tests.js: Updated unit tests and added a new unit test for this change.
2018-06-11 Dewei Zhu <dewei_zhu@apple.com>
Extend test group rule to support 'userInitiated' field.
https://bugs.webkit.org/show_bug.cgi?id=186544
Reviewed by Ryosuke Niwa.
Added support for rule specifying whether or not test group is user initiated.
* tools/js/analysis-results-notifier.js: Rule now support 'userInitiated' field.
(AnalysisResultsNotifier.prototype.async.sendNotificationsForTestGroups):
(AnalysisResultsNotifier.prototype._applyRules):
(AnalysisResultsNotifier._matchesRule):
* unit-tests/analysis-results-notifier-tests.js: Added unit tests for this change.
2018-05-29 Dewei Zhu <dewei_zhu@apple.com>
CommitSet range bisector should use commits occur in commit sets which specify the range as valid commits for commits without ordering.
https://bugs.webkit.org/show_bug.cgi?id=186062
Reviewed by Ryosuke Niwa.
For commits without ordering, we should use the commits occurs in the commit sets which specify the range as valid commits.
Commit sets in range should only contain those valid commits for corresponding repositories.
* public/v3/commit-set-range-bisector.js: Updated logic to add check on commits without ordering.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
* unit-tests/commit-set-range-bisector-tests.js: Added a unit test for this case.
2018-06-07 Dewei Zhu <dewei_zhu@apple.com>
Related task may not have a metric or platform.
https://bugs.webkit.org/show_bug.cgi?id=186426
Reviewed by Ryosuke Niwa.
Related task in the related task list can be a custom analysis task which
may not have platform or metric.
* public/v3/pages/analysis-task-page.js: Added null checks for platform and metric.
(AnalysisTaskPage.prototype._renderRelatedTasks):
2018-06-07 Dewei Zhu <dewei_zhu@apple.com>
Fix browser test failed assertions and a bug in 'common-component-base'
https://bugs.webkit.org/show_bug.cgi?id=186423
Reviewed by Ryosuke Niwa.
Fixed serveral assertion failures in browser tests.
Fixed a bug in common-component-base that null/undefined as attribute value is not allowed.
* browser-tests/chart-revision-range-tests.js: Should not import 'lazily-evaluated-function.js' twice.
* browser-tests/chart-status-evaluator-tests.js: Should not import 'lazily-evaluated-function.js' twice.
* browser-tests/component-base-tests.js: Added a unit test for element attributes being null or undefined.
* browser-tests/index.html: Make mocked data from makeSampleCluster also contains commit_order.
* public/shared/common-component-base.js: Make it allow to take null as attribute value.
(CommonComponentBase.createElement):
2018-05-24 Dewei Zhu <dewei_zhu@apple.com>
Added sending notification feature when test group finishes.
https://bugs.webkit.org/show_bug.cgi?id=184340
Reviewed by Ryosuke Niwa.
Added 'testgroup_needs_notification' filed to 'analysis_test_group' table to indicate whether a test group
has a pending notification.
Added 'testgroup_notification_sent_at' to record the last notification sent time.
SQL queries to update existing database are:
'ALTER TABLE analysis_test_groups ADD COLUMN testgroup_needs_notification boolean NOT NULL DEFAULT FALSE;'
'ALTER TABLE analysis_test_groups ADD COLUMN testgroup_notification_sent_at timestamp DEFAULT NULL;'
Updated 'run-analysis' script to be able to send notification when test group finishes.
Added 'Notify on completion' checkbox while creating/retrying/bisecting a test group.
* browser-tests/test-group-form-tests.js: Updated existing tests and added a new test.
* browser-tests/test-group-result-page-tests.js: Added unit tests for TestGroupResultPage.
* init-database.sql: Added 'testgroup_needs_notification' filed to 'analysis_test_group' table.
* public/api/test-groups.php: Added '/api/test-groups/ready-for-notification' API to 'test-group' to show all
test groups that need to send notification. Only the ones with 'completed', 'failed' or 'cancelled' status and its
'testgroup_needs_notification' is true will be returned by this API.
* public/include/build-requests-fetcher.php: Added 'fetch_requests_for_groups' to return test groups with given ids.
* public/include/commit-sets-helpers.php: Updated the logic to support setting 'testgroup_needs_notification'
while create an analysis_test_groups.
* public/privileged-api/create-analysis-task.php: Updated the logic to support setting 'testgroup_needs_notification'.
* public/privileged-api/create-test-group.php: Updated the logic to support setting 'testgroup_needs_notification'.
* public/privileged-api/update-test-group.php: Updated the logic to support updating 'testgroup_needs_notification'.
Extended this API to allow authentication both from CSRF token and slave.
* public/v3/components/custom-configuration-test-group-form.js:
(CustomConfigurationTestGroupForm.prototype.startTesting): Pass 'notifyOnCompletion' information which represents
'testgroup_needs_notification' from API perspective.
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype.startTesting): Pass 'notifyOnCompletion' information which represents
'testgroup_needs_notification' from API perspective.
(CustomizableTestGroupForm.cssTemplate): Added space between 'Notify on completion' checkbox and test group iteration selection list.
* public/v3/components/test-group-form.js:
(TestGroupForm): Added '_notifyOnCompletion' instance variable.
(TestGroupForm.prototype.didConstructShadowTree): Added 'onchange' event for notify on completion checkbox.
(TestGroupForm.prototype.startTesting): Pass 'notifyOnCompletion' information which represents
'testgroup_needs_notification' from API perspective.
(TestGroupForm.cssTemplate): Added space between 'Notify on completion' checkbox and test group iteration selection list.
* public/v3/models/analysis-results.js: Export 'AnalysisResults'.
(AnalysisResults.fetch): Update API path to use absolute url.
(AnalysisResults):
* public/v3/models/analysis-task.js:
(AnalysisTask.async.create): Extend this function to take notifyOnCompletion as argument which will be used as
'needsNotification' to send to server.
(AnalysisTask):
* public/v3/models/test-group.js:
(TestGroup): Added '_needsNotification' field.
(TestGroup.prototype.updateSingleton): Added logic to update '_needsNotification' field.
(TestGroup.prototype.needsNotification): Returns '_needsNotification' field.
(TestGroup.prototype.author): Returns author information.
(TestGroup.prototype.async.didSendNotification): API that updates 'testgroup_needs_notification' to true.
(TestGroup.prototype.async.fetchTask): API to fetch the task when it has not been fetched.
(TestGroup.createWithTask): Updated this function to accept 'notifyOnCompletion' which will be used as
'needsNotification' to send to server.
(TestGroup.createWithCustomConfiguration): Updated this function to accept 'notifyOnCompletion' which will be used as
'needsNotification' to send to server.
(TestGroup.createAndRefetchTestGroups): Updated this function to accept 'notifyOnCompletion' which will be used as
'needsNotification' to send to server.
(TestGroup.fetchAllWithNotificationReady): New function that invokes '/api/test-groups/ready-for-notification'.
* public/v3/pages/analysis-task-page.js: Update logic to 'notifyOnCompletion' around
(AnalysisTaskChartPane.prototype.didConstructShadowTree):
(AnalysisTaskResultsPane.prototype.didConstructShadowTree):
(AnalysisTaskTestGroupPane.prototype.didConstructShadowTree):
(AnalysisTaskPage.prototype.didConstructShadowTree):
(AnalysisTaskPage.prototype._retryCurrentTestGroup):
(AnalysisTaskPage.prototype.async._bisectCurrentTestGroup):
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList.set const):
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList):
(AnalysisTaskPage.prototype._createCustomTestGroup):
* public/v3/pages/chart-pane.js: Added 'Notify on completion' checkbox.
(ChartPane.prototype.didConstructShadowTree):
(ChartPane.prototype.async._analyzeRange):
* public/v3/pages/create-analysis-task-page.js: Adapted API change.
(CreateAnalysisTaskPage.prototype._createAnalysisTaskWithGroup):
* server-tests/api-test-groups.js: Added tests for '/api/test-groups/ready-for-notification'.
* server-tests/privileged-api-create-analysis-task-tests.js: Updated tests to adapt this change.
Added new tests.
* server-tests/privileged-api-create-test-group-tests.js: Added new tests.
* server-tests/privileged-api-update-test-group-tests.js: Added unit test for 'update-test-group' API.
* server-tests/resources/mock-data.js: addMockData should set 'testgroup_needs_notification' to be true.
* server-tests/tools-sync-buildbot-integration-tests.js: Updated tests to adapt this change.
(async.createTestGroupWihPatch):
(createTestGroupWihOwnedCommit):
* tools/js/analysis-results-notifier.js: Added notifier to send notification for completed test groups.
(AnalysisResultsNotifier):
(AnalysisResultsNotifier.prototype.async.sendNotificationsForTestGroups):
(AnalysisResultsNotifier.prototype._sendNotification): Invoke remote API to send notification.
(AnalysisResultsNotifier.prototype._constructMessageByRules):
(AnalysisResultsNotifier._matchesRule):
(AnalysisResultsNotifier._applyUpdate):
(AnalysisResultsNotifier.async._messageForTestGroup): Build html as message body for a test group.
(AnalysisResultsNotifier._URLForAnalysisTask): Returns URL for an analysis task.
(AnalysisResultsNotifier._instantiateNotificationTemplate):
* tools/js/test-group-result-page.js: Added 'TestGroupResultPage' and 'BarGraph' to show test group result.
(TestGroupResultPage):
(TestGroupResultPage.prototype.async.setTestGroup):
(TestGroupResultPage._urlForAnalysisTask):
(TestGroupResultPage.prototype._URLForAnalysisTask):
(TestGroupResultPage.prototype.constructTables):
(TestGroupResultPage.prototype._constructTableForMetric):
(TestGroupResultPage.):
(TestGroupResultPage.prototype.get pageContent):
(TestGroupResultPage.prototype.get styleTemplate):
(BarGraph):
(BarGraph.prototype.setWidth):
(BarGraph.prototype._constructBarGraph):
(BarGraph.prototype.get pageContent):
(BarGraph.prototype.get styleTemplate):
* tools/js/measurement-set-analyzer.js: Adapted 'AnalysisTask.create' change.
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
(MeasurementSetAnalyzer):
* tools/js/v3-models.js:
* tools/run-analysis.js: Added the logic that sends notification for completed test groups.
(main):
(async.analysisLoop):
* unit-tests/analysis-task-tests.js:
* unit-tests/analysis-results-notifier-tests.js: Added a unit test for 'AnalysisResultsNotifier' and 'NotificationService'.
* unit-tests/measurement-set-analyzer-tests.js: Updated unit tests per this change.
* unit-tests/test-groups-tests.js: Added unit tests for 'TestGroup.needsNotification'.
* unit-tests/resources/mock-remote-api.js: Only set 'privilegedAPI' when it exits.
2018-06-07 Ryosuke Niwa <rniwa@webkit.org>
Add the basic support for writing components in node.js
https://bugs.webkit.org/show_bug.cgi?id=186299
Reviewed by Antti Koivisto.
Add the basic support for writing components in node.js for generating rich email notifications.
To do this, this patch introduces MarkupComponentBase and MarkupPage which implement similar API
to ComponentBase and Page classes of v3 UI code. This enables us to share code between frontend
and the backend in the future. Because there is no support for declarative custom elements or
shadow root in HTML, MarkupComponentBase uses a similar but distinct concept of "content" tree
to represent the "DOM" tree for a component. When generating the HTML, MarkupComponentBase and
MarkupPage collectively transforms stylesheets and flattens the tree into a single HTML. In order
to keep this flatteneing logic simple, MarkupComponentBase only supports a very small subset of
CSS selectors to select elements by their local names and class names.
Specifically, each class name and element name based selectors are replaced by a globally unique
class name based selector, and each element which matches the selector is applied of the same
globally unique class name. The transformation is applied when constructing the "content" tree
as well as calls to renderReplace.
Because much of v3 frontend code relies on DOM API, this patch also implements the simplest form
of a fake DOM API as MarkupNode, MarkupParentNode, MarkupElement, and MarkupText. In order to avoid
reimplementing HTML & CSS parsers, this patch introduces the concept of content and style templates
to ComponentBase which are JSON alternatives to HTML & CSS template strings which can be used in
both frontend & backend.
* browser-tests/close-button-tests.js: Include CommonComponentBase.
* browser-tests/commit-log-viewer-tests.js: Ditto.
* browser-tests/component-base-tests.js: Ditto. Added a test cases for content & style templates.
(async.importComponentBase): Added.
* browser-tests/editable-text-tests.js: Include CommonComponentBase.
* browser-tests/index.html:
* browser-tests/markup-page-tests.js: Added.
* browser-tests/page-router-tests.js: Include CommonComponentBase.
* browser-tests/page-tests.js: Ditto.
* browser-tests/test-group-form-tests.js: Ditto.
* public/shared/common-component-base.js: Added.
(CommonComponentBase): Extracted out of ComponentBase.
(CommonComponentBase.prototype.renderReplace): Added.
(CommonComponentBase.renderReplace): Moved from ComponentBase.
(CommonComponentBase.prototype._recursivelyUpgradeUnknownElements): Moved and renamed from
ComponentBase's _recursivelyReplaceUnknownElementsByComponents.
(CommonComponentBase.prototype._upgradeUnknownElement): Extracted out of the same function.
(CommonComponentBase._constructStylesheetFromTemplate): Added.
(CommonComponentBase._constructNodeTreeFromTemplate): Added.
(CommonComponentBase.prototype.createElement): Added.
(CommonComponentBase.createElement): Moved from ComponentBase.
(CommonComponentBase._addContentToElement): Moved from ComponentBase.
(CommonComponentBase.prototype.createLink): Added.
(CommonComponentBase.createLink): Moved from ComponentBase.
(CommonComponentBase._context): Added. Set to document in a browser and MarkupDocument in node.js.
(CommonComponentBase._isNode): Added. Set to a function which does instanceof Node/MarkupNode check.
(CommonComponentBase._baseClass): Added. Set to ComponentBase or MarkupComponentBase.
* public/v3/components/base.js:
(ComponentBase):
(ComponentBase.prototype._ensureShadowTree): Added the support for the content and style templates.
Also avoid parsing the html template each time a component is instantiated by caching the result.
* public/v3/index.html:
* tools/js/markup-component.js: Added.
(MarkupDocument): Added. A fake Document.
(MarkupDocument.prototype.createContentRoot): A substitude for attachShadow.
(MarkupDocument.prototype.createElement):
(MarkupDocument.prototype.createTextNode):
(MarkupDocument.prototype._idForClone):
(MarkupDocument.prototype.reset):
(MarkupDocument.prototype.markup):
(MarkupDocument.prototype.escapeAttributeValue):
(MarkupDocument.prototype.escapeNodeData):
(MarkupNode): Added. A fake Node. Each node gets an unique ID.
(MarkupNode.prototype._markup):
(MarkupNode.prototype.clone): Implemented by the leave class.
(MarkupNode.prototype._cloneNodeData):
(MarkupNode.prototype.remove):
(MarkupParentNode): Added. An equivalent of ContainerNode in WebCore.
(MarkupParentNode.prototype.get childNodes):
(MarkupParentNode.prototype._cloneNodeData):
(MarkupParentNode.prototype.appendChild):
(MarkupParentNode.prototype.removeChild):
(MarkupParentNode.prototype.removeAllChildren):
(MarkupParentNode.prototype.replaceChild):
(MarkupContentRoot): Added. Used like a shadow tree.
(MarkupContentRoot.prototype._markup): Added.
(MarkupElement): Added. A fake Element. It also implements a subset of IDL attributes implemented by
subclasses such as HTMLInputElement for simplicity.
(MarkupElement.prototype.get id): Added.
(MarkupElement.prototype.get localName): Added.
(MarkupElement.prototype.clone): Added.
(MarkupElement.prototype.appendChild): Added.
(MarkupElement.prototype.addEventListener): Added.
(MarkupElement.prototype.setAttribute): Added.
(MarkupElement.prototype.getAttribute): Added.
(MarkupElement.prototype.get attributes): Added.
(MarkupElement.prototype.get textContent): Added.
(MarkupElement.prototype.set textContent): Added.
(MarkupElement.prototype._serializeStyle): Added.
(MarkupElement.prototype._markup): Added. Flattens the tree with content tree like copy & paste so
this can't be used to implement innerHTML.
(MarkupElement.prototype.get value): Added.
(MarkupElement.prototype.set value): Added.
(MarkupElement.prototype.get style): Added. Returns a fake writeonly CSSStyleDeclaration.
(MarkupElement.prototype.set style): Added.
(MarkupElement.get selfClosingNames): Added. A small list of self-closing tags for the HTML generation.
(MarkupText): Added.
(MarkupText.prototype.clone): Added.
(MarkupText.prototype._markup): Added.
(MarkupText.prototype.get data): Added.
(MarkupText.prototype.set data): Added.
(MarkupComponentBase): Added.
(MarkupComponentBase.prototype.element): Added. Like ComponentBase's element.
(MarkupComponentBase.prototype.content): Added. Like ComponentBase's content.
(MarkupComponentBase.prototype._findElementRecursivelyById): Added. A fake getElementById.
(MarkupComponentBase.prototype.render): Added. Like ComponentBase's render.
(MarkupComponentBase.prototype.runRenderLoop): Added. In ComponentBase, we use requestAnimationFrame.
In MarkupComponentBase, we keep rendering until the queue drains empty.
(MarkupComponentBase.prototype.renderReplace): Added. Like ComponentBase's renderReplace but applies
the transformation of classes to workaround the lack of shadow tree support in scriptless HTML.
(MarkupComponentBase.prototype._applyStyleOverrides): Added. Recursively applies the transformation.
(MarkupComponentBase.prototype._ensureContentTree): Added. Like ComponentBase's _ensureShadowTree.
(MarkupComponentBase.reset): Added.
(MarkupComponentBase._parseTemplates): Added. Parses the content & style templates, and generates the
transformed fake DOM tree and stylesheet text whereby selectors in each component is modified to be
unique across all components. The function to apply the necessary changes to an element is saved in
the global map of components, and later used in renderReplace via _applyStyleOverrides.
(MarkupComponentBase.defineElement): Added. Like ComponentBase's defineElement.
(MarkupComponentBase.prototype.createEventHandler): Added.
(MarkupComponentBase.createEventHandler): Added.
(MarkupPage): Added. The top-level component responsible for generating a DOCTYPE, head, and body.
(MarkupPage.prototype.pageTitle): Added.
(MarkupPage.prototype.content): Added. Overrides the one in MarkupComponentBase to return what would
be the content of the body element as opposed to the html element for the connivance of subclasses,
and to match the behavior of the frontend Page class.
(MarkupPage.prototype.render): Added.
(MarkupPage.prototype._updateComponentsStylesheet): Added. Concatenates the transformed stylesheet of
all components used.
(MarkupPage.get contentTemplate): Added.
(MarkupPage.prototype.generateMarkup): Added. Enqueues the page to render, spin the render loop, and
generates the HTML. We enqueue the page twice in order to invoke _updateComponentsStylesheet after
all subcomponent had finished rendering.
* unit-tests/markup-component-base-tests.js: Added.
* unit-tests/markup-element-tests.js: Added.
(.createElement): Added.
* unit-tests/markup-page-tests.js: Added.
2018-05-23 Dewei Zhu <dewei_zhu@apple.com>
OSBuildFetcher should respect maxRevision while finding OS builds to report.
https://bugs.webkit.org/show_bug.cgi?id=185925
Reviewed by Ryosuke Niwa.
* server-tests/tools-os-build-fetcher-tests.js: Fix a typo in the unit tests.
Added unit tests for this change. Aslo convert an existing test using async.
* tools/js/os-build-fetcher.js:
(prototype._fetchAvailableBuilds): It should also use 'maxRevision' to filter builds to be reported.
It should use 'minRevisionOrder' when no commit has ever been submitted.
(prototype._commitsForAvailableBuilds): Takes 'maxOrder' as fifth argument.
'minOrder' and 'maxOrder' should be inclusive.
2018-05-11 Dewei Zhu <dewei_zhu@apple.com>
Update ChartPane per change r231087.
https://bugs.webkit.org/show_bug.cgi?id=185570
Reviewed by Ryosuke Niwa.
On r231087 we change the return type of AnalysisTask.create, ChartPane needs to adapt
this change.
* public/v3/pages/chart-pane.js: Adapted the change that AnalysisTask.create now returns
an AnalysisTask object.
(ChartPane.prototype.async._analyzeRange):
2018-05-10 Dewei Zhu <dewei_zhu@apple.com>
CommitLogViewer._preceedingCommit should not always be null
https://bugs.webkit.org/show_bug.cgi?id=185540
Reviewed by Ryosuke Niwa.
Fix the bug introduced in r227746 that CommitLogViewer._preceedingCommit is always null.
* browser-tests/index.html: Fix expected measurement-set url.
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._fetchCommitLogs): CommitLogViewer._preceedingCommit should be set
when fetching for preceeding revision succeeds.
2018-05-03 Dewei Zhu <dewei_zhu@apple.com>
Range bisector should check the commits for repositories without change in specified range.
https://bugs.webkit.org/show_bug.cgi?id=185269
Reviewed by Ryosuke Niwa.
For repositories without a change in the specified range, we still need to use them to filter commit
sets. Before this change, code does not apply filtering by those repositories against commit set. As
a result, commit sets with different commits for those repositories may be chosen as bisecting commit set.
* public/v3/commit-set-range-bisector.js: Updated the logic to verify range for repositories without
change in range.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits):
* unit-tests/commit-set-range-bisector-tests.js: Added a unit test to guard against this change.
2018-05-02 Dewei Zhu <dewei_zhu@apple.com>
Create analysis task should sync analysis task status after creation.
https://bugs.webkit.org/show_bug.cgi?id=185222
Reviewed by Ryosuke Niwa.
* public/v3/models/analysis-task.js:
(AnalysisTask.async.create): Fetch newly-created analysis task right about its creation.
(AnalysisTask):
* tools/js/measurement-set-analyzer.js:
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet): Adjust as 'AnalysisTask.create' now
returns an anlysis task instance.
(MeasurementSetAnalyzer):
* unit-tests/analysis-task-tests.js: Added a unit test for this change.
(async):
* unit-tests/measurement-set-analyzer-tests.js: Update unit tests accordingly.
Fix a typo in one previous unit test.
(async):
2018-05-01 Dewei Zhu <dewei_zhu@apple.com>
Write a script that detects chart changes by using v3 API.
https://bugs.webkit.org/show_bug.cgi?id=184419
Reviewed by Ryosuke Niwa.
Added a script that detects chart changes and schedule confirming analysis task.
* browser-tests/async-task-tests.js: Added a unit test for 'AsyncTask'.
* browser-tests/index.html: Added import for 'AsyncTask' for testing.
* public/shared/statistics.js: Make 'findRangesForChangeDetectionsWithWelchsTTest' defaults to 0.99 one sided possibility.
(Statistics.new.this.findRangesForChangeDetectionsWithWelchsTTest):
* public/v3/async-task.js:
(AsyncTask.isAvailable): Helper function to determine whether AsyncTask is available or not as 'Worker' is
not available in nodejs.
(AsyncTask):
* public/v3/models/bug.js: Export as a module.
* public/v3/models/measurement-set.js:
(MeasurementSet.prototype._invokeSegmentationAlgorithm): Added a check to avoid using AsyncTask when running in NodeJs.
(MeasurementSet):
* server-tests/resources/common-operations.js: Added a helper function to assert certain exception is thrown.
(async.assertThrows):
* tools/js/measurement-set-analyzer.js: Added 'MeasurementSetAnalyzer' module for analyzing measurement set.
(MeasurementSetAnalyzer):
(MeasurementSetAnalyzer.prototype.async.analyzeOnce):
(MeasurementSetAnalyzer.measurementSetListForAnalysis):
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):
* tools/js/v3-models.js: Added import for 'Bug' object.
* tools/run-analysis.js: Added this script to detect measurement set changes.
(main):
(async.analysisLoop):
* unit-tests/measurement-set-analyzer-tests.js: Added unit tests for 'MeasurementSetAnalyzer'.
* unit-tests/resources/mock-v3-models.js: Reset 'MeasurementSet._set' every time.
Update mock platform to include lastModifiedByMetric information.
(MockModels.inject):
2018-04-30 Ryosuke Niwa <rniwa@webkit.org>
Creating a custom analysis task after fetching all analysis tasks fail
https://bugs.webkit.org/show_bug.cgi?id=184641
Reviewed by Saam Barati.
The bug was caused by AnalysisTask._fetchSubset not fetching the analysis task when all analysis tasks
had previously been fetched (AnlaysisTask._fetchAllPromise is set) even when noCache is set to true.
Fixed it by ignornig _fetchAllPromise when noCache is set to true.
This patch also adds noCache argument to AnalysisTask.fetchById and reverts the inadvertent change in
r226836 to always set noCache to true in this function.
* public/v3/models/analysis-task.js:
(AnalysisTask.fetchById): Added noCache argument instead of always specifying true, and modernized the code.
(AnalysisTask._fetchSubset): Fixed the bug. See above description.
* public/v3/models/test-group.js:
(TestGroup.createWithTask): Set noCache to true when calling AnalysisTask.fetchById here.
* unit-tests/analysis-task-tests.js: Added test cases for AnalysisTask.fetchById, including a test
to make sure it doesn't fetch the specified analysis task when noCache is set to false and all analysis
tasks had previously been fetched for the aforementioned revert of the inadvertent change in r226836.
(sampleAnalysisTasks): Renamed from sampleAnalysisTasks as the result contains multiple analysis tasks.
* unit-tests/test-groups-tests.js: Added a test case for TestGroup.createWithTask
2018-04-30 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r230960): Browser tests under TimeSeriesChart fetchMeasurementSets all fail
https://bugs.webkit.org/show_bug.cgi?id=185125
Reviewed by Saam Barati.
The bug was caused by mock-remote-api.js always loading PrivilegedAPI using require, which doesn't work in a browser.
Fixed the bug by explicitly requiring the right kind of PrivilegedAPI in each unit test instead.
* unit-tests/analysis-task-tests.js:
* unit-tests/buildbot-syncer-tests.js:
* unit-tests/commit-log-tests.js:
* unit-tests/commit-set-range-bisector-tests.js:
* unit-tests/commit-set-tests.js:
* unit-tests/measurement-set-tests.js:
* unit-tests/privileged-api-tests.js:
* unit-tests/resources/mock-remote-api.js:
(MockRemoteAPI.inject): Take PrivilegedAPI instead of the type string. Also fixed a bug that _token wasn't unset
after each unit test, and superfluous initializations of originalRemoteAPI and originalPrivilegedAPI.
* unit-tests/test-groups-tests.js:
2018-04-30 Dewei Zhu <dewei_zhu@apple.com>
MeasurementSet._constructUrl should construct absolute url.
https://bugs.webkit.org/show_bug.cgi?id=185137
Reviewed by Ryosuke Niwa.
MeasurementSet._constructUrl should not construct an url with relative path.
* public/v3/models/measurement-set.js: Should use '/api/measurement-set...' and '/data/measurement-set-...'
for uncached and cached fetching.
* unit-tests/measurement-set-tests.js: Updated unit tests.
(const.set MeasurementSet):
2018-04-26 Dewei Zhu <dewei_zhu@apple.com>
Extend create-analysis-test API to be able to create with confirming test group.
https://bugs.webkit.org/show_bug.cgi?id=184958
Reviewed by Ryosuke Niwa.
Extend create-analysis-test API to be able to create an analysis task with confirming test group.
Update create analysis task UI in chart pane to adapt this new API.
Refactored '/privileged-api/create-test-group' API to share some creating test group logic with '/privileged-api/create-analysis-task' API.
Moved the shared logic to commit-sets-helpers.php.
* public/api/analysis-tasks.php: Use 'require_once' instead of 'require'.
* public/include/commit-sets-helpers.php: Added.
(create_test_group_and_build_requests): A helper function that creates test group and build requests for a analysis
task. In long term, this should be a class to avoid passing long argument list around.
(insert_commit_sets_and_construct_configuration_list): Based on commit sets returns build and test configurations.
(insert_build_request_for_configuration): Insert build requests based on configuration.
(commit_sets_from_revision_sets): Returns commit sets from given revision set list.
* public/privileged-api/create-analysis-task.php: Added the ability to create analysis task with confirming test
groups when repetition count is specified.
* public/privileged-api/create-test-group.php: Moved shared function to commit-sets-helpers.php.
* public/v3/models/analysis-task.js:
(AnalysisTask.create): Instead of accepting run ids, it now accepts points and test group name and confirming iterations.
It will conditionally add test group information into parameter when confirming iterations is a positive number.
(AnalysisTask):
* public/v3/models/commit-set.js:
(CommitSet.revisionSetsFromCommitSets): Move 'TestGroup._revisionSetsFromCommitSets' since CommitSet class is more
appropriate place and it will be shared by both TestGroup and AnalysisTask
(CommitSet):
* public/v3/models/test-group.js:
(TestGroup.createWithTask): Adapt 'CommitSet.revisionSetsFromCommitSets'.
(TestGroup.createWithCustomConfiguration): Adapt 'CommitSet.revisionSetsFromCommitSets'.
(TestGroup.createAndRefetchTestGroups): Adapt 'CommitSet.revisionSetsFromCommitSets'.
(TestGroup._revisionSetsFromCommitSets): Deleted and moved to 'CommitSet.revisionSetsFromCommitSets'.
* public/v3/pages/chart-pane.js:
(ChartPane.prototype.didConstructShadowTree): Added the logic to disable options when checkbox for creating confirming
test group is unchecked.
(ChartPane.prototype._analyzeRange): Conditionally create confirming test group from UI.
(ChartPane.cssTemplate):
* server-tests/privileged-api-create-analysis-task-tests.js: Added unit tests. Added a unit test for 'NodePrivilegedAPI'.
* unit-tests/analysis-task-tests.js: Added unit tests.
* unit-tests/commit-set-tests.js: Added unit test for 'CommitSet.revisionSetsFromCommitSets'.
* unit-tests/resources/mock-remote-api.js: Reset csrf token when BrowserPrivilegedAPI is used.
(MockRemoteAPI.inject):
2018-04-23 Dewei Zhu <dewei_zhu@apple.com>
Tool scripts should not use PrivilegedAPI from 'public/v3/privileged-api.js'.
https://bugs.webkit.org/show_bug.cgi?id=184766
Reviewed by Ryosuke Niwa.
For tools, we should not use PrivilegedAPI for tools as current PrivilegedAPI
is used by UI and it is unnecessary to generate CSRF token for tools.
Will post a followup patch that creates a PrivilegedAPI used by tools.
Make a change on TestServer.inject and MockRemoteAPI.inject to allow specifying
BrowserPrivilegedAPI or NodePrivilegedAPI in the test. Currently defaults to
BrowserPrivilegedAPI as this is the test behavior before this change.
* server-tests/resources/common-operations.js: Allow passing type of privileged api
information to TestServer.inject.
* server-tests/resources/test-server.js: Conditionally inject PrivilegedAPI based on
type of privileged api.
(TestServer.prototype.inject):
(TestServer):
* server-tests/tools-buildbot-triggerable-tests.js: Updated 'prepareServerTest' invocation.
* server-tests/tools-os-build-fetcher-tests.js: Updated 'prepareServerTest' invocation.
* server-tests/tools-sync-buildbot-integration-tests.js: Temporarily injecting
BrowserPrivilegedAPI for mocking UploadedFile. The actual script does not rely on
BrowserPrivilegedAPI at all.
(async.createTestGroupWihPatch):
(beforeEach):
* tools/js/privileged-api.js: Added NodePrivilegedAPI
(NodePrivilegedAPI.prototype.sendRequest):
(NodePrivilegedAPI.configure): Configure the slave name and password.
(NodePrivilegedAPI):
* tools/js/v3-models.js: Removed the import of PrivilegedAPI.
* unit-tests/privileged-api-tests.js:. Added unit tests for NodePrivilegedAPI.
* unit-tests/resources/mock-remote-api.js: Conditionally inject PrivilegedAPI based on
the type of privileged api.
(MockRemoteAPI.inject):
2018-04-23 Dewei Zhu <dewei_zhu@apple.com>
Revision information returned by querying measurement set api with analysis task id should contain commit order.
https://bugs.webkit.org/show_bug.cgi?id=184902
Reviewed by Ryosuke Niwa.
This is a bug fix for r230719 which does not cover the case while querying `measurement-set.php?analysisTask=$task_id`
* public/api/measurement-set.php: AnalysisResultsFetcher.fetch_commits results should contains commit order.
* server-tests/api-measurement-set-tests.js: Added unit test for this change.
2018-04-19 Dewei Zhu <dewei_zhu@apple.com>
Add a bisect button to automatically schedule bisecting A/B tasks.
https://bugs.webkit.org/show_bug.cgi?id=183888
Reviewed by Ryosuke Niwa.
Extended AnalysisTask's ability to figure out bisecting A/B tasks based on existing data points and test groups.
Updated analysis page UI to show bisect button which will only appear when the middle commit set of the range in
test group can be found.
Finding middle commit set algorithm is described as follows:
1. Find all commits from multiple repositories among the ranges specified by two commit sets in test group. In
the meanwhile, merge all commits that have commit time into a single list. For commits only have commit order,
put those commits into separate lists.
2. Filter all the available commit sets in current analysis task by keeping the ones have exact repositories
as the two commit sets in specified test group, and every commit of a commit set is in side the commit range.
After filtering the commit sets, sort the remaining ones and only keep one commit set if multiple commit sets
are equal to each other.
3. Among commits processed by step 2, find the commit sets that have the commit which is closest to the middle of
all commits that have commit time created from step 1.
4. Among commits processed by step 3, find the commit sets that have the commit which is closest to the middle of
commits that only have commit order and categorized by repository. We have to iterate through repository as commit
order is not granted to be comparable between different repositories.
5. If more than one commit sets are found, choose the middle commit set.
* public/v3/commit-set-range-bisector.js: Added.
(CommitSetRangeBisector.async.commitSetClosestToMiddleOfAllCommits): Instead of naively returning the middle of
existing commit set array, this function selects a bisect bisection points that is closest to actually middle of
the revision range based on all revisions reported to performance dashboard.
(CommitSetRangeBisector._findCommitSetsWithinRange): Helper function to find commit sets those are in specified range.
(CommitSetRangeBisector._orderCommitSetsByTimeAndOrderThenDeduplicate): Helper function to sort and deduplicate commit sets.
(CommitSetRangeBisector._closestCommitSetsToBisectingCommitByTime): Helper function to find the commit sets those
are closest to the middle of among all the commits in the range that have commit time.
(CommitSetRangeBisector._findCommitSetsClosestToMiddleOfCommitsWithOrder): Helper function which goes through all
repositories the commit of which has commit order, and find the commit sets those are closest to the middle of
commits for each repository.
(CommitSetRangeBisector._buildCommitToCommitSetMap): Helper function to builder mapping from a commit to commit
sets those contain this commit.
(CommitSetRangeBisector._findCommitClosestToMiddleIndex): Helper function to find closest commit to the middle of index.
(CommitSetRangeBisector):
* public/v3/index.html: Imports 'public/v3/commit-set-range-bisector.js'.
* public/v3/models/analysis-task.js:
(AnalysisTask.prototype.async.commitSetsFromTestGroupsAndMeasurementSet): Aggregates all existing commit sets in
test groups of current analysis tasks.
* public/v3/models/commit-log.js:
(CommitLog.prototype.hasCommitTime): A helper function determine whether a commit has a commit time. For commit
that does not have time, server will return commit time as zero. As it is unrealistic for a commit has commit time
0, it would be safe to assume a valid commit time is greater than 0.
(CommitLog.prototype.hasCommitOrder): Returns whether a commit has a commit oder.
(CommitLog.hasOrdering): Determine whether we can order two commits by commit time or commit order.
(CommitLog.orderTwoCommits): Order two commits incrementally.
* public/v3/models/commit-set.js:
(CommitSet.prototype.hasSameRepositories): A helper function to determine whether a commit set has same repositories
as current repository.
(CommitSet.containsRootOrPatchOrOwnedCommit): A helper function to determine whether current commit set has root,
patch or owned commit.
(CommitSet.commitForRepository): This function defined twice identically, remove one of them.
* public/v3/models/test-group.js: Make '_computeRequestedCommitSets' a static function as it does not use any
instance variables.
* public/v3/pages/analysis-task-page.js: Added bisect button.
(AnalysisTaskTestGroupPane):
(AnalysisTaskTestGroupPane.prototype.didConstructShadowTree):
(AnalysisTaskTestGroupPane.prototype.setTestGroups): Update 'setTestGroups' to update _bisectingCommitSetByTestGroup
when the test groups changes.
(AnalysisTaskTestGroupPane.prototype._renderCurrentTestGroup): Added code to conditionally show bisect button.
Bisect button will only show when there is a middle commit set for that test group.
(AnalysisTaskTestGroupPane.htmlTemplate):
(AnalysisTaskTestGroupPane.cssTemplate):
(AnalysisTaskPage.prototype.didConstructShadowTree):
(AnalysisTaskPage.prototype._retryCurrentTestGroup):
(AnalysisTaskPage.prototype.async._bisectCurrentTestGroup): A callback when bisect button is clicked.
* tools/js/v3-models.js:
* unit-tests/commit-log-tests.js: Added unit tests for 'CommitLog.hasCommitTime', 'CommitLog.hasCommitOrder',
'CommitLog.orderTwoCommits', 'CommitLog.hasOrdering'.
* unit-tests/commit-set-range-bisector-tests.js: Unit tests for 'CommitSetRangeBisector.commitSetClosestToMiddleOfAllCommits'.
* unit-tests/commit-set-tests.js: Added unit tests for 'CommitSet.hasSameRepositories' and 'CommitSet.containsRootOrPatchOrOwnedCommit'.
2018-04-16 Dewei Zhu <dewei_zhu@apple.com>
Commit order should always be returned by api.
https://bugs.webkit.org/show_bug.cgi?id=184674
Reviewed by Ryosuke Niwa.
Commit order sometimes missing in CommitLog object before this change.
This makes ordering commits logic become unnecessarily complicate.
This change will ensure commit order is always fetched for a CommitLog object.
Change measurement-set API to contain commit order information.
Change commits API to contain commit order information.
* public/api/measurement-set.php: Includes commit order information.
* public/include/commit-log-fetcher.php:
* public/v3/models/commit-log.js: Added a function to return order information.
(CommitLog.prototype.updateSingleton): This function should update commit order.
(CommitLog.prototype.order): Returns the order of commit.
* public/v3/models/commit-set.js:
(MeasurementCommitSet): Update MeasurementCommitSet to contain commit order information when creating CommitLog object.
* server-tests/api-measurement-set-tests.js: Updated unit tests.
* unit-tests/analysis-task-tests.js: Update unit tests to contain commit order information in mock data.
(measurementCluster):
* unit-tests/commit-log-tests.js: Added unit tests for CommitLog.order.
* unit-tests/commit-set-tests.js: Added commit order in MeasurementCommitSet.
* unit-tests/measurement-adaptor-tests.js: Updated unit tests to contain commit order information in mock data.
* unit-tests/measurement-set-tests.js: Updated unit tests to contain commit order information in mock data.
2018-04-15 Ryosuke Niwa <rniwa@webkit.org>
Make it possible to hide some repository groups
https://bugs.webkit.org/show_bug.cgi?id=184632
Reviewed by Saam Barati.
Added the ability to hide repository groups in the custom analysis task configurator from the admin page.
Hidden repositroy groups will continue to function for existing test groups. This is purely an UI change.
* init-database.sql: Added repositorygroup_hidden as a new column to triggerable_repository_groups.
* public/admin/triggerables.php: Added a form field to hide a repository group.
* public/include/manifest-generator.php: Include hidden state in the manifest file.
* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype._renderRepositoryPanes): Filter out hidden repository groups.
* public/v3/models/triggerable.js:
(prototype.isHidden): Added.
* server-tests/api-manifest-tests.js: Updated an existing test case to test a hidden repository group.
2018-04-06 Dewei Zhu <dewei_zhu@apple.com>
Added 'CommitSet.diff' which will be shared between multiple independent incoming changes.
https://bugs.webkit.org/show_bug.cgi?id=184368
Reviewed by Ryosuke Niwa.
'CommitSet.diff' will be used in multiple independent incoming changes.
It would be easier to make this a separate change to parallelize the changes depends on this API.
* public/v3/models/commit-set.js:
(CommitSet.prototype.createNameWithoutCollision): Moved from 'AnalysisTaskPage' and make it more generic.
(CommitSet.prototype.diff): Describe differences between 2 commit sets including commit, root and patch differences.
* public/v3/pages/analysis-task-page.js: Move 'AnalysisTaskPage._createRetryNameForTestGroup' to CommitSet in a more generic form.
(AnalysisTaskPage.prototype._retryCurrentTestGroup): Use 'CommitSet.withoutRootPatchOrOwnedCommit' instead.
(AnalysisTaskPage.prototype._createRetryNameForTestGroup): Moved to CommitSet in a more generic form.
* unit-tests/commit-set-tests.js: Added unit tests for 'CommitSet.diff'.
2018-04-05 Dewei Zhu <dewei_zhu@apple.com>
Fix a bug introduced in r230295 that A/B test result is not shown.
https://bugs.webkit.org/show_bug.cgi?id=184350
Reviewed by Ryosuke Niwa.
result.label should be assigned in `TestGroup._computeRequestedCommitSets`.
* public/v3/models/test-group.js:
(TestGroup.prototype._computeRequestedCommitSets):
2018-03-29 Dewei Zhu <dewei_zhu@apple.com>
Added UI to show potential regressions in chart with t-testing against segmentations.
https://bugs.webkit.org/show_bug.cgi?id=184131
Reviewed by Ryosuke Niwa.
Added UI in the chart-pane so that user can use new option in trendline which not only
shows the segmentation, but also t-test against potential changes indicated by segmentation.
Fix a bug in AnalysisTaskPage that chart is not updated when change type of task changes.
* browser-tests/interactive-time-series-chart-tests.js: Fix a unit tests.
* browser-tests/time-series-chart-tests.js: Fix a unit tests.
* public/shared/statistics.js: Added a function to t-test certain range based on segmentation results.
(Statistics.supportedOneSideTTestProbabilities):
(Statistics.findRangesForChangeDetectionsWithWelchsTTest): The argument `segmentations`, every 2 items in the list defines
segmentation, that is why the index incremental is 2 in this funcion.
* public/v3/components/chart-pane-base.js: Will select the range if user clicks on a suggested annotation.
(ChartPaneBase.prototype.configure):
(ChartPaneBase.prototype._didClickAnnotation):
* public/v3/components/chart-styles.js:
(ChartStyles.annotationFillStyleForTask): Added 'annotationFillStyleForTask' to determine the fillStyle for annotation based on change type of a analysis task.
* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._findAnnotation): Also need to search among suggested annotaions.
* public/v3/components/time-series-chart.js: Introduced 'suggested annotaion' which does not have an existing task and is suggested by t-test based on segmentation.
(TimeSeriesChart):
(TimeSeriesChart.prototype.setSuggestedAnnotations):
(TimeSeriesChart.prototype.allAnnotations): Returns both annotations with and without analysis task.
(TimeSeriesChart.prototype._layoutAnnotationBars): Should take all annotations in the calculation.
* public/v3/models/measurement-set.js:
(MeasurementSet.prototype.metricId): Returns metric id.
* public/v3/models/metric.js:
(Metric.prototype.summarizeForValues): Added helper function to summarize a given value
* public/v3/models/test-group.js:
(TestGroup.prototype.compareTestResults): Adapted to use 'Metric.summarizeForValues'.
* public/v3/pages/chart-pane.js: Added 'Segmentation with t-test analysis' to 'ChartTrendLineTypes'.
(ChartPane.prototype._renderTrendLinePopover):
(ChartPane.prototype.async._updateTrendLine): make it an async function.
* unit-tests/statistics-tests.js: Added unit tests for 'findRangesForChangeDetectionsWithWelchsTTest'.
2018-04-02 Aakash Jain <aakash_jain@apple.com>
Remove deprecated Buildbot 0.8 code from Perf syncing scripts
https://bugs.webkit.org/show_bug.cgi?id=183915
Reviewed by Ryosuke Niwa.
* server-tests/resources/mock-data.js:
(MockData.buildbotBuildersURLDeprecated): Deleted.
(MockData.mockBuildbotBuildersDeprecated): Deleted.
(MockData.pendingBuildDeprecated): Deleted.
(MockData.runningBuildDeprecated): Deleted.
(MockData.finishedBuildDeprecated): Deleted.
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntryDeprecated): Deleted.
(BuildbotBuildEntryDeprecated.prototype.initialize): Deleted.
(BuildbotBuildEntryDeprecated.prototype.url): Deleted.
(BuildbotSyncer.prototype.scheduleBuildOnBuildbotDeprecated): Deleted.
(BuildbotSyncer.prototype._pullRecentBuildsDeprecated): Deleted.
(BuildbotSyncer.prototype.pathForPendingBuildsJSONDeprecated): Deleted.
(BuildbotSyncer.prototype.pathForBuildJSONDeprecated): Deleted.
(BuildbotSyncer.prototype.pathForForceBuildDeprecated): Deleted.
(BuildbotSyncer.prototype.url): Deleted.
(BuildbotSyncer.prototype.urlForBuildNumberDeprecated): Deleted.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Deleted.
* unit-tests/buildbot-syncer-tests.js:
(smallPendingBuildDeprecated): Deleted.
(smallInProgressBuildDeprecated): Deleted.
(smallFinishedBuildDeprecated): Deleted.
(samplePendingBuildRequestDeprecated): Deleted.
(sampleInProgressBuildDeprecated): Deleted.
(sampleFinishedBuildDeprecated): Deleted.
2018-03-19 Aakash Jain <aakash_jain@apple.com>
Update Perf buildbot syncing scripts for Buildbot 0.9
https://bugs.webkit.org/show_bug.cgi?id=175969
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.initSyncers): Switch from Deprecated version to new version of getBuilderNameToIDMap.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype.scheduleRequestInGroupIfAvailable): Switch from Deprecated version to new version of scheduleRequest.
(BuildbotSyncer.prototype.pullBuildbot): Switch from Deprecated version to new version of pathForPendingBuilds, _pullRecentBuilds
and BuildbotBuildEntry. Parse the pending build-requests data in Buildbot 0.9 format.
* unit-tests/buildbot-syncer-tests.js: Updated as per Buildbot 0.9 code.
* server-tests/tools-sync-buildbot-integration-tests.js: Ditto.
* server-tests/tools-buildbot-triggerable-tests.js: Ditto.
* server-tests/resources/mock-data.js: Ditto.
(MockData.pendingBuildsUrl): Method to construct pendingBuildsUrl in Buildbot 0.9 format.
(MockData.recentBuildsUrl): Ditto for recent builds url.
(MockData.statusUrl): Ditto for status url.
(MockData.builderIDForName): Method to get builder ID from builder name.
2018-03-15 Aakash Jain <aakash_jain@apple.com>
BuildbotBuildEntry creates an incorrect url for pending builds
https://bugs.webkit.org/show_bug.cgi?id=183670
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize): Fetch buildrequestid from Buildbot.
(BuildbotBuildEntry.prototype.url): Construct url for pending build using buildrequestid from Buildbot.
* unit-tests/buildbot-syncer-tests.js: Updated unit-test.
2018-03-14 Aakash Jain <aakash_jain@apple.com>
Add support for boolean properties in BuildbotSyncer while submitting build request to Buildbot 0.9 server
https://bugs.webkit.org/show_bug.cgi?id=183638
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer._parseRepositoryGroupPropertyTemplate): Allow boolean properties.
* server-tests/tools-sync-buildbot-integration-tests.js: Tests for boolean properties.
* unit-tests/buildbot-syncer-tests.js: Ditto.
2018-03-04 Dewei Zhu <dewei_zhu@apple.com>
Create analysis task should use build time as fallback when commit time is not available.
https://bugs.webkit.org/show_bug.cgi?id=183309
Reviewed by Ryosuke Niwa.
Added the ability to schedule analysis task for the range without commit time.
* public/privileged-api/create-analysis-task.php: Use build time as fallback.
* server-tests/privileged-api-create-analysis-task-tests.js: Added a unit test for this change.
2018-03-04 Aakash Jain <aakash_jain@apple.com>
BuildbotBuildEntry for buildbot 0.9 uses incorrect buildrequestid
https://bugs.webkit.org/show_bug.cgi?id=183194
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry.prototype.initialize): Updated _buildRequestId to use correct build-request-id, as set in syncer._buildRequestPropertyName.
(BuildbotSyncer.prototype.pathForPendingBuilds): Updated url to fetch properties for build-requests.
* unit-tests/buildbot-syncer-tests.js:
(sampleBuildData): Updated sampleBuildData with correct build-request-id in properties. Added
properties to samplePendingBuildRequestData.
2018-02-28 Aakash Jain <aakash_jain@apple.com>
Rename samplePendingBuild to samplePendingBuildRequest
https://bugs.webkit.org/show_bug.cgi?id=183171
Reviewed by Ryosuke Niwa.
* unit-tests/buildbot-syncer-tests.js:
(samplePendingBuildRequests): Renamed from samplePendingBuild.
(samplePendingBuildRequestDeprecated): Renamed from samplePendingBuildDeprecated.
(samplePendingBuild): Deleted.
(samplePendingBuildDeprecated): Deleted.
2018-02-02 Aakash Jain <aakash_jain@apple.com>
Add support for submitting build request to Buildbot 0.9 server in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=182218
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype.scheduleRequest): Added assert to ensure forcescheduler property is always defined. Builds can not
be scheduled on Buildbot without this property. Updated unit-tests and server-tests accordingly.
(BuildbotSyncer.prototype.scheduleBuildOnBuildbotDeprecated): Method to schedule build request on Buildbot 0.8 server.
(BuildbotSyncer.prototype.scheduleBuildOnBuildbot): Method to schedule build request on Buildbot 0.9 server.
(BuildbotSyncer.prototype.pathForForceBuildDeprecated): Path for scheudling build on Buildbot 0.8 server.
(BuildbotSyncer.prototype.pathForForceBuild): Path for scheudling build on Buildbot 0.9 server.
* unit-tests/buildbot-syncer-tests.js:
(smallConfiguration): Added test-case for scheduleBuildOnBuildbot. Also added forcescheduler property in sample data.
* server-tests/resources/mock-data.js: Added forcescheduler property in sample data.
* server-tests/tools-buildbot-triggerable-tests.js: Updated server-tests to take care of added forcescheduler property.
2018-02-02 Aakash Jain <aakash_jain@apple.com>
Add support for fetching recent builds in Buildbot 0.9 format in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=179743
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._pullRecentBuildsDeprecated): Renamed from _pullRecentBuilds. This method fetch
from Buildbot 0.8 server.
(BuildbotSyncer.prototype._pullRecentBuilds): Method to fetch recent builds from Buildbot 0.9 server.
(BuildbotSyncer.prototype.pathForRecentBuilds): URL for fetching recent builds from Buildbot 0.9 server.
(BuildbotSyncer.prototype.pathForBuildJSONDeprecated): Renamed from pathForBuildJSON.
* unit-tests/buildbot-syncer-tests.js:
(_pullRecentBuilds.it): unit-test - should not fetch recent builds when count is zero.
(_pullRecentBuilds.it): unit-test - should pull the right number of recent builds.
(_pullRecentBuilds.it): unit-test - should handle unexpected error while fetching recent builds.
(_pullRecentBuilds.it): unit-test - should create BuildbotBuildEntry after fetching recent builds.
2018-02-01 Aakash Jain <aakash_jain@apple.com>
Create BuildbotBuildEntry in Buildbot syncer in Buildbot 0.9 format
https://bugs.webkit.org/show_bug.cgi?id=182036
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotBuildEntry): Class for Buildbot entry in Buildbot 0.9 data format.
(BuildbotBuildEntryDeprecated): Renamed from BuildbotBuildEntry, sub-classed from BuildBotEntry. Handles Buildbot 0.8 data format.
(BuildbotBuildEntryDeprecated.prototype.url): URL in buildbot 0.8 format.
(BuildbotSyncer.prototype.builderID): Added.
(BuildbotSyncer.prototype.pathForPendingBuildsJSONDeprecated): Renamed from BuildbotSyncer.prototype.pathForPendingBuildsJSON.
(BuildbotSyncer.prototype.pathForPendingBuilds): Path for pending builds in Buildbot 0.9 format.
(BuildbotSyncer.prototype.urlForBuildNumberDeprecated): Deprecated. Renamed from urlForBuildNumber.
(BuildbotSyncer.prototype.urlForBuildNumber): Updated in Buildbot 0.9 format.
(BuildbotSyncer.prototype.urlForPendingBuild): Buildbot 0.9 has individual webpage for pending buildrequests as well. URL to that page.
* unit-tests/buildbot-syncer-tests.js: Renamed BuildbotBuildEntry to BuildbotBuildEntryDeprecated.
(sampleBuildData): Sample build data. Common method for in-progress and finished build data.
(samplePendingBuildData): Sample data for a pending build. Separate method so that we can easily create sample data with multiple builds.
(sampleInProgressBuildData): Ditto for in-progress build.
(sampleFinishedBuildData): Ditto for finished build.
(samplePendingBuild): Sample data for single pending build.
(sampleInProgressBuild): Ditto for in-progress build.
(sampleFinishedBuild): Ditto for finished build.
(samplePendingBuildDeprecated): Renamed from samplePendingBuild.
(sampleInProgressBuildDeprecated): Renamed from sampleInProgressBuild.
(sampleFinishedBuildDeprecated): Renamed from sampleFinishedBuild.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for pending build.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for in-progress build.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for finished build.
(BuildbotBuildEntry.it: Added unit-test for creating BuildbotBuildEntry for mix of in-progress and finished build.
2018-01-31 Dewei Zhu <dewei_zhu@apple.com>
Should chose the best match during 'route' if there are multiple matches.
https://bugs.webkit.org/show_bug.cgi?id=182326
Reviewed by Ryosuke Niwa.
r227749 made a change that 'analysisCategoryPage' will be added before 'analysisTaskPage'.
As route names for both pages starts with 'analysis', whichever added first will be chosen.
For a route like 'analysis/task/1'. As a result, 'analysisCategoryPage' will be chosen and
this is not expected behavior. Adding the logic on the cases when route name does not extact
match the route name, always choose the longest mathcing route name.
Also modernized the code of 'page-router.js' to use const & let instead of var.
Added a browser test to guard against this bug.
* browser-tests/index.html: Import 'page-router-tests.js'.
* browser-tests/page-router-tests.js: Added unit test to guard against this bug.
* public/v3/pages/page-router.js:
(PageRouter.prototype.route): Added logic to find best matching in the case of inexact match.
(PageRouter.prototype.pageDidOpen):
(PageRouter.prototype._updateURLState):
(PageRouter.prototype._serializeToHash):
(PageRouter.prototype._deserializeFromHash):
(PageRouter.prototype._serializeHashQueryValue):
(PageRouter.prototype._deserializeHashQueryValue):
(PageRouter.prototype._countOccurrences):
(PageRouter):
2018-01-29 Dewei Zhu <dewei_zhu@apple.com>
Should fetch owner commits in build-requests-fetcher.
https://bugs.webkit.org/show_bug.cgi?id=182266
Reviewed by Ryosuke Niwa.
In a build request, owner commit of a commit is not always one of a commit in the commit set.
Build request api should contain owner commits in the 'commits' field of the return value.
* public/include/build-requests-fetcher.php: Added logic to fetch owner commits and added them into 'commits'.
* server-tests/api-build-requests-tests.js: Added a unit test.
* server-tests/resources/mock-data.js:
(MockData.set addTestGroupWithOwnerCommitNotInCommitSet): Added a test group with a build request, the commit set of which does
not contain owner commit of one commit.
2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
Add the support for reporting Speedometer 2.0 results to perf dashboard
https://bugs.webkit.org/show_bug.cgi?id=182089
<rdar://problem/36172346>
Rubber-stamped by Chris Dumez.
Apparently, this has always worked since the very first version of the perf dashboard added in r163688.
The relevant code is at the line 313 of report-processor.php now.
Added regression tests for this feature since we didn't have any tests four years ago.
* server-tests/api-report-tests.js:
2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r225898): The perf dashboard fails to open when there are no summary pages
https://bugs.webkit.org/show_bug.cgi?id=182210
Rubber-stamped by Chris Dumez.
The bug was caused by TestFreshnessPage unconditionally assuming that summaryPageConfiguration is set.
Fixed it by not creating TestFreshnessPage when there are no summary pages specified.
Also modernized the code to use const & let instead of var.
* public/v3/main.js:
(main):
2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
Perf dashboard's page title can be set to a previously visited page
https://bugs.webkit.org/show_bug.cgi?id=182209
Rubber-stamped by Chris Dumez.
Before this patch, opening a page and navigating away from it could result in the page title
getting set to that of the previously visited page after the new page had been opened.
This bug was caused by Page.render keep setting document.title even though the page is no longer
the currently open page of the router. Fixed it by exiting early in Page.enqueueToRender when
this page is not the currently open page of the router.
Also added basic tests for Page.
* browser-tests/index.html:
* browser-tests/page-tests.js: Added.
* public/v3/pages/page.js:
(Page): Removed the unused second constructor argument.
(Page.prototype.enqueueToRender): Fixed the bug.
(Page.prototype.render): Use const instead of var.
2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
CommitLogViewer should not fetch commits in serial
https://bugs.webkit.org/show_bug.cgi?id=182207
Rubber-stamped by Chris Dumez.
Fetch both the commits in the range as well as the preceding commit at once instead of
fetching the preceding commit only after the commits in the range had been fetched.
* browser-tests/commit-log-viewer-tests.js: Fixed the tcoest case after r224227.
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._fetchCommitLogs): Fetch commits in parallel.
2018-01-24 Dewei Zhu <dewei_zhu@apple.com>
Check existence of 'node_modules_dir' before creating it.
https://bugs.webkit.org/show_bug.cgi?id=182040
Reviewed by Aakash Jain.
Fix the bug introduced in r227395.
* tools/run-tests.py: Added directory existence check.
2018-01-22 Dewei Zhu <dewei_zhu@apple.com>
Fix the bug that 'TestGroupResultsViewer' creates unnecessary rows.
https://bugs.webkit.org/show_bug.cgi?id=181967
Reviewed by Ryosuke Niwa.
Fixed a bug caused by a typo in CommitSet.equals, which makes it returns incorrect results for most
comparison between a CommitSet and a MeasurementCommitSet.
MeasurementCommitSet does not have full information for the commits, thus, it cannot build mappings
between root/patch/owner commit/requires build to repository. When querying whether a given repository
needs to be built, MeasurementCommitSet will return undefined. Due to 'undefined != false', this
equality check will fail. Making 'CommitSet.requiresBuildForRepository' defaults to 'false' would fix
this bug.
* public/v3/models/commit-set.js:
(CommitSet.prototype.requiresBuildForRepository): Make it return false when key does not exist
instead of 'undefined'.
(CommitSet.prototype.equals): Fixed the typo that causes the bug.
Use wrapped functions instead of querying the mapping directly.
* unit-tests/commit-set-tests.js: Added unit tests.
2018-01-18 Dewei Zhu <dewei_zhu@apple.com>
'run-test.py' script should make sure 'node_modules' directory exists before installing node packages.
https://bugs.webkit.org/show_bug.cgi?id=181808
Reviewed by Ryosuke Niwa.
'run-test.py' will fail if 'node_modules' does not exist before running this script.
Instead of calling 'os.chdir' to change directory, use 'cwd' in subprocess instead.
* tools/run-tests.py: Added the logic to ensure 'node_modules' exists.
Also use 'cwd' in subprocess.call instead of calling 'os.chdir' ahead.
2018-01-20 Dewei Zhu <dewei_zhu@apple.com>
Extend 'ifBuilt' config key to set property based on whether certain repositories are built or not.
https://bugs.webkit.org/show_bug.cgi?id=181906
Reviewed by Ryosuke Niwa.
Before this change, 'ifBuilt' will always set specified property for test properties as long as there
is a build type build in the same build request group. However, this is no longer valid as we don't
want to set specified property for testing when only owned commit is built in previous build.
'ifBuilt' needs to conditionally set property based on whether certain required repositories are built.
Empty required repository list means no requirement on repository to set property.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):In the case of 'built', only set property when
repository requirment is meet and there is a 'build' root request in the same build request group.
(BuildbotSyncer._parseRepositoryGroup): Extend 'ifBuild' to pass information based on contition.
* unit-tests/buildbot-syncer-tests.js: Added unit tests.
2018-01-19 Dewei Zhu <dewei_zhu@apple.com>
Should reject updating a build request which has an associated build.
https://bugs.webkit.org/show_bug.cgi?id=181893
Reviewed by Ryosuke Niwa.
Current code does not prevent submitting to same build request multiple times.
This could lead to a build losing its associated build request.
As a result, this build will be visible in charts which is not right.
Added a check when a build request is reported.
Addressed a 'FIXME' for the race condition inside ReportProcessor->resolve_build_id by surrounding
it with a database transaction.
* public/include/report-processor.php:
Wrap adding platform and resolve_build_id with a database transaction.
Add a check to make sure only a build request has no associated build can be updated.
* server-tests/api-report-tests.js: Added unit tests accordingly.
2018-01-18 Dewei Zhu <dewei_zhu@apple.com>
Should allow updating a build-request to 'canceled'.
https://bugs.webkit.org/show_bug.cgi?id=181819
Reviewed by Ryosuke Niwa.
It's possible syncing script update a build-request to 'canceled' state.
* public/api/build-requests.php: Added 'canceled' as an acceptable update state.
* server-tests/api-build-requests-tests.js: Added a unit test to update a build-request to 'canceled'.
2018-01-18 Aakash Jain <aakash_jain@apple.com>
Add support for builderNameToIDMap in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=176526
Reviewed by Ryosuke Niwa.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer._loadConfig): Added builderNameToIDMap parameter. It would be used later on.
(BuildbotSyncer._resolveBuildersWithPlatforms): Ditto.
(BuildbotSyncer._validateAndMergeConfig): Added builderID as a valid config parameter.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.getBuilderNameToIDMap): Method to fetch BuilderNameToIDMap from Buildbot 0.9.
(BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Method to fetch BuilderNameToIDMap from Buildbot 0.8.
(BuildbotTriggerable.prototype.initSyncers): Updated to use getBuilderNameToIDMap.
* unit-tests/buildbot-syncer-tests.js: Updated unit-tests.
* server-tests/resources/mock-data.js:
(MockData.buildbotBuildersURLDeprecated): URL for fetching Builders list.
(MockData.buildbotBuildersURL): Ditto for Buildbot 0.9
(MockData.mockBuildbotBuildersDeprecated): Sample builders data for Buildbot 0.8
(MockData.mockBuildbotBuilders): Ditto for Buildbot 0.9
* server-tests/tools-buildbot-triggerable-tests.js: Added test for getBuilderNameToIDMap. Updated tests to handle
newly added promise for fetching builders list from Buildbot.
* server-tests/tools-sync-buildbot-integration-tests.js: Ditto.
2018-01-18 Ryosuke Niwa <rniwa@webkit.org>
Charts can be empty when values are all identical
https://bugs.webkit.org/show_bug.cgi?id=181828
Reviewed by Alexey Proskuryakov.
Fixed the bug that when SampleVarianceUpperTriangularMatrix can store -Infinity as the initial cost
of some entries when the sample standard deviation between two points turns out to be 0,
and cause splitIntoSegmentsUntilGoodEnough to return undefiend because no segmentation has a finite cost.
Also fixed the bug that the time series chart fails to show any data points when all data points have
identical values as the entire y-coordinate gets collapsed to an empty value range by adjusting the max value
when min & max values are identical.
* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype._ensureValueRangeCache): Raise the max slightly when min & max are identical
to avoid the chart becoming empty. Otherwise valueDiff in _computeVerticalRenderingMetrics becomes 0
and value-to-y-coordinate conversion always results in NaN.
* public/shared/statistics.js:
(Statistics..SampleVarianceUpperTriangularMatrix):
* unit-tests/statistics-tests.js: Added a test case.
2018-01-18 Ryosuke Niwa <rniwa@webkit.org>
Don't fetch more than two builds to check duplicity of builds in ReportProcessor
https://bugs.webkit.org/show_bug.cgi?id=181786
Reviewed by Wenson Hsieh.
Limit the number of builds to check to avoid using a lot of memory with a long delay.
* public/include/report-processor.php:
(ReportProcessor::resolve_build_id):
2018-01-17 Ryosuke Niwa <rniwa@webkit.org>
Rename config.json to config.json.sample
https://bugs.webkit.org/show_bug.cgi?id=181785
Reviewed by Wenson Hsieh.
* .gitignore: Added config.json.
* ReadMe.md: Updated the instruction.
* config.json.sample: Renamed from config.json.
2018-01-17 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed build fixes in TestGroupResultsViewer.
* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.render): _renderCurrentMetricsLazily was never called.
(TestGroupResultsViewer.prototype._buildRowForMetric): Don't try to render null or NaN.
2018-01-17 Ryosuke Niwa <rniwa@webkit.org>
Fix perf dashboard tests for node v8
https://bugs.webkit.org/show_bug.cgi?id=181782
Reviewed by Wenson Hsieh.
Fixed the various tests for node.js v8, which is the latest LTS version.
* server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests
after r226836.
* server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date
in node.js parses using the local timezone by default.
* server-tests/resources/test-server.js:
(TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.
* server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
* unit-tests/measurement-set-tests.js:
(waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.
2018-01-11 Ryosuke Niwa <rniwa@webkit.org>
Cannot trigger Dromaeo tests on internal perf try bots
https://bugs.webkit.org/show_bug.cgi?id=179712
Reviewed by Chris Dumez.
The bug was caused by CustomAnalysisTaskConfigurator only showing the top-level tests that are triggerable
instead of the list of highest level tests that are triggerable.
* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype.selectTests): Update the test group name when a new test is picked.
(CustomAnalysisTaskConfigurator.prototype.selectPlatform):
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Extracted from selectPlatform.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Include the list of all highest-level tests
which are triggerable.
(CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Added labelForObject which returns the label
to be used in the list items. For tests, we want to use the full name, not just its label.
* public/v3/models/analysis-task.js:
(AnalysisTask.fetchById):
* public/v3/models/triggerable.js:
(Triggerable.prototype.acceptedTests): Added.
(Triggerable.prototype.acceptsTest): Deleted.
== Rolled over to ChangeLog-2018-01-01 ==