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

   Linked issue: #776
   
   ### Purpose of change
   
   The three product-review quickstart examples build a `FileSource` over the 
whole
   `resources/` directory. Flink's default file enumerator recurses into
   subdirectories, so after #707 added `skills/math-calculator/SKILL.md` under
   `resources/`, the source reads that markdown file and feeds each line to
   `ProductReview.model_validate_json()`, which raises a `ValidationError` and 
fails
   the job.
   
   This affects all three Python quickstart examples that read the directory, 
not
   just the one in the issue:
   - `workflow_single_agent_example.py`
   - `yaml_workflow_agent_example.py`
   - `react_agent_example.py`
   
   The fix points each `FileSource` at the specific 
`resources/product_review.txt`
   file — the same single-file targeting the Java examples already use via
   `copyResource`. The `skills/` resources and packaging are left untouched, so 
the
   skills example keeps working.
   
   For reference, the following are **not** affected and need no change:
   - The 3 Java examples (`WorkflowSingleAgentExample` / `ReActAgentExample` /
     `YamlWorkflowAgentExample`) — their `resources/` is polluted the same way, 
but
     they copy a single `input_data.txt` to a temp dir and target that one file.
   - The e2e tests — each `FileSource` targets a dedicated single-record input
     subdir (`execute_test_input/`, `input/`, `java_chat_module_input/`, …).
   
   ### Tests
   
   - `ruff check` and `ruff format --check` pass on the changed examples.
   - `python -m py_compile` passes on the three examples.
   - Root cause verified against the bundled Flink 2.2.1 `flink-connector-files`
     jar: the default `NonSplittingRecursiveEnumerator` + `DefaultFileFilter`
     recurse into `skills/` and emit `SKILL.md` (only names starting with 
`.`/`_`
     are skipped). Narrowing the source to the single file avoids it.
   
   ### API
   
   No public API changes.
   
   ### Documentation
   
   - [ ] `doc-needed`
   - [ ] `doc-not-needed`
   - [x] `doc-included` <!-- the matching Python snippets in 
docs/.../quickstart/{workflow_agent,yaml_agent,react_agent}.md are updated in 
this PR -->
   


-- 
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