[improve] sls options#9260
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the configuration options for the SLS connector by replacing legacy Config references with dedicated options classes, thereby consolidating configuration definitions and ensuring consistency between source and sink components.
- Replace legacy Config references with SlsSourceOptions, SlsSinkOptions, and SlsBaseOptions.
- Update configuration retrieval in source, sink, and factory classes.
- Remove whitelist entries for SLS options in ConnectorOptionCheckTest to validate the new configuration classes.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/source/SlsSourceFactory.java | Updated to use SlsSourceOptions for configuration. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/source/SlsSourceConfig.java | Replaced legacy Config with SlsSourceOptions while constructing consumer metadata. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/source/SlsSource.java | Updated plugin name retrieval to use SlsBaseOptions. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/sink/SlsSinkWriter.java | Retrieved sink configuration values from SlsSinkOptions. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/sink/SlsSinkFactory.java | Updated required and optional options to SlsSinkOptions. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/sink/SlsSink.java | Updated plugin name reference to SlsBaseOptions. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/config/SlsSourceOptions.java | Refactored source options by extending SlsBaseOptions. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/config/SlsSinkOptions.java | Introduced dedicated sink options. |
| seatunnel-connectors-v2/connector-sls/src/main/java/org/apache/seatunnel/connectors/seatunnel/sls/config/SlsBaseOptions.java | Centralized common SLS configuration options. |
| seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java | Removed whitelist entries for SLS options to align with the updated configuration classes. |
Comments suppressed due to low confidence (2)
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java:195
- The removal of the whitelist entry for SlsSinkOptions reflects the configuration refactor; please ensure that related test documentation is updated to clarify this change.
whiteList.add("SlsSinkOptions");
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java:197
- The removal of the whitelist entry for SlsSourceOptions is in line with the new configuration classes; consider updating any related test documentation to reflect this change.
whiteList.add("SlsSourceOptions");
corgy-w
approved these changes
May 11, 2025
hailin0
approved these changes
May 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this pull request
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note.