Skip to content

Report user-raised SdkInternalBaseException to the VM instead of stalling - #243

Closed
sharosoo wants to merge 1 commit into
restatedev:mainfrom
sharosoo:fix/restate-sdk-python-internal-exc
Closed

sharosoo wants to merge 1 commit into
restatedev:mainfrom
sharosoo:fix/restate-sdk-python-internal-exc

Conversation

@sharosoo

Copy link
Copy Markdown

Fixes #239.

Changes

  • Track whether SdkInternalBaseException (SdkInternalException / SuspendedException) was raised by ServerInvocationContext's own VM notification/progress methods (_sdk_internal_abort = True).
  • When ServerInvocationContext.enter() catches SdkInternalBaseException (directly or in __cause__) without _sdk_internal_abort set, log a warning and call self.vm.notify_error(repr(err), stacktrace) so the attempt fails fast instead of hanging until inactivity_timeout.
  • Add unit tests in tests/disconnect_hotloop.py covering both SDK-originated aborts/suspensions and user/wrapper-raised SdkInternalException (direct and via __cause__).

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sharosoo

Copy link
Copy Markdown
Author

Closing: SdkInternalBaseException / SdkInternalException is an internal SDK control-flow exception rather than a user-facing exception class.

@sharosoo sharosoo closed this Oct 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SdkInternalException raised by user code stalls the attempt until inactivity_timeout

1 participant