Skip to content

Improve error/exn reporting to RPC#4716

Closed
rgrinberg wants to merge 2 commits intoocaml:mainfrom
rgrinberg:fail-events
Closed

Improve error/exn reporting to RPC#4716
rgrinberg wants to merge 2 commits intoocaml:mainfrom
rgrinberg:fail-events

Conversation

@rgrinberg
Copy link
Copy Markdown
Member

  • stop reporting cancellation errors as normal errors
  • report build interrupt/fail events

rgrinberg added 2 commits June 8, 2021 17:36
Introduce exceptions for fibers being cancelled and do not report those
to RPC

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg requested a review from aalekseyev June 9, 2021 00:50
| Deterministic -> ());
t.handler.error [ Add error ]
match exn.exn with
| Memo.Non_reproducible Scheduler.Run.Build_cancelled -> Fiber.return ()
Copy link
Copy Markdown
Collaborator

@aalekseyev aalekseyev Jun 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should work because Memo drops the Memo.Non_reproducible wrapper when re-raising from what I remember.

Did you test this?

~handle_error_no_raise:(fun exn ->
Fiber.fork_and_join_unit
(fun () -> report_early_exn ~report_error exn)
(fun () ->
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a weird place to report cancellation. First of all, the guarantee that some errors will be emitted after cancellation seems like a weird guarantee (it may be true now, but it seems more efficient and more reasonable to never emit events after cancellation).
Second, here you have to deal with duplicate events, and it's unclear why that's useful.

Why is the already-existing notification t.handler t.config Build_interrupted in let rec iter not sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants