Log Message
Rename commit_set_relationships to commit_set_items https://bugs.webkit.org/show_bug.cgi?id=171143
Reviewed by Joseph Pecoraro.
Renamed commit_set_relationships to commit_set_items. Also added commitset_patch_file in the preparation to add
the support for applying patches in custom test groups. To migrate an existing database, run:
```sql
BEGIN;
ALTER TABLE commit_set_relationships RENAME TO commit_set_items;
ALTER TABLE commit_set_items ADD COLUMN commitset_patch_file integer REFERENCES uploaded_files;
ALTER TABLE commit_set_items ADD CONSTRAINT commitset_with_patch_must_have_commit
CHECK (commitset_patch_file IS NULL OR commitset_commit IS NOT NULL);
END;
```
* init-database.sql:
* public/include/build-requests-fetcher.php:
* public/privileged-api/create-test-group.php:
* server-tests/resources/mock-data.js:
(MockData.addMockData):
(MockData.addMockTestGroupWithGitWebKit):
* tools/js/database.js:
Modified Paths
- trunk/Websites/perf.webkit.org/ChangeLog
- trunk/Websites/perf.webkit.org/init-database.sql
- trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php
- trunk/Websites/perf.webkit.org/public/privileged-api/create-test-group.php
- trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js
- trunk/Websites/perf.webkit.org/tools/js/database.js
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (215639 => 215640)
--- trunk/Websites/perf.webkit.org/ChangeLog 2017-04-21 21:28:22 UTC (rev 215639)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2017-04-21 21:31:06 UTC (rev 215640)
@@ -1,5 +1,32 @@
2017-04-21 Ryosuke Niwa <[email protected]>
+ Rename commit_set_relationships to commit_set_items
+ https://bugs.webkit.org/show_bug.cgi?id=171143
+
+ Reviewed by Joseph Pecoraro.
+
+ Renamed commit_set_relationships to commit_set_items. Also added commitset_patch_file in the preparation to add
+ the support for applying patches in custom test groups. To migrate an existing database, run:
+
+ ```sql
+ BEGIN;
+ ALTER TABLE commit_set_relationships RENAME TO commit_set_items;
+ ALTER TABLE commit_set_items ADD COLUMN commitset_patch_file integer REFERENCES uploaded_files;
+ ALTER TABLE commit_set_items ADD CONSTRAINT commitset_with_patch_must_have_commit
+ CHECK (commitset_patch_file IS NULL OR commitset_commit IS NOT NULL);
+ END;
+ ```
+
+ * init-database.sql:
+ * public/include/build-requests-fetcher.php:
+ * public/privileged-api/create-test-group.php:
+ * server-tests/resources/mock-data.js:
+ (MockData.addMockData):
+ (MockData.addMockTestGroupWithGitWebKit):
+ * tools/js/database.js:
+
+2017-04-21 Ryosuke Niwa <[email protected]>
+
Add the support for creating a custom test group in the analysis task page
Make it possible to create more custom test groups in the analysis task page
Modified: trunk/Websites/perf.webkit.org/init-database.sql (215639 => 215640)
--- trunk/Websites/perf.webkit.org/init-database.sql 2017-04-21 21:28:22 UTC (rev 215639)
+++ trunk/Websites/perf.webkit.org/init-database.sql 2017-04-21 21:31:06 UTC (rev 215640)
@@ -29,7 +29,7 @@
DROP TABLE IF EXISTS bugs CASCADE;
DROP TABLE IF EXISTS analysis_test_groups CASCADE;
DROP TABLE IF EXISTS commit_sets CASCADE;
-DROP TABLE IF EXISTS commit_set_relationships CASCADE;
+DROP TABLE IF EXISTS commit_set_items CASCADE;
DROP TABLE IF EXISTS build_requests CASCADE;
DROP TYPE IF EXISTS build_request_status_type CASCADE;
@@ -283,11 +283,13 @@
CREATE TABLE commit_sets (
commitset_id serial PRIMARY KEY);
-CREATE TABLE commit_set_relationships (
+CREATE TABLE commit_set_items (
commitset_set integer REFERENCES commit_sets NOT NULL,
commitset_commit integer REFERENCES commits,
+ commitset_patch_file integer REFERENCES uploaded_files,
commitset_root_file integer REFERENCES uploaded_files,
- CONSTRAINT commitset_must_have_commit_or_root CHECK (commitset_commit IS NOT NULL OR commitset_root_file IS NOT NULL));
+ CONSTRAINT commitset_must_have_commit_or_root CHECK (commitset_commit IS NOT NULL OR commitset_root_file IS NOT NULL),
+ CONSTRAINT commitset_with_patch_must_have_commit CHECK (commitset_patch_file IS NULL OR commitset_commit IS NOT NULL));
CREATE TYPE build_request_status_type as ENUM ('pending', 'scheduled', 'running', 'failed', 'completed', 'canceled');
CREATE TABLE build_requests (
Modified: trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php (215639 => 215640)
--- trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php 2017-04-21 21:28:22 UTC (rev 215639)
+++ trunk/Websites/perf.webkit.org/public/include/build-requests-fetcher.php 2017-04-21 21:31:06 UTC (rev 215640)
@@ -95,7 +95,7 @@
return;
$commit_rows = $this->db->query_and_fetch_all('SELECT *
- FROM commit_set_relationships LEFT OUTER JOIN commits ON commitset_commit = commit_id
+ FROM commit_set_items LEFT OUTER JOIN commits ON commitset_commit = commit_id
LEFT OUTER JOIN repositories ON repository_id = commit_repository
WHERE commitset_set = $1', array($commit_set_id));
Modified: trunk/Websites/perf.webkit.org/public/privileged-api/create-test-group.php (215639 => 215640)
--- trunk/Websites/perf.webkit.org/public/privileged-api/create-test-group.php 2017-04-21 21:28:22 UTC (rev 215639)
+++ trunk/Websites/perf.webkit.org/public/privileged-api/create-test-group.php 2017-04-21 21:31:06 UTC (rev 215640)
@@ -85,7 +85,7 @@
$commit_set_id = $db->insert_row('commit_sets', 'commitset', array());
foreach ($commit_list['set'] as $commit_row) {
$commit_row['set'] = $commit_set_id;
- $db->insert_row('commit_set_relationships', 'commitset', $commit_row, 'commit');
+ $db->insert_row('commit_set_items', 'commitset', $commit_row, 'commit');
}
array_push($configuration_list, array('commit_set' => $commit_set_id, 'repository_group' => $commit_list['repository_group']));
}
Modified: trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js (215639 => 215640)
--- trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js 2017-04-21 21:28:22 UTC (rev 215639)
+++ trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js 2017-04-21 21:31:06 UTC (rev 215640)
@@ -49,11 +49,11 @@
db.insert('test_configurations', {id: 302, metric: 300, platform: MockData.otherPlatformId(), type: 'current'}),
db.insert('test_runs', {id: 801, config: 301, build: 901, mean_cache: 100}),
db.insert('commit_sets', {id: 401}),
- db.insert('commit_set_relationships', {set: 401, commit: 87832}),
- db.insert('commit_set_relationships', {set: 401, commit: 93116}),
+ db.insert('commit_set_items', {set: 401, commit: 87832}),
+ db.insert('commit_set_items', {set: 401, commit: 93116}),
db.insert('commit_sets', {id: 402}),
- db.insert('commit_set_relationships', {set: 402, commit: 87832}),
- db.insert('commit_set_relationships', {set: 402, commit: 96336}),
+ db.insert('commit_set_items', {set: 402, commit: 87832}),
+ db.insert('commit_set_items', {set: 402, commit: 96336}),
db.insert('analysis_tasks', {id: 500, platform: 65, metric: 300, name: 'some task',
start_run: 801, start_run_time: '2015-10-27T12:05:27.1Z',
end_run: 801, end_run_time: '2015-10-27T12:05:27.1Z'}),
@@ -85,11 +85,11 @@
db.insert('commits', {id: 193116, repository: this.gitWebkitRepositoryId(), revision: '2ceda45d3cd63cde58d0dbf5767714e03d902e43', time: (new Date(1445945816878)).toISOString()}),
db.insert('commits', {id: 196336, repository: this.gitWebkitRepositoryId(), revision: '8e294365a452a89785d6536ca7f0fc8a95fa152d', time: (new Date(1448225325650)).toISOString()}),
db.insert('commit_sets', {id: 1401}),
- db.insert('commit_set_relationships', {set: 1401, commit: 87832}),
- db.insert('commit_set_relationships', {set: 1401, commit: 193116}),
+ db.insert('commit_set_items', {set: 1401, commit: 87832}),
+ db.insert('commit_set_items', {set: 1401, commit: 193116}),
db.insert('commit_sets', {id: 1402}),
- db.insert('commit_set_relationships', {set: 1402, commit: 87832}),
- db.insert('commit_set_relationships', {set: 1402, commit: 196336}),
+ db.insert('commit_set_items', {set: 1402, commit: 87832}),
+ db.insert('commit_set_items', {set: 1402, commit: 196336}),
db.insert('analysis_test_groups', {id: 1600, task: 500, name: 'test group with git'}),
db.insert('build_requests', {id: 1700, status: 'pending', triggerable: 1000, repository_group: 2002, platform: 65, test: 200, group: 1600, order: 0, commit_set: 1401}),
db.insert('build_requests', {id: 1701, status: 'pending', triggerable: 1000, repository_group: 2002, platform: 65, test: 200, group: 1600, order: 1, commit_set: 1402}),
Modified: trunk/Websites/perf.webkit.org/tools/js/database.js (215639 => 215640)
--- trunk/Websites/perf.webkit.org/tools/js/database.js 2017-04-21 21:28:22 UTC (rev 215639)
+++ trunk/Websites/perf.webkit.org/tools/js/database.js 2017-04-21 21:31:06 UTC (rev 215640)
@@ -151,7 +151,7 @@
'reports': 'report',
'repositories': 'repository',
'commit_sets': 'commitset',
- 'commit_set_relationships': 'commitset',
+ 'commit_set_items': 'commitset',
'run_iterations': 'iteration',
'uploaded_files': 'file',
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
