You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "cyl-uuu (via GitHub)" <gi...@apache.org> on 2026/08/13 14:57:14 UTC
[PR] [Improve][Connector-V2][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
cyl-uuu opened a new pull request, #11795:
URL: https://github.com/apache/seatunnel/pull/11795
### Purpose of this pull request
Migrate RabbitMQ source configuration validation from runtime checks to the declarative `OptionRule` validation framework.
### Changes
- Add declarative validation for single-table mode:
- require non-blank `queue_name`
- require `schema` when `queue_name` is configured
- Add declarative validation for multi-table mode:
- require non-empty `table_configs`
- reject root-level `schema` when `table_configs` is configured
- require each `table_configs` entry to contain a non-blank `queue_name`
- require each `table_configs` entry to contain `schema`
- Remove duplicate runtime validation from `RabbitmqSource`
- Move related validation tests to `RabbitmqSourceFactoryTest`
### Tests
- `mvnw.cmd -pl seatunnel-connectors-v2/connector-rabbitmq test`
- Tests run: 31
- Failures: 0
- Errors: 0
- `mvnw.cmd -pl seatunnel-connectors-v2/connector-rabbitmq spotless:check`
- BUILD SUCCESS
- `git diff --cached --check`
- passed
Related to #11007
--
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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "cyl-uuu (via GitHub)" <gi...@apache.org>.
cyl-uuu commented on code in PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795#discussion_r3780967937
##########
seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/config/RabbitmqTableConfigsValidator.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.seatunnel.connectors.seatunnel.rabbitmq.config;
Review Comment:
Fixed. The ASF license header is now placed at the top of the file. 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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "cyl-uuu (via GitHub)" <gi...@apache.org>.
cyl-uuu commented on PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795#issuecomment-5295139444
Thanks for the detailed review. I've addressed the review comments:
- Fixed the `tables_configs` key in validation messages by using the actual option key.
- Improved the validator descriptions.
- Added class-level Javadocs for both validators.
- Unified the schema option references.
- Strengthened the validation tests and added regression coverage for the optional `schema` option.
- Updated the PR description to document the user-facing validation behavior change.
All RabbitMQ module tests pass locally (32 tests, 0 failures, 0 errors), and Spotless checks pass as well.
--
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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo merged PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795
--
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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "cyl-uuu (via GitHub)" <gi...@apache.org>.
cyl-uuu commented on code in PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795#discussion_r3780970035
##########
seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/source/RabbitmqSourceFactory.java:
##########
@@ -62,7 +77,6 @@ public OptionRule optionRule() {
RabbitmqSourceOptions.REQUESTED_HEARTBEAT,
RabbitmqSourceOptions.PREFETCH_COUNT,
RabbitmqSourceOptions.DELIVERY_TIMEOUT,
- RabbitmqSourceOptions.SCHEMA,
Review Comment:
Fixed. `RabbitmqSourceOptions.SCHEMA` has been restored to the optional options. 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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on code in PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795#discussion_r3776743852
##########
seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/config/RabbitmqTableConfigsValidator.java:
##########
@@ -0,0 +1,59 @@
+package org.apache.seatunnel.connectors.seatunnel.rabbitmq.config;
Review Comment:
Thank you for your contribution. The license should be at the top
--
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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "nzw921rx (via GitHub)" <gi...@apache.org>.
nzw921rx commented on code in PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795#discussion_r3776793878
##########
seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/source/RabbitmqSourceFactory.java:
##########
@@ -62,7 +77,6 @@ public OptionRule optionRule() {
RabbitmqSourceOptions.REQUESTED_HEARTBEAT,
RabbitmqSourceOptions.PREFETCH_COUNT,
RabbitmqSourceOptions.DELIVERY_TIMEOUT,
- RabbitmqSourceOptions.SCHEMA,
Review Comment:
This should be kept here, and `table_config` can also be defined without passing 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][RabbitMQ] Migrate source config validation to OptionRule [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo commented on PR #11795:
URL: https://github.com/apache/seatunnel/pull/11795#issuecomment-5283074278
Thanks for your contribution! This is a solid addition to the project, and your attention to detail really shows. Contributors like you are what keep this community moving forward. Feel free to keep the PRs coming — we're always glad to have you here!
Please ignore the following message if you have joined in the Slack~
```
To facilitate focused communication among contributors, we’ve created a brand-new dedicated #contributors channel in official Slack workspace.
Slack workspace link: https://s.apache.org/seatunnel-slack
This channel is designed for technical discussions, feature design brainstorming, roadmap sync and direct communication with project core Contributors. Everyone who contributes code, docs, test cases or community ideas is warmly invited to join, share thoughts and collaborate together under The Apache Way. Welcome to join 😄
```
--
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