PHJ2000 opened a new pull request, #13069: URL: https://github.com/apache/seatunnel/pull/13069
### Purpose of this pull request I’m contributing this change to Apache SeaTunnel to reject blank MaxCompute Sink endpoints during configuration validation. Add `Conditions.notBlank(ENDPOINT)` to the already-required MaxCompute Sink endpoint option, following the [scope discussion in #11007](https://github.com/apache/seatunnel/issues/11007#issuecomment-6514046323). This mirrors the existing Source endpoint rule. Factory tests, EN/ZH sink documentation, and configuration-check cases in the existing MaxCompute E2E suite cover the change. This is separate from the retry validation in #11586; its author has been [notified of the overlap](https://github.com/apache/seatunnel/pull/11586#issuecomment-6516447179). Source rules, required project/table options, credentials, timeout/retry settings, and runtime URL/client behavior are unchanged. ### Does this PR introduce _any_ user-facing change? Yes. On `dev`, an empty or whitespace-only Sink `endpoint` now fails declarative validation, including `--check`. A missing endpoint remains invalid. Nonblank values, including values with surrounding whitespace, pass the option rule without trimming or rewriting. This rule does not add URL syntax or connectivity validation. ### How was this patch tested? Local Linux with Eclipse Adoptium JDK 11.0.32.1. Base: `3ac2d1cec6aa7b3741c4dacdd23020f778e23c02`. - The same 100 MaxCompute module test cases on base and head: base had the six expected failures for blank Sink endpoints and 94 passes; head passed all 100, with no errors or skipped cases. Existing Source, required-option, timeout/retry-registration, and other connector tests are included. - The same two actual Zeta `--check` E2E cases with the MaxCompute emulator on base and head: the valid endpoint passed on both; the blank endpoint incorrectly returned exit 0 on base, causing the expected assertion failure, and was rejected on head. Head passed both cases with no errors or skips. Full existing data-transfer E2E cases were not run. - Spotless completed with no further changes, and the full repository `./mvnw -q -DskipTests verify` passed. <details> <summary>Exact reproduction commands</summary> Commands used (the base worktree had the same test/configuration files overlaid): ```sh ./mvnw -B -ntp -pl seatunnel-connectors-v2/connector-maxcompute -am -Dtest=BasicTypeToOdpsTypeTest,MaxComputeCatalogTest,MaxComputeCatalogUtilTest,MaxComputeCreateTableTest,MaxComputeDataTypeConvertorTest,MaxComputeTypeConvertorTest,MaxcomputeSourceFactoryTest,MaxcomputeSourceSplitTest,MaxcomputeSourceTest,MaxcomputeUtilTest,PreviewActionTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false verify RUN_ENGINES=zeta ./mvnw -B -ntp -pl seatunnel-connectors-v2/connector-fake,seatunnel-e2e/seatunnel-connector-v2-e2e/connector-maxcompute-e2e -am -DskipUT=true -DskipIT=false '-Dit.test=MaxComputeIT#*SinkEndpointDuringConfigCheck' -Dfailsafe.failIfNoSpecifiedTests=false -DfailIfNoTests=false verify ./mvnw -B -ntp -pl seatunnel-connectors-v2/connector-maxcompute,seatunnel-e2e/seatunnel-connector-v2-e2e/connector-maxcompute-e2e spotless:apply ./mvnw -q -DskipTests verify ``` </details> ### Check list * [ ] 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/developer/new-license.md) — **N/A:** no new JAR or dependency is added. * [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs — **Completed:** the EN/ZH MaxCompute Sink docs describe the nonblank endpoint contract and unchanged nonblank values. * [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR. — **N/A:** valid configurations, option names/defaults, and APIs are unchanged. The intentional early rejection of invalid blank endpoints is documented in EN/ZH. * [x] If you are contributing the connector code, please check that the following files are updated: **Completed:** each item was checked for applicability below; this does not mean every listed file changed. 1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it — **N/A:** MaxCompute is already registered; no new connector or plugin mapping is introduced. 2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml) — **N/A:** no distribution artifact or dependency changes are needed for this existing connector. 3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml) — **N/A:** the existing MaxCompute module paths and CI label mapping are unchanged. 4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/) — **Completed:** the existing `MaxComputeIT` and two configuration fixtures cover valid and blank Sink endpoints through Zeta `--check`; both head cases passed. Full data-transfer E2E cases were not run. 5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config) — **N/A:** no connector is added and no option name or default changes; the existing required endpoint remains required. <!-- contribution-flow:apache--seatunnel--11007:maxcompute-sink-endpoint-pr-v2 --> -- 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]
