amalsaidov opened a new pull request, #13229: URL: https://github.com/apache/seatunnel/pull/13229
### Purpose of this pull request Part of #11007 (migrate connector validation to declarative `OptionRule`). The TiDB CDC source declares `database-name`, `table-name` and `pd-addresses` as required but never validated their content. A blank or whitespace-only value passed `--check` and only failed later when the TiKV/PD client could not resolve it. The other CDC sources (DB2 #12931, PostgreSQL, etc.) already moved this kind of content check into the declarative rule, so this brings TiDB in line. Change in `TiDBSourceFactory#optionRule()`: wrap each of the three required options with `notBlank(...)`, mirroring the `required(HOST, notBlank(HOST))` pattern documented for the framework. ### Does this PR introduce _any_ user-facing change? Yes. A blank or whitespace-only `database-name`, `table-name` or `pd-addresses` is now rejected at `--check` time with a clear validation error instead of failing later at connection time. Valid configurations are unaffected and supplied values are not trimmed. The English and Chinese `TiDB-CDC` option docs note that these values must not be empty or whitespace-only. ### How was this patch tested? Added `TiDBSourceFactoryTest` covering accepted values (including surrounding whitespace, which is preserved), blank values and missing values for each required option. ``` ./mvnw -pl seatunnel-connectors-v2/connector-cdc/connector-cdc-tidb test -Dtest=TiDBSourceFactoryTest Tests run: 23, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS ``` No external TiDB/TiKV cluster is required; the validation runs entirely through `OptionRule`. ### Check list * [x] If necessary, please update the documentation to describe the new feature. * [ ] If any new Jar binary package adding in your PR, please add License Notice. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
