Mailinglist Archive: opensuse-buildservice (53 mails)

< Previous Next >
Re: [opensuse-buildservice] Simple mail notification in OBS
  • From: Christof Hanke <christof.hanke@xxxxxxxxxx>
  • Date: Wed, 14 Nov 2018 17:01:57 +0100
  • Message-id: <1671497.S2Zl9oBpxj@dijon>
On Tuesday, 13 November 2018 17:18:03 CET Christof Hanke wrote:
On Tuesday, 13 November 2018 16:32:58 CET Stephan Kulow wrote:
On 11/13/18 4:17 PM, Christof Hanke wrote:
Hi,

I wanted to ask what's the simplest way to implement an email-only
notifcation from a private OBS-instance. (for faild builds etc.)

Up to now, I've used a self-written plugin, which stopped working a
while
ago. So I'm wondering if it's worth fixing or if this can be done
differently without install hermes.

Why? Hermes is long dead - OBS does mail notifications itself. You just
need to enable failed builds.

OK, thanks for this clarification, just by looking the notify plugins and
some web-pages (https://en.opensuse.org/openSUSE:Build_Service_Tools) I
thought hermes is still alove.

Anyway, I enabled the notifications for failed build etc already.
I see the delayed jobs in the logs
I, [2018-11-13T17:06:17.125509 #3283] INFO -- : [ActiveJob]
[3283:1845111.64] Enqueued SendEventEmailsJob (Job ID:
ceb47cf6-e6c2-428e-8f89-a4bc7db6bf3c) to DelayedJob(mailers)

and in the database via:
MariaDB [api_production]> SELECT * from delayed_jobs WHERE handler LIKE
"%SendEventEmailsJob%";

Interestingly, I get a huge stack trace in the db
for :
3874892 | 0 | 16 | --- !ruby/
object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper
job_data:
job_class: ConsistencyCheckJob
job_id: 6c801502-e95d-4c34-88da-6318e5c59ad6
provider_job_id:
queue_name: consistency_check
priority:
arguments: []
executions: 0
locale: en

| Missing host to link to! Please provide the :host parameter, set

default_url_options[:host], or set :only_path to true
/usr/lib64/ruby/gems/2.5.0/gems/actionpack-5.1.4/lib/action_dispatch/http/
url.rb:62:in `full_url_for'
/usr/lib64/ruby/gems/2.5.0/gems/actionpack-5.1.4/lib/action_dispatch/http/
url.rb:52:in `url_for'
/srv/www/obs/api/app/mailers/admin_mailer.rb:10:in `set_headers'
/srv/www/obs/api/app/mailers/admin_mailer.rb:25:in `warning'
/srv/www/obs/api/app/mailers/admin_mailer.rb:21:in `error'
[...snip...]


Stackoverflow tells me that I need to set
config.action_mailer.default_url_options = { :host => "www.yourhost.com" }
somewhere.


ok, just for the record.
I've updated the obs to the latest version and set the variable
obs_url both in /srv/www/obs/api/config/options.yml and directly in the
database.
Now it works again.

Christof
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >