All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Re-implement prserv on top of asyncrpc
@ 2021-06-28  4:13 Paul Barker
  2021-06-28  4:13 ` [PATCH v3 1/4] asyncrpc: Wait on writers to close with Python 3.7+ Paul Barker
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Paul Barker @ 2021-06-28  4:13 UTC (permalink / raw)
  To: bitbake-devel, Richard Purdie, Joshua Watt; +Cc: Paul Barker

These changes replace the old XML-based RPC system in prserv with the
new asyncrpc implementation originally used by hashserv.

Changes from v2:
  * Dropped patches which are currently applied to master-next, this
    series should be applied on top of the current master-next branch.

  * Improved asyncio usage based on a trawl through the docs and various
    other online resources. The asyncio tutorials from Lynn Root on
    graceful shutdowns [1] and exception handling [2] were excellent and
    should probably be required reading for anyone using asyncio in
    anger.

    As can be seen in the first patch, Python 3.7+ is required for us to
    guarantee good behaviour from asyncio stream readers & writers.
    However, these changes have been written to support Python 3.5+ in
    line with bitbake's supported Python versions and I've tested this
    on Python 3.6 (OpenSUSE 15.3).

    Hopefully this should resolve the hangs we've seen on the
    autobuilder or at least bring to light any exceptions which may have
    been occuring in asyncrpc/prserv.

    [1]: https://www.roguelynn.com/words/asyncio-graceful-shutdowns/

    [2]: https://www.roguelynn.com/words/asyncio-exception-handling/

Changes from v1:
  * Drop obsolete getPR function in PRServer, this was replaced by
    handle_get_pr()

  * Add timeouts to catch bitbake hangs seen on the autobuilder. This should
    turn these hangs into errors which can be more reasonably investigated.

  * Add a minor error message fix I spotted.

Paul Barker (4):
  asyncrpc: Wait on writers to close with Python 3.7+
  asyncrpc: Ensure that asyncio shutdown is clean
  asyncrpc: Handle exceptions
  prserv: Replace XML RPC with modern asyncrpc implementation

 lib/bb/asyncrpc/client.py |   3 +
 lib/bb/asyncrpc/serv.py   |  41 ++++--
 lib/prserv/serv.py        | 263 ++++++++++++++++++++------------------
 3 files changed, 169 insertions(+), 138 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-01 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28  4:13 [PATCH v3 0/4] Re-implement prserv on top of asyncrpc Paul Barker
2021-06-28  4:13 ` [PATCH v3 1/4] asyncrpc: Wait on writers to close with Python 3.7+ Paul Barker
2021-06-28  4:13 ` [PATCH v3 2/4] asyncrpc: Ensure that asyncio shutdown is clean Paul Barker
2021-07-01 15:59   ` Joshua Watt
2021-06-28  4:13 ` [PATCH v3 3/4] asyncrpc: Handle exceptions Paul Barker
2021-06-28  4:13 ` [PATCH v3 4/4] prserv: Replace XML RPC with modern asyncrpc implementation Paul Barker

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.