#6612 RFE: enabling default Pagure fedmsg hooks at src.fedoraproject.org
Closed: Fixed 6 years ago Opened 6 years ago by clime.

Hello, would it be possible to have default pagure fedmsg hooks enabled (e.g. for "org.fedoraproject.prod.pagure.git.receive") side by side with the current DistGit hooks (e.g. "org.fedoraproject.prod.git.receive")? I know it would mean to have two events spawned for the same thing but personally I prefer the default pagure events that contain more info. Another reason is that it's then possible to implement one listener for both pagure.io events and src.fedoraproject.org events (and potentially other pagure instances) and treat messages from both the sources the same way (we do this in COPR and we currently need separate parsing logic for each fedmsg source, see https://pagure.io/copr/copr/blob/master/f/frontend/coprs_frontend/run/build_on_pagure_commit.py#_116).

Related bug report is: https://pagure.io/fedora-infrastructure/issue/6575


Note that the diff to do this is likely as simple as:

diff --git a/ inventory/group_vars/pkgs b/ inventory/group_vars/pkgs
index 37600819d..6e0c0e3df 100644
--- a/ inventory/group_vars/pkgs        
+++ b/ inventory/group_vars/pkgs        
@@ -71,6 +71,7 @@ fedmsg_certs:
   group: packager
   can_send:
   - git.receive
+  - pagure.git.receive
 - service: lookaside
   owner: root
   group: apache

From the discussion at the meeting today, it seems we may want the diff to be:

diff --git a/ inventory/group_vars/pkgs b/ inventory/group_vars/pkgs
index 37600819d..6e0c0e3df 100644
--- a/ inventory/group_vars/pkgs        
+++ b/ inventory/group_vars/pkgs        
@@ -71,6 +71,7 @@ fedmsg_certs:
   group: packager
   can_send:
   - git.receive
+  - pagure.git.receive
 - service: lookaside
   owner: root
   group: apache
diff --git a/ roles/pagure/frontend/templates/pagure.cfg b/ roles/pagure/frontend/templates/pagure.cfg
index dc72e1b0a..1a40f3650 100644
--- a/ roles/pagure/frontend/templates/pagure.cfg       
+++ b/ roles/pagure/frontend/templates/pagure.cfg       
@@ -283,6 +283,6 @@ CROSS_PROJECT_ACLS = [
     'issue_comment',
 ]

-BLACKLISTED_GROUPS = ['forks', 'group']
+BLACKLISTED_GROUPS = ['forks', 'group', 'rpms', 'modules', 'container', 'tests']

 GITOLITE_CELERY_QUEUE = 'gitolite_queue'

This other change having pros and cons.

I don't have enough insight into infrastructure to give a meaningful feedback about the blacklist but I think enabling the pagure events is worth it.

So it works but not entirely, the fedmsg message got sent but on #fedora-fedmsg I saw:
org.fedoraproject.prod.pagure.git.receive -- (invalid signature!)

Ok, so looks like the policy hasn't been updated for all hosts, running the master playbook with the fedmsgdpolicy tag :)

This is now running since Friday :)

Metadata Update from @pingou:
- Issue close_status updated to: Fixed

6 years ago

Login to comment on this ticket.

Metadata