The GitHub Actions job "Pull Requests" on 
pekko.git/backport/3166-endpoint-reader-1.7 has succeeded.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
b384b009a1bfbeb48b275451bd74cb82238ed0d2 / He-Pin(kerr) <[email protected]>
fix: harden EndpointReader against NonFatal dispatch errors and unwrap 
WrappedMessage in writer logs (#3166)

* fix: harden EndpointReader against NonFatal dispatch errors and unwrap 
WrappedMessage in writer logs

Motivation:
EndpointReader only caught NotSerializableException and IllegalArgumentException
during non-reliable message dispatch, allowing other NonFatal exceptions (e.g.
ClassNotFoundException, RuntimeException from custom serializers) to escape and
kill the endpoint. The reliable delivery path (deliverAndAck) had no exception
protection at all. Additionally, EndpointWriter error logs showed the outer
wrapper class instead of the actual message type for wrapped messages.

Modification:
- EndpointReader: widen catch to NonFatal for both non-reliable dispatch and
  deliverAndAck paths
- EndpointWriter: use WrappedMessage.unwrap() to log the inner message class
  in oversized payload and serialization error messages
- Change logTransientSerializationError parameter from Exception to Throwable

Result:
All NonFatal deserialization errors are handled as transient (connection stays
alive) on both reliable and non-reliable delivery paths. Error logs now show
the actual message type for wrapped messages, improving debuggability.

Tests:
- remote / Test / testOnly 
org.apache.pekko.remote.TransientSerializationErrorSpec
- Added RuntimeOnDeserialize test case to verify RuntimeException is caught

References:
Fixes #3163

* fix: update log message to cover all deserialization failures

Address review feedback: widen log message from "Serializer not defined"
to "Could not deserialize" since the catch block now handles all
NonFatal exceptions, not just missing serializer configurations.

Report URL: https://github.com/apache/pekko/actions/runs/28104818722

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to