Skip to content

Commit

Permalink
fix(agent): log exception instead of returning (revert #121)
Browse files Browse the repository at this point in the history
We need to keep backward compatibility with older clients and they will
have trouble unpickling a new exception, as we are sending these out
pickled by reference and not by value (solving that would require
serialization backend specific actions, which I would rather avoid
for now to unblock a release).
  • Loading branch information
efiop committed May 23, 2024
1 parent df73fb8 commit a94fd5a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/isolate/connections/grpc/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,11 @@ def execute_function(
# NOTE: technically any sort of exception could be raised here, since
# depickling is basically involves code execution from the *user*.
function = from_grpc(function)
except BaseException as exc:
return exc, True, traceback.format_exc()
except BaseException:
self.log(traceback.format_exc())
raise AbortException(
f"The {function_kind} function could not be deserialized."
)

if not callable(function):
raise AbortException(
Expand Down

0 comments on commit a94fd5a

Please sign in to comment.