lab132 / buildbot-gitea

Buildbot plugin for integration with gitea.
MIT License
62 stars 21 forks source link

Handle any extra parameters to _fetch #28

Closed karolyi closed 2 years ago

karolyi commented 2 years ago

See this error coming from using the newest buildbot master:

Traceback (most recent call last):
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 700, in errback
    self._startRunCallbacks(fail)
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
    self._runCallbacks()
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
    current.result = callback(  # type: ignore[misc]
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1750, in gotResult
    current_context.run(_inlineCallbacks, r, gen, status)
--- <exception caught here> ---
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/buildbot/process/buildstep.py", line 486, in startStep
    self.results = yield self.run()
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/buildbot/steps/source/base.py", line 287, in run
    res = yield self.run_vc(branch, revision, patch)
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/buildbot/steps/source/git.py", line 141, in run_vc
    yield self._getAttrGroupMember('mode', self.mode)()
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1656, in _inlineCallbacks
    result = current_context.run(
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/python/failure.py", line 514, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/buildbot/steps/source/base.py", line 287, in run
    res = yield self.run_vc(branch, revision, patch)
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
    result = current_context.run(gen.send, result)
  File "/home/buildbot_master/venv/lib/python3.9/site-packages/buildbot/steps/source/git.py", line 141, in run_vc
    yield self._getAttrGroupMember('mode', self.mode)()
builtins.TypeError: _fetch() got an unexpected keyword argument 'abandonOnFailure'
waterimp commented 2 years ago

I I have been experiencing this bug too and I have created a bug here:

https://github.com/lab132/buildbot-gitea/issues/29

waterimp commented 2 years ago

I have patched my instance with this fix and can confirm that it works. Thanks!

I suggest we merge this.

pampersrocker commented 2 years ago

Thanks! Does anyone know when this changes to the original git fetch was introduced? Btw what buildbot Version do you use?

waterimp commented 2 years ago

@pampersrocker -

Here is the commit in bitbot that added the parameter: https://github.com/buildbot/buildbot/commit/b2cad8d2840a74455366ddc1db0bcf4fd199125c

And it looks like this change was part of the 3.6.0 release.

I reproduced the issue with buildbot version 3.6.0.

karolyi commented 2 years ago

So, can we merge this please?

pampersrocker commented 2 years ago

Thanks, I see the merge does not break any previous buildbot releases as it just adds the kwargs, so yes, this is easy to merge.

pampersrocker commented 2 years ago

Included in version v1.7.2: https://pypi.org/project/buildbot-gitea/1.7.2/