Skip to content

Conversation

@Hisoka-X
Copy link
Member

Purpose of this pull request

Remove useless parameter in ConfigBuilder

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@github-actions github-actions bot added core SeaTunnel core module Zeta e2e labels Jun 24, 2025
@nielifeng nielifeng requested a review from Copilot June 25, 2025 03:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes an unused isJson parameter from various ConfigBuilder.of methods and updates all call sites to the new two-argument signature.

  • Dropped the third boolean flag (isJson) from ConfigBuilder.of calls in server and starter modules.
  • Removed obsolete overloaded methods in the e2e ConfigBuilder utility.
  • Aligned method signatures across engine, core-starter, and e2e-common modules.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
seatunnel-engine/…/RestUtil.java Updated buildConfig and buildConfigList to call two-arg of
seatunnel-e2e/…/ConfigBuilder.java (e2e-common) Removed of(Map, boolean) and of(Map) overloads
seatunnel-core/…/ConfigBuilder.java (core-starter) Simplified of(Map) to delegate to two-arg of
Comments suppressed due to low confidence (3)

seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/utils/RestUtil.java:76

  • Consider adding unit tests for buildConfig and buildConfigList to verify that removing the isJson parameter does not alter JSON-based parsing behavior.
        return ConfigBuilder.of(objectMap, isEncrypt);

seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java:106

  • [nitpick] The removal of the isJson flag changes default parsing assumptions; please update the JavaDoc to explain how input maps are interpreted and what formats are supported.
    public static Config of(@NonNull Map<String, Object> objectMap, boolean isEncrypt) {

seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ConfigBuilder.java:71

  • Since the of(Map, boolean) overload was removed, ensure all test utilities that rely on encrypted parsing are updated or consider reintroducing a dedicated method for encryption scenarios to keep tests clear.
    public static Config of(@NonNull Map<String, Object> objectMap) {

@corgy-w corgy-w merged commit 7915714 into apache:dev Jun 26, 2025
6 checks passed
dybyte pushed a commit to dybyte/seatunnel that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants