fedmsg publication

Miroslav Suchy msuchy at redhat.com
Tue Sep 24 07:47:57 UTC 2013


On 09/23/2013 05:52 PM, Ralph Bean wrote:
> I have a patch[1] here to add fedmsg[2] message publication to the
> copr backend.  It was written back in March of this year, but I just
> recently rebased it to apply against the current git HEAD.
>
> It will publish messages on the following topics:
>
> - build.start
> - build.end
> - chroot.start
> - worker.create
>
> If fedmsg is not installed or is misconfigured, it should run fine and
> just print messages that it is having trouble sending messages.
>
> In order to get fedmsg to actually work on our systems, I'll need to
> do some configuration in ansible/puppet to:
>
> - Add an /etc/fedmsg.d/ config to the copr backend node
> - Create and add copr certs for fedmsg.
> - Set up our production bus to receive messages from our cloud nodes.
>
> If you'll accept the patch to copr's source, I'd be glad to carry that
> out.

I like it. With few comments:

* variable "what" is now undefined. It was parameter of event(), you 
removed it, but you continue to use it.

* can you please add docstring to event(), which will explain the params?

* I would much rather see it driven by config. I.e.have in copr-be.conf:
    fedmsg_enabled=false
as default. And in this case use such code:

opts.fedmsg_enabled = _get_conf(cp, 'backend', 'fedmsg_enabled', False)
...
        try:
              if opts.fedmsg_enabled:
                fedmsg.init(name="relay_inbound", cert_prefix="copr", 
active=True)

which will neither fail nor emit log entries when fedmsg is not 
configured (by purpose).

* can you please add the new requires to copr.spec in root of copr.git?

Thanks for the work.

Mirek


More information about the copr-devel mailing list