goutamadwant opened a new pull request, #11821:
URL: https://github.com/apache/seatunnel/pull/11821

   ### Purpose of this pull request
   
   Part of #11007.
   
   This PR migrates the existing AmazonDynamoDB sink `max_retries` validation 
to the declarative `OptionRule` path.
   
   - Require `max_retries` to be non-negative in `AmazonDynamoDBSinkFactory`.
   - Remove the duplicate imperative check from `AmazonDynamoDBConfig`.
   - Keep `max_retries` optional so configurations that use the default remain 
valid.
   - Add focused tests for the default, zero, positive, and negative values.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. A negative `max_retries` value is now rejected during option validation 
instead of later while the connector configuration is created. The accepted 
values and default behavior remain unchanged.
   
   ### How was this patch tested?
   
   Added factory validation tests covering:
   
   - The default `max_retries` value is accepted.
   - Zero and positive values are accepted.
   - A negative value is rejected with an error that identifies `max_retries`.
   
   Before the production change, the negative-value regression failed because 
factory validation accepted `max_retries = -1`.
   
   Verified the complete AmazonDynamoDB connector module with Java 11:
   
   ```shell
   ./mvnw -pl seatunnel-connectors-v2/connector-amazondynamodb package
   ```
   
   Result: 6 tests passed. Spotless, compilation, tests, and packaging 
completed successfully.
   
   ### Check list
   
   * [x] No new Jar binary package is added.
   * [x] Documentation is not required because the accepted range and default 
remain unchanged.
   * [x] No incompatible-change entry is required because valid configurations 
keep the same behavior.
   * [x] No connector registration, distribution, label, or E2E updates are 
required because this changes validation only.


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