1328837476-hug opened a new pull request, #12690:
URL: https://github.com/apache/seatunnel/pull/12690
### Purpose of this pull request
Part of #11007. Add `Conditions.notBlank(ENDPOINT)` to the MaxCompute Source
option rule so empty or whitespace-only endpoints fail configuration validation
before source initialization.
### Does this PR introduce _any_ user-facing change?
Yes. In the current `dev` branch, the required `endpoint` option rejects a
missing value but accepts empty and whitespace-only strings at the factory
validation stage. This change rejects those strings with an error identifying
`endpoint`.
Nonblank values, including values with surrounding whitespace, remain
unchanged by validation. Table-selection rules, credential fallback, connection
settings, and runtime checks are preserved. The EN/ZH Source documentation now
describes the nonblank requirement.
### How was this patch tested?
- Extended `MaxcomputeSourceFactoryTest` to cover valid, missing, empty,
whitespace-only, and padded nonblank values. Before the production change, the
six blank-value cases failed because validation accepted them; after the
change, all 89 MaxCompute module unit tests passed.
- Updated `MaxComputeIT` to exercise normal source creation through
`FactoryUtil`, retain the existing read-column scenario, and check that a blank
endpoint causes `OptionValidationException`.
- Spotless formatting and the MaxCompute module's `-DskipTests verify`
passed.
- Both selected integration tests passed against
`maxcompute/maxcompute-emulator:v0.0.7`. A temporary Maven runner compiled this
PR's `MaxComputeIT` source directly and used the built connector and shared E2E
test framework, including the original setup and teardown. On Windows, the test
process used `TESTCONTAINERS_HOST_OVERRIDE=127.0.0.1` because the default
hostname resolved to an unreachable virtual adapter. The full multi-engine E2E
reactor was not completed locally due to dependency-download delays and a Maven
cache-lock failure; the Flink/Spark/Zeta job matrix was not run.
The targeted unit tests can be run with:
```sh
./mvnw -pl seatunnel-connectors-v2/connector-maxcompute -am \
'-Dtest=Maxcompute*Test,MaxCompute*Test,BasicTypeToOdpsTypeTest,PreviewActionTest'
\
-Dsurefire.failIfNoSpecifiedTests=false -DskipIT=true package
```
For the two integration methods through the standard E2E reactor:
```sh
./mvnw -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-maxcompute-e2e
-am \
-DskipUT=true -DskipIT=false \
'-Dit.test=MaxComputeIT#testReadColumn+testRejectBlankSourceEndpoint' \
-Dit.failIfNoSpecifiedTests=false -DfailIfNoTests=false -Dskip.ui=true
verify
```
### Check list
- [x] Updated EN/ZH Source documentation.
- [x] Extended the existing unit and integration test classes.
- No new dependencies, connector registrations, or distribution changes.
--
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]