alnzng opened a new pull request, #921: URL: https://github.com/apache/flink-agents/pull/921
<!-- * 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: #920 ### Purpose of change This change wants to improve the debuggability of Action config deserialization. Before, `Action.__custom_deserialize` catch all errors when it reconstruct `python`-format config models, so if a real error happen (for example `ModuleNotFoundError`), the error is hidden and the raw value is stored. User can not know the real reason, and the problem show up later as a confusing error, e.g. `pemja.core.PythonException: <class 'AttributeError'>: 'list' object has no attribute 'model_dump'`. Now we replace the broad `try/except` with a explicit isinstance(value, list | tuple)` check, so the real error can propagate and fail fast, and it is easy to find the root cause. Plain values still pass through as before. ### Tests <!-- How is this change verified? --> - Added unit test - Verified in a test app and checked the real error propagated properly <img width="1210" height="313" alt="Screenshot 2026-07-20 at 12 12 48 AM" src="https://github.com/user-attachments/assets/36cb6d79-e816-4a37-a201-cb5808db7b72" /> ### API <!-- Does this change touches any public APIs? --> N/A ### 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]
