You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "SEZ9 (via GitHub)" <gi...@apache.org> on 2026/08/04 14:47:55 UTC
[I] [Bug][CLI] Connector knowledge base degrades silently without metadata; not-found suggestions can echo the queried name [seatunnel]
SEZ9 opened a new issue, #11650:
URL: https://github.com/apache/seatunnel/issues/11650
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue) and found no similar issues.
### What happened
Sub-task of #11616 (Stage-1 items 1.1-context and 1.6). Two related defects in the CLI's connector knowledge base, both observed during the accuracy benchmark (#11553) and partially responsible for the "all models fail on Doris/StarRocks" clusters:
**1. Silent degradation to zero connector knowledge in source checkouts / pip installs.**
`connector_metadata.json` is generated by Java reflection during the seatunnel-dist build and only exists in the release tarball layout. In a source checkout or pip install without `SEATUNNEL_HOME`, `_load_runtime_metadata()` silently returns empty (a `logger.debug`), and:
- the system-prompt catalog renders as `## Available Connectors (0 connectors, 0 endpoints)` — the model is told there are no connectors at all;
- `validate_connector_options` returns `valid: True` for everything ("metadata not available"), so generated configs are unchecked;
- `get_connector_detail("Doris")` falls through to "not found".
**2. The not-found suggester can echo the queried name back.**
`get_connector_detail` uses `route_by_keyword(name)` (keyword routing, not name correction) for suggestions, producing the absurd `Connector 'Doris' not found. Did you mean: Doris?` — because "doris" is its own keyword alias. There is also no fuzzy correction for invented names: benchmark runs observed a model writing `File` (a non-existent connector) for LocalFile, and the error gave no usable hint, so the repair loop could not recover.
### What you expected to happen
- A valid connector name without available metadata should be told "known connector, option metadata unavailable (+ remediation hint)" instead of "not found".
- Unknown names should get edit-distance/substring suggestions ("File" → LocalFile, FtpFile, S3File...) that never include the queried name itself.
- The catalog should never claim "0 connectors" when a static name index exists; it should list known names and state clearly that option details are unavailable.
- The degradation should be visible (warning log), not silent.
### SeaTunnel Version
dev
### SeaTunnel Config
n/a (CLI behavior)
### Running Command
```
# any source checkout without SEATUNNEL_HOME / metadata file
seatunnel "sync PostgreSQL orders to Doris"
```
### Error Exception
See above ("Did you mean: Doris?").
### Zeta or Flink or Spark Version
_No response_
### Java or Scala Version
Python 3.10+ (seatunnel-cli)
### Screenshots
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][CLI] Connector knowledge base degrades silently without metadata; not-found suggestions can echo the queried name [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #11650:
URL: https://github.com/apache/seatunnel/issues/11650#issuecomment-5186334723
Thanks for separating these two CLI defects and for opening PR #11652 so quickly.
I checked the behavior described here against the current CLI fallback path, and this does look like a real bug rather than only a prompt-quality problem. When runtime metadata is missing, the CLI should not silently behave as if SeaTunnel has zero connectors, and the not-found suggestion path should never echo the queried connector name back to the user.
The important acceptance points here are:
1. missing runtime metadata degrades visibly and still preserves useful connector-name guidance;
2. a known connector without metadata is not misreported as "not found";
3. an actually unknown connector name gets meaningful suggestions that do not include the original query itself.
PR #11652 is the right place to finish the code review. Please keep the change boundary focused on the fallback/diagnostic path, and add focused coverage for both cases: a known connector with no metadata file, and a genuinely unknown connector name. Keeping this issue open until #11652 is reviewed and merged.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][CLI] Connector knowledge base degrades silently without metadata; not-found suggestions can echo the queried name [seatunnel]
Posted by "waterWang (via GitHub)" <gi...@apache.org>.
waterWang commented on issue #11650:
URL: https://github.com/apache/seatunnel/issues/11650#issuecomment-5181593771
Created PR #11652 to address both defects:
1. **Silent degradation**: Changed `_load_runtime_metadata()` from `logger.debug` to `logger.warning` with remediation hint
2. **Self-referencing suggestions**: Filter out the queried name from suggestions, and show a more helpful message for known connectors without metadata
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][CLI] Connector knowledge base degrades silently without metadata; not-found suggestions can echo the queried name [seatunnel]
Posted by "SEZ9 (via GitHub)" <gi...@apache.org>.
SEZ9 commented on issue #11650:
URL: https://github.com/apache/seatunnel/issues/11650#issuecomment-5188386208
Confirmed as a valid sub-task of #11616. Suggested fix for issue 1: when metadata is missing, fall back to a bundled static connector name list so the catalog never claims 0 connectors, log at WARN (not debug) with a remediation hint (set SEATUNNEL_HOME or run the dist build), and have validate_connector_options return an explicit 'unchecked: metadata unavailable' status instead of valid=true.
For issue 2: replace route_by_keyword with proper name correction — exclude the queried name from suggestions, and add edit-distance plus substring matching so invented names like 'File' suggest LocalFile/FtpFile/S3File, giving the repair loop actionable hints.
Please add regression tests covering: (a) source checkout / pip install without SEATUNNEL_HOME (catalog must not render '0 connectors' and validation must not silently pass), and (b) get_connector_detail('Doris') without metadata returning 'known connector, options unavailable' rather than 'not found'.
<!-- streview-comment:54 -->
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org