WXPNG opened a new issue, #12357: URL: https://github.com/apache/seatunnel/issues/12357
### Search before asking - [x] I had searched in the [feature](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement. ### Description Currently, the `SupportSourceDryRunValidation` and `SupportSinkDryRunValidation` SPIs are only implemented by a few connectors (JDBC, Kafka, Fake, S3 File for Source; JDBC for Sink). When users submit a MySQL CDC or Elasticsearch job via the REST API or CLI with `--dry-run`, the system cannot verify connectivity and permissions beforehand. This feature request adds dry-run validation support for: 1. **MySQL CDC Source (`MySqlIncrementalSourceFactory`)**: - Implements `SupportSourceDryRunValidation` - `inferSchemaForDryRun()`: loads JDBC driver and reads table metadata to infer schema - `validateConnectionForDryRun()`: creates a real MySQL connection via Debezium's `MySqlConnection` and validates that the configured user has `REPLICATION SLAVE` and `REPLICATION CLIENT` privileges (required for CDC binlog reading) - Also validates permissions in `restoreSource()` so issues surface at task submission time 2. **Elasticsearch Sink (`ElasticsearchSinkFactory`)**: - Implements `SupportSinkDryRunValidation` - `validateConnectionForDryRun()`: creates an `EsRestClient`, fetches cluster info (`GET /`) to verify connectivity and authentication, and checks target index accessibility (`HEAD /{index}`) - Skips index existence check for dynamic index names containing `${...}` placeholders - Also validates connection in `createSink()` so issues surface at task submission time ### Usage Scenario - Users can detect misconfigured MySQL CDC credentials (wrong password, missing REPLICATION privileges) before the job actually starts - Users can detect Elasticsearch connectivity issues (wrong hosts, authentication failures) at submission time rather than during sync - This aligns with the existing dry-run framework and extends its coverage to two widely-used connectors ### Related issues _No response_ ### Are you willing to submit a 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
