-
Notifications
You must be signed in to change notification settings - Fork 129
[Bug] YAML loader silently accepts parameter_types on Python tools #774
Copy link
Copy link
Closed
Labels
affectVersion/0.3.0bug[Issue Type] Something isn't working as expected.[Issue Type] Something isn't working as expected.fixVersion/0.3.0The feature or bug should be implemented/fixed in the 0.3.0 version.The feature or bug should be implemented/fixed in the 0.3.0 version.priority/blockerIndicates the PR or issue that should block the release until it gets resolved.Indicates the PR or issue that should block the release until it gets resolved.
Metadata
Metadata
Assignees
Labels
affectVersion/0.3.0bug[Issue Type] Something isn't working as expected.[Issue Type] Something isn't working as expected.fixVersion/0.3.0The feature or bug should be implemented/fixed in the 0.3.0 version.The feature or bug should be implemented/fixed in the 0.3.0 version.priority/blockerIndicates the PR or issue that should block the release until it gets resolved.Indicates the PR or issue that should block the release until it gets resolved.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Search before asking
Description
Found during YAML doc verification (#742).
docs/content/docs/development/yaml.mdline 137 documentsparameter_typesas "java only" and Forbidden for Python tools:
parameter_typesThe Python loader does not enforce the prohibition. In
python/flink_agents/api/yaml/loader.py:178-188:Only the missing-on-Java direction is checked. When
typeispython(orunset) and
parameter_typesis set, the value passes through toresolve_function, which discards it in the Python branch:ActionSpechandles the analogous case correctly by not declaringparameter_typesat all (combined withextra="forbid"), andtest_action_spec_rejects_parameter_typesverifies that.ToolSpecdeclaresthe field, so the same approach does not work without a custom validator.
How to reproduce
Fix
Either (preferred — matches the doc):
Or relax the doc to "Ignored for Python tools" instead of "Forbidden".
Version and environment
Flink Agents 0.3.0 (
main). Python loader only; Java loader unverified.Are you willing to submit a PR?