Sxnan opened a new pull request, #510: URL: https://github.com/apache/flink-agents/pull/510
<!-- * 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 This PR fixes issues with the Kafka ActionStateStore that prevented actions from being correctly skipped after checkpoint recovery: 1. **Fix ActionState deserialization failure**: Removed `@JsonIgnore` from `PythonEvent.getEvent()` so that Python event bytes are persisted in ActionState. Without this, recovered ActionState had `null` event bytes, causing `TypeError: a bytes-like object is required, not 'NoneType'` after recovery. 2. **Fix ActionStateStore not initialized during state recovery**: Moved ActionStateStore initialization to also run in `initializeState()`, ensuring it's available when rebuilding state from recovery markers. 3. **Fix state key mismatch after recovery**: Changed Python `Event.id` from random UUID to deterministic content-based UUID (MD5 hash). This ensures the same event produces the same ActionState key across restarts, enabling proper state lookup and divergence detection. 4. **Fix Kafka consumer partition assignment**: Use `consumer.assign()` instead of `subscribe()` for explicit partition control during state rebuild. ### Tests Manually verified with local Kafka instance. E2E tests will be added in a follow-up PR. ### API No public API changes. ### Documentation <!-- Do not remove this section. Check the proper box only. --> - [ ] `doc-needed` <!-- Your PR changes impact docs --> - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> - [ ] `doc-included` <!-- Your PR already contains the necessary documentation updates --> -- 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]
