Opened 5 years ago

Last modified 3 years ago

#3084 new enhancement

convert all services to BuildbotService

Reported by: tardyp Owned by:
Priority: major Milestone: 0.9.+
Version: master Keywords:
Cc:

Description (last modified by tardyp)

We have a bunch of services in buildbot each of them are deriving from different base

Goal of this meta task is to convert all of our services to BuildbotService? or ClusteredBuildbotService?. This will make the code easier to understand and maintain, all our services will be

  • async
  • reconfigurable
  • (multi) potentially a parent

The most tricky thing to do there is to move from reconfigService(new_config) which takes ConfigObject? in argument, and thus configured service must know where it is configured, to a reconfigService(*args, kwargs), which takes the constructor argument the service was configured.

Some pattern have been written in BuildbotService?, to handle the problem for user defined custom services, but this may not fit all the internal usecases (in buildbot everything is configured services)

Please don't resolve this bug directly, but create subtasks

Change History (8)

comment:1 Changed 5 years ago by tardyp

  • Description modified (diff)
  • Milestone changed from undecided to 0.9.+
  • Type changed from undecided to enhancement
  • Version changed from 0.8.9 to master

comment:2 Changed 5 years ago by Ben

Would this be a step toward remote reconfig of services ?

comment:3 Changed 5 years ago by tardyp

Would this be a step toward remote reconfig of services ?

This is not really the goal, but unifying the way of reconfiguring will indeed make thing less impossible.

The most complicated stuff for your request would be to send the python code for custom steps, and their dependancies.

If one does not use them, or synchronise them by other means, we could eventually think of serializing the config object, and send that through the wire.

comment:4 Changed 5 years ago by Ben

I know this is not the goal, I was just wondering ...

I'm still having in mind my architecture where one single 'arbiter' / 'supervisor' / 'you-name-it' would have the config, and would care about dispatching it to masters. In this case, no need to serialise / duplicate the config, just compile it once, and dispatch it to the right instances. config are code, but once compiled, they're pretty much static, which make that whole 'throwing over the wire' easier, or am I missing something ?

comment:5 Changed 5 years ago by Mikhail Sobolev <mss@…>

In d567123cb53617d82cd22c40cfde6a4f4d3badd9:

Merge pull request #1394 from tardyp/services

rename reconfigService() to reconfigServiceWithBuildbotConfig

See ticket:3084

comment:6 Changed 5 years ago by dustin

Ben, now that I think about it we could probably use some custom import hook magic to achieve that one-config thing you describe. And I think it could be done in the configuration file itself, not in Buildbot. We'd have to use some synchronous mechanism (not Twisted) to fetch Python code, but that's not hard - python-requests could probably do it. Anyway, can you open up a bug?

comment:7 Changed 5 years ago by Ben

Dustin, good idea, see #3093.

Note: See TracTickets for help on using tickets.