xinnyuli opened a new pull request, #12217:
URL: https://github.com/apache/seatunnel/pull/12217
## Purpose of this pull request
Migrate `AmazonSqsSourceFactory` and `AmazonSqsSinkFactory` presence-only
validation for `url` and `region` to declarative `notBlank` conditions, so
empty and whitespace-only values are rejected at `--check` time rather than
silently reaching the SQS client at runtime.
Part of umbrella issue #11007 (declarative OptionRule migration).
## Scope
- `AmazonSqsSourceFactory.optionRule()`: add `Conditions.notBlank(URL)` and
`Conditions.notBlank(REGION)`; `SCHEMA` kept as required with existing
semantics.
- `AmazonSqsSinkFactory.optionRule()`: add `Conditions.notBlank(URL)` and
`Conditions.notBlank(REGION)`.
- `AmazonSqsSourceFactoryTest`: extended with `ConfigValidator` coverage for
valid, missing, empty, and whitespace-only values on both `url` and `region`.
- `AmazonSqsSinkFactoryTest`: new file, mirrors the same coverage for the
sink factory path.
## Non-goals (intentionally not changed)
- `ACCESS_KEY_ID`, `SECRET_ACCESS_KEY`, `FORMAT`, `FIELD_DELIMITER`,
`MESSAGE_GROUP_ID`, and other existing optional options — kept as-is, no new
declarative constraints added.
- `AmazonSqsSourceReader`, `AmazonSqsSinkWriter`, `AmazonSqsSourceConfig`,
and SQS client construction — untouched.
- No AWS connectivity, credential-validity, or queue-existence validation is
added; those remain runtime concerns.
## Check list
* [x] Code changed are covered with tests, or does not need to be tested
* [x] If any new Jar binary package adding in your PR, please add License
Notice according
[New License
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [x] If necessary, please update the documentation to describe the new
feature. https://github.com/apache/seatunnel/tree/dev/docs
* [x] If you are contributing the connector code, please check that the
following files are updated:
1. Update change log that in connector document. For more details you can
refer to
[connector-v2](https://github.com/apache/seatunnel/tree/dev/docs/en/connector-v2)
2. Update
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
and add new connector information in it
3. Update the pom file of
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
* [x] Change in [Chinese
document](https://github.com/apache/seatunnel/tree/dev/docs/zh) is synchronized
with [English document](https://github.com/apache/seatunnel/tree/dev/docs/en).
--
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]