haikuwebkit/Websites/perf.webkit.org/migrate-database.sql

49 lines
2.6 KiB
MySQL
Raw Permalink Normal View History

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: Canonical link: https://commits.webkit.org/216795@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-24 22:00:37 +00:00
DO $$
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. Canonical link: https://commits.webkit.org/215881@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-27 22:45:12 +00:00
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: Canonical link: https://commits.webkit.org/216795@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-24 22:00:37 +00:00
BEGIN
[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'. Canonical link: https://commits.webkit.org/238151@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-26 01:23:22 +00:00
IF NOT EXISTS (SELECT NULL FROM pg_type WHERE typname = 'analysis_test_group_repetition_type') THEN
CREATE TYPE analysis_test_group_repetition_type as ENUM ('alternating', 'sequential');
END IF;
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. Canonical link: https://commits.webkit.org/215881@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-27 22:45:12 +00:00
ALTER TABLE build_requests ADD COLUMN IF NOT EXISTS request_status_description varchar(1024) DEFAULT NULL;
ALTER TABLE platforms ADD COLUMN IF NOT EXISTS platform_group integer REFERENCES platform_groups DEFAULT NULL;
ALTER TABLE commits ADD COLUMN IF NOT EXISTS commit_revision_identifier varchar(64) DEFAULT NULL;
[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'. Canonical link: https://commits.webkit.org/238151@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-26 01:23:22 +00:00
ALTER TABLE analysis_test_groups ADD COLUMN IF NOT EXISTS testgroup_repetition_type analysis_test_group_repetition_type NOT NULL DEFAULT 'alternating';
ALTER TABLE commits DROP CONSTRAINT IF EXISTS commit_string_identifier_in_repository_must_be_unique;
ALTER TABLE commits ADD CONSTRAINT commit_string_identifier_in_repository_must_be_unique UNIQUE(commit_repository, commit_revision_identifier);
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._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
2020-10-28 01:00:35 +00:00
IF EXISTS (SELECT NULL FROM information_schema.columns WHERE TABLE_NAME = 'commits' AND COLUMN_NAME = 'commit_order' AND DATA_TYPE = 'integer') THEN
ALTER TABLE commits ALTER commit_order TYPE bigint;
END IF;
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._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
2020-10-28 01:00:35 +00:00
CREATE TABLE IF NOT EXISTS platform_groups (
platformgroup_id serial PRIMARY KEY,
platformgroup_name varchar(64) NOT NULL,
CONSTRAINT platform_group_name_must_be_unique UNIQUE (platformgroup_name));
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. Canonical link: https://commits.webkit.org/215881@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-27 22:45:12 +00:00
[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: Canonical link: https://commits.webkit.org/235601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 21:23:38 +00:00
ALTER TABLE platforms ADD COLUMN IF NOT EXISTS platform_group integer REFERENCES platform_groups DEFAULT NULL;
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: Canonical link: https://commits.webkit.org/216795@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-24 22:00:37 +00:00
IF EXISTS (SELECT NULL FROM information_schema.columns WHERE TABLE_NAME = 'builds' AND COLUMN_NAME = 'build_number') THEN
ALTER TABLE builds ALTER build_number TYPE varchar(64);
ALTER TABLE builds RENAME build_number TO build_tag;
ALTER TABLE builds DROP CONSTRAINT builder_build_time_tuple_must_be_unique;
ALTER TABLE builds ADD CONSTRAINT builder_build_time_tuple_must_be_unique UNIQUE(build_builder, build_tag, build_time);
END IF;
[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: Canonical link: https://commits.webkit.org/235601@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-22 21:23:38 +00:00
IF EXISTS (SELECT NULL FROM information_schema.columns WHERE TABLE_NAME = 'builds' AND COLUMN_NAME = 'build_slave') THEN
ALTER TABLE builds RENAME build_slave TO build_worker;
END IF;
IF EXISTS (SELECT NULL FROM information_schema.columns WHERE TABLE_NAME = 'reports' AND COLUMN_NAME = 'report_slave') THEN
ALTER TABLE reports RENAME report_slave TO report_worker;
END IF;
IF EXISTS (SELECT NULL FROM information_schema.columns WHERE TABLE_NAME = 'build_slaves') THEN
ALTER TABLE build_slaves RENAME slave_id TO worker_id;
ALTER TABLE build_slaves RENAME slave_name TO worker_name;
ALTER TABLE build_slaves RENAME slave_password_hash TO worker_password_hash;
ALTER TABLE build_slaves RENAME TO build_workers;
END IF;
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: Canonical link: https://commits.webkit.org/216795@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-10-24 22:00:37 +00:00
END$$;