waterWang opened a new pull request, #11652:
URL: https://github.com/apache/seatunnel/pull/11652
## Description
Fixes #11650
Two related defects in the CLI's connector knowledge base, both causing
silent failures and misleading error messages:
### 1. Silent degradation when `connector_metadata.json` is not found
`_load_runtime_metadata()` silently returns an empty dict when no
`connector_metadata.json` is found, logging only at `logger.debug` level. This
means:
- The system-prompt catalog renders as `0 connectors, 0 endpoints` — the
model thinks there are no connectors at all
- `validate_connector_options()` returns `valid: True` for everything with a
note "metadata not available"
- `get_connector_detail("Doris")` falls through to "not found"
**Fix**: Changed the log level to `logger.warning` with a clear remediation
hint (`Run \`seatunnel --export-metadata\` or set SEATUNNEL_HOME to generate
it`).
### 2. Self-referencing suggestions for known connector names
`get_connector_detail()` uses `route_by_keyword()` for suggestions, which
matches the queried name itself as a keyword alias. This produces the absurd:
`Connector 'Doris' not found. Did you mean: Doris?`
**Fix**:
- Filter out the queried name from suggestions (case-insensitive)
- When the name is a known connector (from `KEYWORD_ALIASES`) but metadata
is unavailable, show a more helpful message: "Known connector, metadata not
available — run `seatunnel --export-metadata` to generate it"
--
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]