Repository: buildbot/buildbot

Issue:
Can't start Buildbot master
Ansible updated buildbot.buildbot.net to the latest commit (81d1179e5a) and it quickly gets this in `twisted.log`
```
2021-05-15 02:23:55+0000 [-] while starting BuildMaster
        Traceback (most recent call last):
        --- <exception caught here> ---
          File "/usr/home/bbuser/buildbot/master/buildbot/master.py", line 300, in startService
            yield self.reconfigServiceWithBuildbotConfig(self.config)
          File "/usr/home/bbuser/buildbot/master/buildbot/util/service.py", line 49, in reconfigServiceW
ithBuildbotConfig
            yield svc.reconfigServiceWithBuildbotConfig(new_config)
          File "/usr/home/bbuser/buildbot/master/buildbot/process/measured_service.py", line 31, in reco
nfigServiceWithBuildbotConfig
            yield super().reconfigServiceWithBuildbotConfig(new_config)
          File "/usr/home/bbuser/buildbot/master/buildbot/util/service.py", line 507, in reconfigService
WithBuildbotConfig
            yield child.setServiceParent(self)
          File "/usr/home/bbuser/buildbot/master/buildbot/util/service.py", line 64, in setServiceParent
            yield self.parent.addService(self)
          File "/usr/home/bbuser/buildbot/master/buildbot/worker/base.py", line 262, in startService
            yield super().startService()
          File "/usr/home/bbuser/buildbot/master/buildbot/util/service.py", line 244, in startService
            yield super().startService()
        twisted.internet.defer.FirstError: FirstError[#0, [Failure instance: Traceback: <class 'TypeError'>: __init__() takes 2 positional arguments but 3 were given
        /usr/home/bbuser/buildbot/master/buildbot/util/service.py:94:startService
        /home/bbuser/venv/lib/python3.6/site-packages/twisted/internet/defer.py:151:maybeDeferred
        /home/bbuser/venv/lib/python3.6/site-packages/twisted/internet/defer.py:1613:unwindGenerator
        /home/bbuser/venv/lib/python3.6/site-packages/twisted/internet/defer.py:1529:_cancellableInlineCallbacks
        --- <exception caught here> ---
        /home/bbuser/venv/lib/python3.6/site-packages/twisted/internet/defer.py:1418:_inlineCallbacks
        /home/bbuser/venv/lib/python3.6/site-packages/buildbot_worker/null.py:34:startService
        ]]
```

I reset to the previous merge, 1b16975313, and now it runs fine.


Discussion:

Resolving patch:
diff --git a/master/buildbot/worker/protocols/null.py b/master/buildbot/worker/protocols/null.py
--- a/master/buildbot/worker/protocols/null.py
+++ b/master/buildbot/worker/protocols/null.py
@@ -18,6 +18,7 @@
 from twisted.python import log
 
 from buildbot.util.eventual import fireEventually
+from buildbot.warnings import warn_deprecated
 from buildbot.worker.protocols import base
 
 
@@ -69,7 +70,15 @@ class Connection(base.Connection):
     proxies = {base.FileWriterImpl: FileWriterProxy,
                base.FileReaderImpl: FileReaderProxy}
 
-    def __init__(self, worker):
+    def __init__(self, master_or_worker, worker=None):
+        # All the existing code passes just the name to the Connection, however we'll need to
+        # support an older versions of buildbot-worker using two parameter signature for some time.
+        if worker is None:
+            worker = master_or_worker
+        else:
+            warn_deprecated('3.2.0', 'LocalWorker: Using different version of buildbot-worker ' +
+                            'than buildbot is not supported')
+
         super().__init__(worker.workername)
         self.worker = worker
 


Test patch: