On 2012-05-05 09:15:16 (+0200), Klaas Freitag
On 04.05.2012 20:39, Pascal Bleser wrote:
I need some help/insight on the notification system in OBS. I wrote a tiny perl module as a notification plugin to replace Hermes (we only have very modest needs for notifications at Packman, Hermes is both overkill and barely documented). You probably know http://en.opensuse.org/openSUSE:Hermes ?
Where specifically do you think its barely documented? Maybe I can improve... Not because I want to convince you of Hermes, but still...
You know what, "contributing" should be renamed to "installation" :))) I never read that page which, indeed, contains most of the installation routine (I added/clarified a few minor bits). The only thing that's painful now is that I have to switch over to Apache before I can use it (http auth through Apache perl modules), we're still running lighttpd. But I have to do that for OBS 2.3 anyway :) One thing is a bit unclear, or annoying, so to say: hermes has its own user database with its own set of users, and as no one is using iChain any more, and probably barely anyone who's running OBS and Hermes has an IAM setup as on opensuse.org, we need to duplicate each user manually from the OBS database to the Hermes database (and have two independent passwords). I doubt that we can use the same database for both OBS and Hermes, as I'm not sure the tables are compatible (but I could check in the code), and I guess that db:migrate on one side is going to blow up the unknown tables (OBS db:migrate killing the hermes tables, and the other way around). Setting up some SSO solution for OBS, OBS API and Hermes (and, in our case, JIRA) sounds like overkill and a bag of pain. Maybe worth hacking Hermes to alternatively use another MySQL connection (to the OBS database) for authentication and looking up email addresses...
The trouble is that I only see a single notification coming in (a SRCSRV_START), but no SRCSRV_REQUEST_CREATE, which is actually what I'm looking for.
The module is here: http://susepaste.org/38190545
...which is barely documented and underkill ;-))
It's so small it doesn't really need any documentation :) And as for underkill, sure, but we don't have many SRs going around and being notified about when a SR is created is good enough. Actually, that's even a use case that Hermes doesn't cover, if I'm not mistaken: send an email to a mailing-list when a new SR is created. AFAICS, every notification that's sent to Hermes is bound to a user. Or are there some sort of broadcast notifications too ? I could create a Hermes user for the Packman mailing-list, but that's only going to help on the Hermes side: OBS will not send any notifications for that user but, instead, send to whomever is configured as maintainers in the project.
After putting it into BSConfig.pm like this: our $notification_plugin = "notify_email";
and restarting the srcserver, all I get into the log file is a SRCSRV_START. I did create a SR but nothing happened.
And it still doesn't tell me why those darn events aren't handed out to my very simple notification plugin :) cheers -- -o) Pascal Bleser /\\ http://opensuse.org -- we haz green _\_v http://fosdem.org -- we haz conf