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'.
Canonical link: https://commits.webkit.org/238151@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/236545@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Canonical link: https://commits.webkit.org/236004@main
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.
Canonical link: https://commits.webkit.org/235600@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/234983@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/234980@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/234979@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/234315@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/233165@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/232377@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/232274@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/231847@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/231628@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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._commitSetForOtherPlatformsInSameGroup):
Helper function to find measurment 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.
Canonical link: https://commits.webkit.org/230971@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/216901@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/216318@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/216007@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/215881@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/213907@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247770 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/213128@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/212973@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/212914@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/212153@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/210421@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243358 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/210023@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242933 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/208219@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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.
Canonical link: https://commits.webkit.org/208032@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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 update 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'.
Canonical link: https://commits.webkit.org/207523@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239485 268f45cc-cd09-0410-ab3c-d52691b4dbfc