You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Nikk8091 (via GitHub)" <gi...@apache.org> on 2026/09/30 19:17:26 UTC
[PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Nikk8091 opened a new pull request, #12572:
URL: https://github.com/apache/seatunnel/pull/12572
### Purpose of this pull request
This PR handles the approved `connector-socket` Source slice of #11007 (scope confirmation: https://github.com/apache/seatunnel/issues/11007#issuecomment-5917734796).
`SocketSourceFactory.optionRule()` previously required `host` and `port` only for presence. It now rejects blank `host` values and nonpositive `port` values during factory validation. The Socket Sink and TCP reader are unchanged.
### Does this PR introduce _any_ user-facing change?
Yes. A Socket Source configuration with an empty or whitespace-only `host`, or a zero or negative `port`, now fails during configuration validation instead of proceeding toward a connection attempt. Nonblank hosts, including values with surrounding spaces, remain accepted. The English and Chinese source option descriptions state these constraints.
### How was this patch tested?
- Extended `SocketFactoryTest` with source factory cases for valid and padded nonblank `host`; missing `host` and `port`; empty, spaces-only and tab/newline-only `host`; and zero and negative `port`.
- Confirmed the new blank-host and nonpositive-port tests fail against the original `SocketSourceFactory.optionRule()` before adding the rules (2 failures in 9 tests).
- `mvn -o -pl seatunnel-connectors-v2/connector-socket verify` passed: 10 tests, 0 failures or errors; compilation, formatting, packaging, and shading passed.
- Repository-wide `mvn -o -q spotless:apply` passed and changed no unrelated files.
- `git diff --check` passed.
### Check list
* [x] Updated the English and Chinese Socket Source option documentation.
* [x] Added focused factory validation tests.
* [x] No new binary dependency or connector registration change; this updates an existing connector's configuration validation.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6210075083
Thanks @nzw921rx for the ping, and @Nikk8091 for the detailed notes on the fork side.
Status as of head `ed4b9bc085ff` (unchanged since my last review): no code, test, docs or compatibility blockers on my side, and CI is the only remaining item. The apache-side `Build` check is still `action_required` and no workflow run exists for this SHA, because the fork runs the real jobs and Actions is disabled in `Nikk8091/seatunnel`. The branch is 2 ahead / 28 behind `dev` with no conflict, so there is no need to rebase just for this.
Concrete next steps for @Nikk8091. I cannot see your fork settings, so these are the usual causes of the 422 "Actions has been disabled for this repository":
1. In the fork, open `Settings -> Actions -> General` and set "Actions permissions" to "Allow all actions and reusable workflows". Re-enabling only the single workflow in the Actions tab is not enough when the repository-level setting is off.
2. Open the fork's `Actions` tab and, if you see the banner "Workflows aren't being run on this forked repository", click "I understand my workflows, go ahead and enable them".
3. Push a new commit to the PR branch (an empty one is fine, `git commit --allow-empty -m "Trigger CI"`). Enabling Actions does not retroactively create a run for an already-pushed SHA, and `workflow_dispatch` of `build_main.yml` on an arbitrary branch is not what the PR check reads, so a fresh push is what creates the run that the PR `Build` check follows.
4. If step 1 is greyed out or reverts, the setting is probably controlled by an account or organization policy; in that case please tell us here and a committer can suggest an alternative.
Once the new run is green on the new head, I will update my review to approve, since CI was the only blocker. Thanks for the patience, and thanks @nzw921rx for flagging it.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "nzw921rx (via GitHub) via commits" <co...@seatunnel.apache.org>.
nzw921rx commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-7183408121
@Nikk8091 The port is a range that can be limited to 1-65535 in the future,There are no issues with the current implementation, and we can submit a supplementary PR in the future
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "Nikk8091 (via GitHub) via commits" <co...@seatunnel.apache.org>.
Nikk8091 commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6681380801
Merged current dev `df59bb4cd1c1fef7f2c38ade6456b8c0c2658da8` and resolved the reported conflicts. Updated head: `c12f62d4ed956377919135c90b2201ac1e9f4be4`.
The resolution retains the upstream connect/read timeout options and their validation, tests and EN/ZH documentation, alongside this PR's nonblank host and positive port checks. The PR diff against dev remains four files; no timeout or connection behavior was changed by the resolution.
Fresh JDK 11 validation passed: the 11-module Socket reactor completed `spotless:apply verify`, with 15 `SocketFactoryTest` and 5 `SocketSourceReaderTest` cases passing (20 total, zero failures/errors/skips). `git diff --check upstream/dev...HEAD` also passed. Docker-backed integration tests were not run locally.
```sh
mvn -o -B -ntp -pl seatunnel-connectors-v2/connector-socket -am -Dtest=SocketFactoryTest,SocketSourceReaderTest -Dsurefire.failIfNoSpecifiedTests=false -DskipIT=true -Dskip.ui=true spotless:apply verify
```
The updated branch is pushed for fresh CI. The previous commit's green Build is not being counted as validation of this merge commit.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "Nikk8091 (via GitHub)" <gi...@apache.org>.
Nikk8091 commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6474741473
I started a real Build for the previously untested head. It ran, but stopped before connector tests: `setup-python` could not find Python 3.11.0 for Ubuntu 26.04, and `seatunnel-ci-tools` hit the Lombok `TypeTag :: UNKNOWN` JDK mismatch. Run: https://github.com/Nikk8091/seatunnel/actions/runs/40725569881.
These match merged upstream #12964, which selects Python 3.11 and pins the code-style/specification job to Temurin 17. I therefore merged current `dev` (`f7a57543`) without conflicts, rather than changing the connector or adding a separate workflow patch. Current head: `1c4a68d2`; the diff against dev remains the same four Socket validation/test/doc files.
Fresh local validation passed: 11-module `spotless:apply verify` with all 9 `SocketFactoryTest` cases, zero failures/errors/skips. Integration tests were skipped locally. A new current-head Build is running at https://github.com/Nikk8091/seatunnel/actions/runs/40726866958; no CI success is claimed yet.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "Nikk8091 (via GitHub)" <gi...@apache.org>.
Nikk8091 commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6129192844
Rebased this PR onto current `dev` (`b3898b62`), preserving the upstream Socket docs default-marker correction. The Source-only diff remains limited to the factory rule, its tests, and the EN/ZH source docs. I also clarified in the padded-host test that validation accepts the value as-is without trimming and added the rule-removal regression output to the PR description.
Local verification on the rebased head passed: `mvn -o -pl seatunnel-connectors-v2/connector-socket -am verify` completed all 11 reactor modules successfully, including 10 Socket tests.
CI is still pending. No fork Build run was created for the push; manual dispatch of `build_main.yml` returns GitHub HTTP 422 (`Actions has been disabled for this repository`) even after re-enabling the workflow. I will retry once fork Actions can be enabled from the GitHub UI. I am not treating the prior timed-out Build as a pass.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6208640217
Please enable CI: https://github.com/apache/seatunnel/pull/12572/checks?check_run_id=114949192820
thanks
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "nzw921rx (via GitHub) via commits" <co...@seatunnel.apache.org>.
nzw921rx merged PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "DanielLeens (via GitHub) via commits" <co...@seatunnel.apache.org>.
DanielLeens commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6646607604
The merge-state fact has changed: GitHub now reports actual conflicts with dev (DIRTY; ahead 3 / behind 39). Please sync latest dev and resolve those conflicts first, then rerun checks on the resolved head. Current-head Build is green and my existing source conclusion remains clear, but those checks do not cover the future merge resolution. This supersedes the earlier no-conflict/no-sync guidance; the request is based on an actual content conflict, not drift alone.
This is an unchanged-head CI/merge clarification, not another full source review. No local runtime testing was performed. Daniel has READ permission; effective maintainer approval/dismissal remains separate.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improve][Connector-V2] Validate Socket source host and port [seatunnel]
Posted by "Nikk8091 (via GitHub)" <gi...@apache.org>.
Nikk8091 commented on PR #12572:
URL: https://github.com/apache/seatunnel/pull/12572#issuecomment-6492881096
CI is now green for current head `1c4a68d236edc9d3a6281b9c0203f2ff953ddb62`: https://github.com/Nikk8091/seatunnel/actions/runs/40726866958. The PR's upstream Build check also passed: https://github.com/apache/seatunnel/runs/123015773863.
The branch still contains the scoped Socket validation, tests, and EN/ZH documentation changes described above. Ready for maintainer review; thank you for your patience with the CI setup.
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org