Repository: buildbot/buildbot

Issue:
GitHubStatusPush failures in 2.9.0
Our build has been creating a GitHubStatusPush instance like so:

```
gs = reporters.GitHubStatusPush(token,
                                startDescription='Build started.',
                                endDescription='Build done.',
                                context=Interpolate("buildbot/%(prop:buildername)s"),
                                verbose=True,
                                builders=my_builder_list)
```

Under 2.8.4, this works fine; under 2.9.0, this now fails at parse time with

```
builtins.TypeError: checkConfig() got multiple values for argument 'startDescription'
```

... from eyeballing the docs (and also a cursory look at the code), I don't see what's wrong with the way our code has been calling this. Is it possible there's a glitch in the 2.9 release for this? (Or has our code just been getting lucky up to now?)




Discussion:

Resolving patch:
diff --git a/master/buildbot/reporters/github.py b/master/buildbot/reporters/github.py
--- a/master/buildbot/reporters/github.py
+++ b/master/buildbot/reporters/github.py
@@ -39,7 +39,7 @@
 class GitHubStatusPush(http.HttpStatusPushBase):
     name = "GitHubStatusPush"
 
-    def checkConfig(token, startDescription=None, endDescription=None,
+    def checkConfig(self, token, startDescription=None, endDescription=None,
                     context=None, baseURL=None, verbose=False, wantProperties=True, **kwargs):
         super().checkConfig(wantProperties=wantProperties,
                             _has_old_arg_names={
diff --git a/master/buildbot/reporters/gitlab.py b/master/buildbot/reporters/gitlab.py
--- a/master/buildbot/reporters/gitlab.py
+++ b/master/buildbot/reporters/gitlab.py
@@ -38,10 +38,11 @@
 class GitLabStatusPush(http.HttpStatusPushBase):
     name = "GitLabStatusPush"
 
-    def checkConfig(token, startDescription=None, endDescription=None,
+    def checkConfig(self, token, startDescription=None, endDescription=None,
                     context=None, baseURL=None, verbose=False, wantProperties=True, **kwargs):
         super().checkConfig(wantProperties=wantProperties,
                             _has_old_arg_names={
+                                'builders': False,
                                 'wantProperties': wantProperties is not True
                             }, **kwargs)
 


Test patch:
diff --git a/master/buildbot/test/unit/reporters/test_github.py b/master/buildbot/test/unit/reporters/test_github.py
--- a/master/buildbot/test/unit/reporters/test_github.py
+++ b/master/buildbot/test/unit/reporters/test_github.py
@@ -68,6 +68,14 @@ def createService(self):
     def tearDown(self):
         return self.master.stopService()
 
+    def test_check_config(self):
+        service = GitHubStatusPush(Interpolate('XXYYZZ'))
+        service.checkConfig(Interpolate('token'), startDescription=Interpolate('start'),
+                            endDescription=Interpolate('end'),
+                            context=Interpolate('context'),
+                            verbose=True,
+                            builders=['builder1'])
+
     @defer.inlineCallbacks
     def test_basic(self):
         build = yield self.insert_build_new()
diff --git a/master/buildbot/test/unit/reporters/test_gitlab.py b/master/buildbot/test/unit/reporters/test_gitlab.py
--- a/master/buildbot/test/unit/reporters/test_gitlab.py
+++ b/master/buildbot/test/unit/reporters/test_gitlab.py
@@ -61,6 +61,14 @@ def setUp(self):
     def tearDown(self):
         return self.master.stopService()
 
+    def test_check_config(self):
+        service = GitLabStatusPush(Interpolate('XXYYZZ'))
+        service.checkConfig(Interpolate('token'), startDescription=Interpolate('start'),
+                            endDescription=Interpolate('end'),
+                            context=Interpolate('context'),
+                            verbose=True,
+                            builders=['builder1'])
+
     @defer.inlineCallbacks
     def test_basic(self):
         build = yield self.insert_build_new()