RESOLVED FIXED 182218
Add support for submitting build request to Buildbot 0.9 server in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=182218
Summary Add support for submitting build request to Buildbot 0.9 server in BuildbotSy...
Aakash Jain
Reported 2018-01-27 11:54:26 PST
As part of supporting Buildbot 0.9, BuildbotSyncer should be able to submit build request to Buildbot 0.9 server.
Attachments
Proposed patch (7.63 KB, patch)
2018-01-27 12:01 PST, Aakash Jain
rniwa: review-
Updated patch with unit-test (15.93 KB, patch)
2018-02-02 14:09 PST, Aakash Jain
rniwa: review+
Aakash Jain
Comment 1 2018-01-27 12:01:24 PST
Created attachment 332479 [details] Proposed patch Created new scheduleRequest method and moved previous one to scheduleRequestDeprecated. Have some code duplication as scheduleRequestDeprecated will be simply deleted later on.
Ryosuke Niwa
Comment 2 2018-01-31 12:23:02 PST
Comment on attachment 332479 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=332479&action=review r- due to lack of testing. > Websites/perf.webkit.org/tools/js/buildbot-syncer.js:75 > + if (object.properties) > + this._forceScheduler = object.properties.forcescheduler; We need a test for this code change. > Websites/perf.webkit.org/tools/js/buildbot-syncer.js:138 > + const data = {jsonrpc: '2.0', method: 'force', id: properties[this._buildRequestPropertyName], params: properties}; > + return this._remote.postJSON(this.pathForForceBuild(), data); Ditto.
Aakash Jain
Comment 3 2018-02-02 14:09:33 PST
Created attachment 332999 [details] Updated patch with unit-test Added unit-tests. Also added assert to ensure forcescheduler property is always defined.
Ryosuke Niwa
Comment 4 2018-02-02 19:30:33 PST
Comment on attachment 332999 [details] Updated patch with unit-test View in context: https://bugs.webkit.org/attachment.cgi?id=332999&action=review > Websites/perf.webkit.org/tools/js/buildbot-syncer.js:143 > + assert(properties['forcescheduler'], "forcescheduler must be defined for builder: " + this._builderName + " in order to post a build request to Buildbot.") This is not an accurate error message. We must specify a forcebuilder for a given request, not a builder. Revise this to: `forcescheduler was not specified in buildbot properties for build request ${newRequest.id()} on platform "${newRequest.platform().name()}" for builder "${this.builderName()}"`; > Websites/perf.webkit.org/tools/js/buildbot-syncer.js:262 > + pathForForceBuild(scheduler) { return `/api/v2/forceschedulers/${scheduler}`; } This argument should be named schedulerName to signify the fact it's a string. > Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js:1620 > + it('should schedule a build request on Buildbot', () => { Use async. > Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js:1621 > + let syncer = BuildbotSyncer._loadConfig(MockRemoteAPI, sampleiOSConfig(), builderNameToIDMap())[0]; Use const. > Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js:1627 > + return waitForRequest.then(() => { Use await.
Aakash Jain
Comment 5 2018-02-05 09:15:01 PST
Radar WebKit Bug Importer
Comment 6 2018-02-05 09:15:32 PST
Note You need to log in before you can comment on or make changes to this bug.