From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Alex DAMIAN <alexandru.damian@intel.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 09/13] bitbake: event: do not abort on UI handlers error
Date: Mon, 09 Sep 2013 17:49:46 +0100 [thread overview]
Message-ID: <1378745386.3484.143.camel@ted> (raw)
In-Reply-To: <57e230f40897c8ce63ccd4056f56747d64235788.1378743829.git.alexandru.damian@intel.com>
On Mon, 2013-09-09 at 17:41 +0100, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> Ignore runtime errors if UI handlers do something
> funny, as exiting while the loop is running.
This does look rather strange to me. How can a handler exit within the
loop? The handler is either another process or something we're using an
xmlrpc call too. Fine, the other end can disappear but our local end
(and entry in _ui_handlers) should exist until we remove it ourselves?
Only the server itself can do the removal and the server is single
threaded?
Cheers,
Richard
> This allows the builder to continue even if something
> happens to the UI handlers, useful for remote bitbake
> server.
>
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
> bitbake/lib/bb/event.py | 32 ++++++++++++++++++--------------
> 1 file changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
> index 67cfcea..1258471 100644
> --- a/bitbake/lib/bb/event.py
> +++ b/bitbake/lib/bb/event.py
> @@ -133,20 +133,24 @@ def fire_ui_handlers(event, d):
> return
>
> errors = []
> - for h in _ui_handlers:
> - #print "Sending event %s" % event
> - try:
> - if not _ui_logfilters[h].filter(event):
> - continue
> - # We use pickle here since it better handles object instances
> - # which xmlrpc's marshaller does not. Events *must* be serializable
> - # by pickle.
> - if hasattr(_ui_handlers[h].event, "sendpickle"):
> - _ui_handlers[h].event.sendpickle((pickle.dumps(event)))
> - else:
> - _ui_handlers[h].event.send(event)
> - except:
> - errors.append(h)
> + try:
> + for h in _ui_handlers:
> + #print "Sending event %s" % event
> + try:
> + if not _ui_logfilters[h].filter(event):
> + continue
> + # We use pickle here since it better handles object instances
> + # which xmlrpc's marshaller does not. Events *must* be serializable
> + # by pickle.
> + if hasattr(_ui_handlers[h].event, "sendpickle"):
> + _ui_handlers[h].event.sendpickle((pickle.dumps(event)))
> + else:
> + _ui_handlers[h].event.send(event)
> + except:
> + errors.append(h)
> + except RuntimeError: # may happen that the ui handler simple disappears :D
> + errors.append(h)
> +
> for h in errors:
> del _ui_handlers[h]
>
next prev parent reply other threads:[~2013-09-09 16:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 16:40 [PATCH 00/13] webhob related changes in bitbake Alex DAMIAN
2013-09-09 16:40 ` [PATCH 01/13] bitbake: cooker: clean up code and avoid duplication Alex DAMIAN
2013-09-09 16:40 ` [PATCH 02/13] bitbake: runqueue: Add runQueueTaskSkipped event Alex DAMIAN
2013-09-09 16:40 ` [PATCH 03/13] bitbake: runqueue: added prebuild detailed information Alex DAMIAN
2013-09-09 16:40 ` [PATCH 04/13] bitbake: runqueue, build: event data change Alex DAMIAN
2013-09-10 13:52 ` Richard Purdie
2013-09-09 16:40 ` [PATCH 05/13] bitbake: runqueue: add sceneQueueTaskCompleted event Alex DAMIAN
2013-09-09 16:40 ` [PATCH 06/13] bitbake: build: add link to logfile for Task events Alex DAMIAN
2013-09-10 14:01 ` Richard Purdie
2013-09-09 16:40 ` [PATCH 07/13] bitbake: cooker, command: add a command to return global data Alex DAMIAN
2013-09-13 14:52 ` Richard Purdie
2013-09-09 16:40 ` [PATCH 08/13] bitbake: cooker: use prepareTreeData when computing environment Alex DAMIAN
2013-09-09 16:41 ` [PATCH 09/13] bitbake: event: do not abort on UI handlers error Alex DAMIAN
2013-09-09 16:49 ` Richard Purdie [this message]
2013-09-09 16:41 ` [PATCH 10/13] bitbake: add SinglePackageInfo event Alex DAMIAN
2013-09-09 16:41 ` [PATCH 11/13] bitbake: event: adding an event to pass build file sizes Alex DAMIAN
2013-09-09 16:41 ` [PATCH 12/13] bitbake: xmlrpc: delete unused code BitBakeUIEventServer Alex DAMIAN
2013-09-09 16:41 ` [PATCH 13/13] bitbake: cooker: add extra recipe information Alex DAMIAN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378745386.3484.143.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=alexandru.damian@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.