Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always raise a received result-as-error in spawn tasks #288

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jan 3, 2022

  1. Configuration menu
    Copy the full SHA
    a8d71f1 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Attempt to collect tardy errors after proc deth

    In an effort to support `.run_in_actor()` error raising by our nursery
    we ideally collect as many child errors as possible during nursery
    teardown and error collection/propagation.
    
    Here we try a couple things,
    - factor the per-actor error y retrieval into a new
      `pack_and_report_errors()`
    - when a result retrieval via `exhaust_portal()` is cancelled pack the
      `trio.Cancelled` into the `errors: dict` expecting to rescan for
      errors for any such entries after process termination.
    - at the end of the spawn task conduct a timed-out 2nd retrieval of any
      late delivered error from the child task for each entry in `errors`
      containing a cancelled.
    
    This causes a bunch of cancellation tests to still fail seemingly due to
    the race case where the OCA nursery may have requested cancellation of
    children *before* they can remote-error and thus the `MultiError`
    matching expectations aren't going to (always) be correct. Previously we
    were always waiting for all `.run_in_actor()` results to arrive and
    **not** raising any errors early (which in turn triggers local
    cancellation).
    goodboy committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    97b7906 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f4cab2d View commit details
    Browse the repository at this point in the history