Skip to content

Propagate reason to client-side FutureCancelledError when closing the scheduler #8830

Open
@hendrikmakait

Description

@hendrikmakait

Scheduler.close takes a reason keyword which allows us to provide additional context. However, when it comes to cancelling client-side futures, we simply abort the comm causing the Client to cancel the futures with reason=scheduler-connection-lost. It would be great if we could propagate the closing reason to the client and use it when cancelling futures in order to help users understand what's happening. For example, if the scheduler shuts down due to the idle-timeout kicking in, it would be great it we told the users that the futures were cancelled because we exceeded the timeout, not because we lost the connection due to some unknown reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprove existing functionality or make things work better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions