Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Update to support Buildbot 3+ #16

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zplizzi
Copy link

@zplizzi zplizzi commented Sep 27, 2021

Due to #13, this project no longer works with current version of buildbot. This PR includes a working version of this project that has been updated to address this issue - tested on buildbot 3.0.2.

However, I also changed some other stuff to get this working for the project I was working on, so it should be cleaned up and tested thoroughly before a merge. I don't have time to do that, but figured I would at least share it here in case it's helpful to anyone else. Anyone is welcome to take over this PR if they'd like.

Also, here's an example of a report (one of the objects in the reports list passed to sendMessage) for reference:

"""
{'body': 'Build done.',
 'subject': None,
 'type': 'plain',
 'builder_name': 'builder_fast_tests',
 'results': 0,
 'builds': [{'buildid': 1,
   'number': 1,
   'builderid': 2,
   'buildrequestid': 1,
   'workerid': 3,
   'masterid': 1,
   'started_at': datetime.datetime(2021, 9, 12, 2, 43, 54, tzinfo=tzutc()),
   'complete_at': datetime.datetime(2021, 9, 12, 2, 44, 19, tzinfo=tzutc()),
   'complete': True,
   'state_string': 'build successful',
   'results': 0,
   'properties': {'reason': ('force build', 'Force Build Form'),
    'owner': ('[email protected]', 'Force Build Form'),
    'scheduler': ('force', 'Scheduler'),
    'buildername': ('builder_fast_tests', 'Builder'),
    'workername': ('worker_fast_tests', 'Worker'),
    'buildnumber': (1, 'Build'),
    'branch': ('xxx/build_on_pr', 'Build'),
    'revision': ('', 'Build'),
    'repository': ('', 'Build'),
    'codebase': ('', 'Build'),
    'project': ('', 'Build'),
    'owners': (['[email protected]'], 'Build'),
    'builddir': ('/opt/buildbot/worker_fast_tests/builder_fast_tests',
     'Worker'),
    'got_revision': ('c62xxxxxxxxxxxxxc18', 'GitLab')},
   'buildrequest': {'buildrequestid': 1,
    'buildsetid': 1,
    'builderid': 2,
    'priority': 0,
    'claimed': True,
    'claimed_at': datetime.datetime(2021, 9, 12, 2, 43, 54, tzinfo=tzutc()),
    'claimed_by_masterid': 1,
    'complete': True,
    'results': 0,
    'submitted_at': datetime.datetime(2021, 9, 12, 2, 43, 54, tzinfo=tzutc()),
    'complete_at': datetime.datetime(2021, 9, 12, 2, 44, 19, tzinfo=tzutc()),
    'waited_for': False,
    'properties': None},
   'buildset': {'external_idstring': None,
    'reason': "A build was forced by '[email protected]': force build",
    'submitted_at': 1631414634,
    'complete': True,
    'complete_at': 1631414659,
    'results': 0,
    'bsid': 1,
    'sourcestamps': [{'ssid': 1,
      'branch': 'xxx/build_on_pr',
      'revision': '',
      'project': '',
      'repository': '',
      'codebase': '',
      'created_at': datetime.datetime(2021, 9, 12, 2, 43, 54, tzinfo=tzutc()),
      'patch': None}],
    'parent_buildid': None,
    'parent_relationship': None},
   'parentbuild': None,
   'parentbuilder': None,
   'builder': {'builderid': 2,
    'name': 'builder_fast_tests',
    'masterids': [1],
    'description': None,
    'tags': []},
   'url': 'http://localhost:8081/#builders/2/builds/1'}],
 'users': ['[email protected]'],
 'patches': [],
 'logs': []}

@swenghj
Copy link

swenghj commented Jun 9, 2022

@zplizzi thanks for fixing the issue with depreciated HttpStatusPushBase. I just updated reporter.py locally and try to run the buildbot. But I encountered an error complaining about the method which is not defined.

generators = self._create_default_generators()
. Could you look at this?

And I am also wondering when this PR will be merged and a new package will be released?

@maitza
Copy link

maitza commented Aug 23, 2022

Just fixed it by adding some imports and generators method. Created PR in @zplizzi fork #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants