Skip to content

virtual_object_command_interpreter.py crashes with TypeError when executing runThrowTerminalException #78

@tillrohrmann

Description

@tillrohrmann

When running the Combinators integration tests with the python test services, then one can see that the invocation fails when the virtual_object_command_interpreter is supposed to execute the runThrowTerminalException command with a TypeError:

2025-04-16T08:06:02.410331Z WARN restate_invoker_impl
  Invocation error, retrying in 122ms 112us 144ns.
    error: Got a (transient) error from the service while processing invocation.
      [500 Internal] TypeError('to_durable_future.<locals>.side_effect() takes 1 positional argument but 4 were given').
      > This error originated after executing Command: Run(named "run should fail command")[command index 6]
    restate.invocation.id: inv_1hgVUmTueTje6jP81ATNyhhahOn4QAEODA
    restate.invocation.target: VirtualObjectCommandInterpreter/168fbfe6-666d-4a2f-bb5c-0b2747a6b211/interpretCommands
    restate.error.code: RT0007
    Visit https://docs.restate.dev/references/errors#RT0007 for more info and suggestions.
    restate.invocation.error.stacktrace:
      Traceback (most recent call last):
        File "/usr/local/lib/python3.12/site-packages/restate/server_context.py", line 424, in create_run_coroutine
          action_result = typing.cast(T, await asyncio.to_thread(action))
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
          return await loop.run_in_executor(None, func_call)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run
          result = self.fn(*self.args, **self.kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: to_durable_future.<locals>.side_effect() takes 1 positional argument but 4 were given

This looks as if we are providing the wrong number of arguments to the side_effect function. I guess this is not a problem for the Combinators test because we call AwaitAnySuccessful. We still may want to fix the code in case this service will be used for something else in the future.

cc @slinkydeveloper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions