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.
Canonical link: https://commits.webkit.org/239837@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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=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):
Canonical link: https://commits.webkit.org/238034@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/237491@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277220 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=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.
Canonical link: https://commits.webkit.org/234982@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274046 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=221943
Patch by Dean Johnson <dean_johnson@apple.com> on 2021-02-16
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):
Canonical link: https://commits.webkit.org/234174@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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):
Canonical link: https://commits.webkit.org/234050@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=221712
Patch by Roy Reapor <rreapor@apple.com> on 2021-02-12
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.
Canonical link: https://commits.webkit.org/234049@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272813 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=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'.
Canonical link: https://commits.webkit.org/231849@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270140 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=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.
Canonical link: https://commits.webkit.org/231645@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269892 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