Sxnan opened a new pull request, #367:
URL: https://github.com/apache/flink-agents/pull/367

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   Linked issue: #xxx
   
   ### Purpose of change
   
   This PR addresses the issue where `EventLogger` was unable to properly 
display `PythonEvent` content because `PythonEvent` stores Python objects as 
serialized byte arrays. The solution introduces a new `LoggablePythonEvent` 
class that converts these byte arrays to human-readable string representations 
while preserving all original event metadata.
   
   Key changes:
   1. Created `LoggablePythonEvent` class for human-readable logging of 
PythonEvents
   2. Modified `ActionExecutionOperator` to convert `PythonEvent` to 
`LoggablePythonEvent` before logging
   3. Added `pythonEventToString` method in `PythonActionExecutor` to handle 
the conversion
   4. Implemented `python_event_to_string` function in Python utilities
   
   This ensures that PythonEvents are logged in a readable format while 
maintaining the original events for processing and event listeners.
   
   ### Tests
   
   Added comprehensive test coverage:
   1. Unit tests for `LoggablePythonEvent`
   2. Unit tests for `PythonActionExecutor#pythonEventToString`
   3. Unit tests for `python_event_to_string` function
   4. End-to-end test verifying PythonEvent logging with readable content
   
   ### API
   
   No public API changes. This is an internal enhancement to improve event 
logging readability.
   
   ### Documentation
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to