Log Message
Remove deprecated Buildbot 0.8 code from Perf syncing scripts https://bugs.webkit.org/show_bug.cgi?id=183915
Reviewed by Ryosuke Niwa. * server-tests/resources/mock-data.js: (MockData.buildbotBuildersURLDeprecated): Deleted. (MockData.mockBuildbotBuildersDeprecated): Deleted. (MockData.pendingBuildDeprecated): Deleted. (MockData.runningBuildDeprecated): Deleted. (MockData.finishedBuildDeprecated): Deleted. * tools/js/buildbot-syncer.js: (BuildbotBuildEntryDeprecated): Deleted. (BuildbotBuildEntryDeprecated.prototype.initialize): Deleted. (BuildbotBuildEntryDeprecated.prototype.url): Deleted. (BuildbotSyncer.prototype.scheduleBuildOnBuildbotDeprecated): Deleted. (BuildbotSyncer.prototype._pullRecentBuildsDeprecated): Deleted. (BuildbotSyncer.prototype.pathForPendingBuildsJSONDeprecated): Deleted. (BuildbotSyncer.prototype.pathForBuildJSONDeprecated): Deleted. (BuildbotSyncer.prototype.pathForForceBuildDeprecated): Deleted. (BuildbotSyncer.prototype.url): Deleted. (BuildbotSyncer.prototype.urlForBuildNumberDeprecated): Deleted. * tools/js/buildbot-triggerable.js: (BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Deleted. * unit-tests/buildbot-syncer-tests.js: (smallPendingBuildDeprecated): Deleted. (smallInProgressBuildDeprecated): Deleted. (smallFinishedBuildDeprecated): Deleted. (samplePendingBuildRequestDeprecated): Deleted. (sampleInProgressBuildDeprecated): Deleted. (sampleFinishedBuildDeprecated): Deleted.
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (230150 => 230151)
--- trunk/Websites/perf.webkit.org/ChangeLog 2018-04-02 07:51:17 UTC (rev 230150)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2018-04-02 09:09:08 UTC (rev 230151)
@@ -1,3 +1,37 @@
+2018-04-02 Aakash Jain <[email protected]>
+
+ Remove deprecated Buildbot 0.8 code from Perf syncing scripts
+ https://bugs.webkit.org/show_bug.cgi?id=183915
+
+ Reviewed by Ryosuke Niwa.
+
+ * server-tests/resources/mock-data.js:
+ (MockData.buildbotBuildersURLDeprecated): Deleted.
+ (MockData.mockBuildbotBuildersDeprecated): Deleted.
+ (MockData.pendingBuildDeprecated): Deleted.
+ (MockData.runningBuildDeprecated): Deleted.
+ (MockData.finishedBuildDeprecated): Deleted.
+ * tools/js/buildbot-syncer.js:
+ (BuildbotBuildEntryDeprecated): Deleted.
+ (BuildbotBuildEntryDeprecated.prototype.initialize): Deleted.
+ (BuildbotBuildEntryDeprecated.prototype.url): Deleted.
+ (BuildbotSyncer.prototype.scheduleBuildOnBuildbotDeprecated): Deleted.
+ (BuildbotSyncer.prototype._pullRecentBuildsDeprecated): Deleted.
+ (BuildbotSyncer.prototype.pathForPendingBuildsJSONDeprecated): Deleted.
+ (BuildbotSyncer.prototype.pathForBuildJSONDeprecated): Deleted.
+ (BuildbotSyncer.prototype.pathForForceBuildDeprecated): Deleted.
+ (BuildbotSyncer.prototype.url): Deleted.
+ (BuildbotSyncer.prototype.urlForBuildNumberDeprecated): Deleted.
+ * tools/js/buildbot-triggerable.js:
+ (BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Deleted.
+ * unit-tests/buildbot-syncer-tests.js:
+ (smallPendingBuildDeprecated): Deleted.
+ (smallInProgressBuildDeprecated): Deleted.
+ (smallFinishedBuildDeprecated): Deleted.
+ (samplePendingBuildRequestDeprecated): Deleted.
+ (sampleInProgressBuildDeprecated): Deleted.
+ (sampleFinishedBuildDeprecated): Deleted.
+
2018-03-19 Aakash Jain <[email protected]>
Update Perf buildbot syncing scripts for Buildbot 0.9
Modified: trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js (230150 => 230151)
--- trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js 2018-04-02 07:51:17 UTC (rev 230150)
+++ trunk/Websites/perf.webkit.org/server-tests/resources/mock-data.js 2018-04-02 09:09:08 UTC (rev 230151)
@@ -17,7 +17,6 @@
jscRepositoryId() { return 222; },
gitWebkitRepositoryId() { return 111; },
sharedRepositoryId() { return 14; },
- buildbotBuildersURLDeprecated() {return '/json/builders'},
buildbotBuildersURL() {return '/api/v2/builders'},
pendingBuildsUrl: function (builderName) {
const builderId = this.builderIDForName(builderName);
@@ -251,29 +250,6 @@
]
}
},
- mockBuildbotBuildersDeprecated: function ()
- {
- return {
- "some builder": {
- "slaves": [ "some-slave-1" ]
- },
- "some-builder-1": {
- "slaves": [ "some-slave-2" ]
- },
- "some builder 2": {
- "slaves": [ "some-slave-3" ]
- },
- "other builder": {
- "slaves": [ "some-slave-4" ]
- },
- "some tester": {
- "slaves": [ "some-slave-5" ]
- },
- "another tester": {
- "slaves": [ "some-slave-6" ]
- }
- }
- },
mockBuildbotBuilders: function ()
{
return {
@@ -345,28 +321,6 @@
"buildrequests": [this.pendingBuildData(options)]
};
},
- pendingBuildDeprecated(options)
- {
- options = options || {};
- return {
- 'builderName': options.builder || 'some-builder-1',
- 'builds': [],
- 'properties': [
- ['wk', options.webkitRevision || '191622'],
- ['os', options.osxRevision || '10.11 15A284'],
- ['build-request-id', (options.buildRequestId || 702).toString(), ]
- ],
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'WebKit',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- };
- },
sampleBuildData(options, overrides)
{
options = options || {};
@@ -405,31 +359,6 @@
"builds": [this.runningBuildData(options)]
};
},
- runningBuildDeprecated(options)
- {
- options = options || {};
- return {
- 'builderName': options.builder || 'some-builder-1',
- 'builds': [],
- 'properties': [
- ['wk', options.webkitRevision || '192736'],
- ['os', options.osxRevision || '10.11 15A284'],
- ['build-request-id', (options.buildRequestId || 701).toString(), ]
- ],
- 'currentStep': {},
- 'eta': 721,
- 'number': options.buildNumber || 124,
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'WebKit',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- };
- },
finishedBuildData(options)
{
options = options || {};
@@ -446,32 +375,6 @@
return {
"builds": [this.finishedBuildData(options)]
};
- },
- finishedBuildDeprecated(options)
- {
- options = options || {};
- return {
- 'builderName': options.builder || 'some-builder-1',
- 'builds': [],
- 'properties': [
- ['wk', options.webkitRevision || '191622'],
- ['os', options.osxRevision || '10.11 15A284'],
- ['build-request-id', (options.buildRequestId || 700).toString(), ]
- ],
- 'currentStep': null,
- 'eta': null,
- 'number': options.buildNumber || 123,
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'WebKit',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- 'times': [0, 1],
- };
}
}
Modified: trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js (230150 => 230151)
--- trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js 2018-04-02 07:51:17 UTC (rev 230150)
+++ trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js 2018-04-02 09:09:08 UTC (rev 230151)
@@ -54,40 +54,7 @@
}
}
-class BuildbotBuildEntryDeprecated extends BuildbotBuildEntry {
- constructor(syncer, rawData)
- {
- super(syncer, rawData);
- this.initialize(syncer, rawData);
- }
- initialize(syncer, rawData)
- {
- assert.equal(syncer.builderName(), rawData['builderName']);
-
- this._syncer = syncer;
- this._workerName = null;
- this._buildRequestId = null;
- this._buildNumber = rawData['number'];
- this._isInProgress = rawData['currentStep'] || (rawData['times'] && !rawData['times'][1]);
- this._isPending = typeof(this._buildNumber) != 'number';
- this._hasFinished = !this.isPending() && !this.isInProgress();
-
- for (let propertyTuple of (rawData['properties'] || [])) {
- // e.g. ['build_request_id', '16733', 'Force Build Form']
- const name = propertyTuple[0];
- const value = propertyTuple[1];
- if (name == syncer._slavePropertyName)
- this._workerName = value;
- else if (name == syncer._buildRequestPropertyName)
- this._buildRequestId = value;
- }
- }
-
- url() { return this.isPending() ? this._syncer.url() : this._syncer.urlForBuildNumberDeprecated(this._buildNumber); }
-}
-
-
class BuildbotSyncer {
constructor(remote, object, commonConfigurations)
@@ -154,11 +121,6 @@
return this.scheduleBuildOnBuildbot(properties);
}
- scheduleBuildOnBuildbotDeprecated(properties)
- {
- return this._remote.postFormUrlencodedData(this.pathForForceBuildDeprecated(), properties);
- }
-
scheduleBuildOnBuildbot(properties)
{
const data = "" '2.0', method: 'force', id: properties[this._buildRequestPropertyName], params: properties};
@@ -234,26 +196,6 @@
});
}
- _pullRecentBuildsDeprecated(count)
- {
- if (!count)
- return Promise.resolve([]);
-
- let selectedBuilds = new Array(count);
- for (let i = 0; i < count; i++)
- selectedBuilds[i] = -i - 1;
-
- return this._remote.getJSON(this.pathForBuildJSONDeprecated(selectedBuilds)).then((content) => {
- const entries = [];
- for (let index of selectedBuilds) {
- const entry = content[index];
- if (entry && !entry['error'])
- entries.push(new BuildbotBuildEntryDeprecated(this, entry));
- }
- return entries;
- });
- }
-
_pullRecentBuilds(count)
{
if (!count)
@@ -266,18 +208,10 @@
});
}
- pathForPendingBuildsJSONDeprecated() { return `/json/builders/${escape(this._builderName)}/pendingBuilds`; }
pathForPendingBuilds() { return `/api/v2/builders/${this._builderID}/buildrequests?complete=false&claimed=false&property=*`; }
- pathForBuildJSONDeprecated(selectedBuilds)
- {
- return `/json/builders/${escape(this._builderName)}/builds/?` + selectedBuilds.map((number) => 'select=' + number).join('&');
- }
pathForRecentBuilds(count) { return `/api/v2/builders/${this._builderID}/builds?limit=${count}&order=-number&property=*`; }
- pathForForceBuildDeprecated() { return `/builders/${escape(this._builderName)}/force`; }
pathForForceBuild(schedulerName) { return `/api/v2/forceschedulers/${schedulerName}`; }
- url() { return this._remote.url(`/builders/${escape(this._builderName)}/`); }
- urlForBuildNumberDeprecated(number) { return this._remote.url(`/builders/${escape(this._builderName)}/builds/${number}`); }
urlForBuildNumber(number) { return this._remote.url(`/#/builders/${this._builderID}/builds/${number}`); }
urlForPendingBuild(buildRequestId) { return this._remote.url(`/#/buildrequests/${buildRequestId}`); }
@@ -652,5 +586,4 @@
if (typeof module != 'undefined') {
module.exports.BuildbotSyncer = BuildbotSyncer;
module.exports.BuildbotBuildEntry = BuildbotBuildEntry;
- module.exports.BuildbotBuildEntryDeprecated = BuildbotBuildEntryDeprecated;
}
Modified: trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js (230150 => 230151)
--- trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js 2018-04-02 07:51:17 UTC (rev 230150)
+++ trunk/Websites/perf.webkit.org/tools/js/buildbot-triggerable.js 2018-04-02 09:09:08 UTC (rev 230151)
@@ -27,7 +27,6 @@
this._logger = logger || {log: () => { }, error: () => { }};
}
- // This method handles Buildbot 0.9 data format
getBuilderNameToIDMap()
{
return this._buildbotRemote.getJSON("/api/v2/builders").then((content) => {
@@ -41,18 +40,6 @@
});
}
- // This method handles Buildbot 0.8 data format
- getBuilderNameToIDMapDeprecated()
- {
- return this._buildbotRemote.getJSON("/json/builders").then((content) => {
- const builderNameToIDMap = {};
- for (let builder in content)
- builderNameToIDMap[builder] = builder;
-
- return builderNameToIDMap;
- });
- }
-
initSyncers()
{
return this.getBuilderNameToIDMap().then((builderNameToIDMap) => {
Modified: trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js (230150 => 230151)
--- trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js 2018-04-02 07:51:17 UTC (rev 230150)
+++ trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js 2018-04-02 09:09:08 UTC (rev 230151)
@@ -7,7 +7,6 @@
let MockModels = require('./resources/mock-v3-models.js').MockModels;
let BuildbotBuildEntry = require('../tools/js/buildbot-syncer.js').BuildbotBuildEntry;
-let BuildbotBuildEntryDeprecated = require('../tools/js/buildbot-syncer.js').BuildbotBuildEntryDeprecated;
let BuildbotSyncer = require('../tools/js/buildbot-syncer.js').BuildbotSyncer;
function sampleiOSConfig()
@@ -163,77 +162,16 @@
return samplePendingBuildRequests(null, null, null, "some builder");
}
-function smallPendingBuildDeprecated()
-{
- return {
- 'builderName': 'some builder',
- 'builds': [],
- 'properties': [],
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'WebKit',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- };
-}
-
function smallInProgressBuild()
{
return sampleInProgressBuild();
}
-function smallInProgressBuildDeprecated()
-{
- return {
- 'builderName': 'some builder',
- 'builds': [],
- 'properties': [],
- 'currentStep': { },
- 'eta': 123,
- 'number': 456,
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'WebKit',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- };
-}
-
function smallFinishedBuild()
{
return sampleFinishedBuild(null, null, "some builder");
}
-function smallFinishedBuildDeprecated()
-{
- return {
- 'builderName': 'some builder',
- 'builds': [],
- 'properties': [],
- 'currentStep': null,
- 'eta': null,
- 'number': 789,
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'WebKit',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- 'times': [0, 1],
- };
-}
-
function createSampleBuildRequest(platform, test)
{
assert(platform instanceof Platform);
@@ -391,197 +329,6 @@
};
}
-function samplePendingBuildRequestDeprecated(buildRequestId, buildTime, slaveName)
-{
- return {
- 'builderName': 'ABTest-iPad-RunBenchmark-Tests',
- 'builds': [],
- 'properties': [
- ['build_request_id', buildRequestId || '16733', 'Force Build Form'],
- ['desired_image', '13A452', 'Force Build Form'],
- ['owner', '<unknown>', 'Force Build Form'],
- ['test_name', 'speedometer', 'Force Build Form'],
- ['reason', 'force build','Force Build Form'],
- ['slavename', slaveName, ''],
- ['scheduler', 'ABTest-iPad-RunBenchmark-Tests-ForceScheduler', 'Scheduler']
- ],
- 'source': {
- 'branch': '',
- 'changes': [],
- 'codebase': 'compiler-rt',
- 'hasPatch': false,
- 'project': '',
- 'repository': '',
- 'revision': ''
- },
- 'submittedAt': buildTime || 1458704983
- };
-}
-
-function sampleInProgressBuildDeprecated(slaveName)
-{
- return {
- 'blame': [],
- 'builderName': 'ABTest-iPad-RunBenchmark-Tests',
- 'currentStep': {
- 'eta': 0.26548067698460565,
- 'expectations': [['output', 845, 1315.0]],
- 'hidden': false,
- 'isFinished': false,
- 'isStarted': true,
- 'logs': [['stdio', 'https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/614/steps/Some%20step/logs/stdio']],
- 'name': 'Some step',
- 'results': [null,[]],
- 'statistics': {},
- 'step_number': 1,
- 'text': [''],
- 'times': [1458718657.581628, null],
- 'urls': {}
- },
- 'eta': 6497.991612434387,
- 'logs': [['stdio','https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/614/steps/shell/logs/stdio']],
- 'number': 614,
- 'properties': [
- ['build_request_id', '16733', 'Force Build Form'],
- ['buildername', 'ABTest-iPad-RunBenchmark-Tests', 'Builder'],
- ['buildnumber', 614, 'Build'],
- ['desired_image', '13A452', 'Force Build Form'],
- ['owner', '<unknown>', 'Force Build Form'],
- ['reason', 'force build', 'Force Build Form'],
- ['scheduler', 'ABTest-iPad-RunBenchmark-Tests-ForceScheduler', 'Scheduler'],
- ['slavename', slaveName || 'ABTest-iPad-0', 'BuildSlave'],
- ],
- 'reason': 'A build was forced by \'<unknown>\': force build',
- 'results': null,
- 'slave': 'ABTest-iPad-0',
- 'sourceStamps': [{'branch': '', 'changes': [], 'codebase': 'compiler-rt', 'hasPatch': false, 'project': '', 'repository': '', 'revision': ''}],
- 'steps': [
- {
- 'eta': null,
- 'expectations': [['output',2309,2309.0]],
- 'hidden': false,
- 'isFinished': true,
- 'isStarted': true,
- 'logs': [['stdio', 'https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/614/steps/shell/logs/stdio']],
- 'name': 'Finished step',
- 'results': [0, []],
- 'statistics': {},
- 'step_number': 0,
- 'text': [''],
- 'times': [1458718655.419865, 1458718655.453633],
- 'urls': {}
- },
- {
- 'eta': 0.26548067698460565,
- 'expectations': [['output', 845, 1315.0]],
- 'hidden': false,
- 'isFinished': false,
- 'isStarted': true,
- 'logs': [['stdio', 'https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/614/steps/Some%20step/logs/stdio']],
- 'name': 'Some step',
- 'results': [null,[]],
- 'statistics': {},
- 'step_number': 1,
- 'text': [''],
- 'times': [1458718657.581628, null],
- 'urls': {}
- },
- {
- 'eta': null,
- 'expectations': [['output', null, null]],
- 'hidden': false,
- 'isFinished': false,
- 'isStarted': false,
- 'logs': [],
- 'name': 'Some other step',
- 'results': [null, []],
- 'statistics': {},
- 'step_number': 2,
- 'text': [],
- 'times': [null, null],
- 'urls': {}
- },
- ],
- 'text': [],
- 'times': [1458718655.415821, null]
- };
-}
-
-function sampleFinishedBuildDeprecated(buildRequestId, slaveName)
-{
- return {
- 'blame': [],
- 'builderName': 'ABTest-iPad-RunBenchmark-Tests',
- 'currentStep': null,
- 'eta': null,
- 'logs': [['stdio','https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/1755/steps/shell/logs/stdio']],
- 'number': 1755,
- 'properties': [
- ['build_request_id', buildRequestId || '18935', 'Force Build Form'],
- ['buildername', 'ABTest-iPad-RunBenchmark-Tests', 'Builder'],
- ['buildnumber', 1755, 'Build'],
- ['desired_image', '13A452', 'Force Build Form'],
- ['owner', '<unknown>', 'Force Build Form'],
- ['reason', 'force build', 'Force Build Form'],
- ['scheduler', 'ABTest-iPad-RunBenchmark-Tests-ForceScheduler', 'Scheduler'],
- ['slavename', slaveName || 'ABTest-iPad-0', 'BuildSlave'],
- ],
- 'reason': 'A build was forced by \'<unknown>\': force build',
- 'results': 2,
- 'slave': 'ABTest-iPad-0',
- 'sourceStamps': [{'branch': '', 'changes': [], 'codebase': 'compiler-rt', 'hasPatch': false, 'project': '', 'repository': '', 'revision': ''}],
- 'steps': [
- {
- 'eta': null,
- 'expectations': [['output',2309,2309.0]],
- 'hidden': false,
- 'isFinished': true,
- 'isStarted': true,
- 'logs': [['stdio', 'https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/614/steps/shell/logs/stdio']],
- 'name': 'Finished step',
- 'results': [0, []],
- 'statistics': {},
- 'step_number': 0,
- 'text': [''],
- 'times': [1458718655.419865, 1458718655.453633],
- 'urls': {}
- },
- {
- 'eta': null,
- 'expectations': [['output', 845, 1315.0]],
- 'hidden': false,
- 'isFinished': true,
- 'isStarted': true,
- 'logs': [['stdio', 'https://build.webkit.org/builders/ABTest-iPad-RunBenchmark-Tests/builds/614/steps/Some%20step/logs/stdio']],
- 'name': 'Some step',
- 'results': [null,[]],
- 'statistics': {},
- 'step_number': 1,
- 'text': [''],
- 'times': [1458718657.581628, null],
- 'urls': {}
- },
- {
- 'eta': null,
- 'expectations': [['output', null, null]],
- 'hidden': false,
- 'isFinished': true,
- 'isStarted': true,
- 'logs': [],
- 'name': 'Some other step',
- 'results': [null, []],
- 'statistics': {},
- 'step_number': 2,
- 'text': [],
- 'times': [null, null],
- 'urls': {}
- },
- ],
- 'text': [],
- 'times': [1458937478.25837, 1458946147.173785]
- };
-}
-
describe('BuildbotSyncer', () => {
MockModels.inject();
let requests = MockRemoteAPI.inject('http://build.webkit.org');
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
