[PATCH] [backend] broadcast both submitter and owner to fedmsg

Ralph Bean rbean at redhat.com
Wed Aug 27 23:01:01 UTC 2014


Back in commit 1a4473e7a4dc1adbff5868ae0395625bef78d17a, a change was
introduced that changed the 'user' field in fedmsg represent the person who
kicked off a build instead of the person who owned the particular copr.
This broke code in other fedmsg consumers that tried to build links from
that user field to https://copr.fedoraproject.org/$USER/$COPR

This change re-introduces the copr owner's username to the message.
---
 backend/backend/dispatcher.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backend/backend/dispatcher.py b/backend/backend/dispatcher.py
index 52777e9..45429d5 100644
--- a/backend/backend/dispatcher.py
+++ b/backend/backend/dispatcher.py
@@ -191,6 +191,7 @@ class Worker(multiprocessing.Process):
             " build:{build} ip:{ip}  pid:{pid}"
 
         content = dict(user=job.submitter, copr=job.project_name,
+                       owner=job.project_owner,
                        build=job.build_id, ip=ip, pid=self.pid)
         self.event("build.start", template, content)
 
@@ -198,6 +199,7 @@ class Worker(multiprocessing.Process):
             "copr:{copr} build:{build} ip:{ip}  pid:{pid}"
 
         content = dict(chroot=job.chroot, user=job.submitter,
+                       owner=job.project_owner,
                        copr=job.project_name, build=job.build_id,
                        ip=ip, pid=self.pid)
 
@@ -216,6 +218,7 @@ class Worker(multiprocessing.Process):
             " ip:{ip}  pid:{pid} status:{status}"
 
         content = dict(user=job.submitter, copr=job.project_name,
+                       owner=job.project_owner,
                        build=job.build_id, ip=ip, pid=self.pid,
                        status=job.status, chroot=job.chroot)
         self.event("build.end", template, content)
-- 
1.9.3



More information about the copr-devel mailing list