Skip to content

[improve] typesense options #9398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 29, 2025
Merged

Conversation

liunaijie
Copy link
Member

Purpose of this pull request

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@nielifeng nielifeng requested a review from Copilot June 6, 2025 02:12
Copy link
Contributor

@Copilot 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 pull request refactors the configuration and option classes for the Typesense connector by renaming and consolidating configuration keys to use the new options classes (TypesenseBaseOptions, TypesenseSourceOptions, and TypesenseSinkOptions).

  • Replaces deprecated config classes with the new options classes in the connector source, sink, and client code.
  • Updates tests accordingly, including configuration for e2e tests and option validation in the CI tests.

Reviewed Changes

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

Show a summary per file
File Description
seatunnel-e2e/connector-typesense-e2e/TypesenseIT.java Updated import and config mapping to use TypesenseBaseOptions.
seatunnel-connectors-v2/connector-typesense/src/test/java/org/apache/seatunnel/connectors/seatunnel/typesense/serializer/TypesenseRowSerializerTest.java Updated configuration keys from SinkConfig to the new options classes.
seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/source/* Updated source code to pull options from TypesenseBaseOptions and TypesenseSourceOptions.
seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/sink/* Updated sink options and configuration mapping to use TypesenseSinkOptions.
seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/config/* Renamed/configured option classes to reflect new naming conventions.
seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java Adjusted test whitelist to reflect configuration changes.
Comments suppressed due to low confidence (3)

seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/source/TypesenseSourceFactory.java:40

  • [nitpick] Consider using a unified constant for the connector identity (e.g., TypesenseBaseOptions.CONNECTOR_IDENTITY) in source factories for consistency with the rest of the code.
return TypesenseSinkOptions.CONNECTOR_IDENTITY;

seatunnel-ci-tools/src/test/java/org/apache/seatunnel/api/ConnectorOptionCheckTest.java:192

  • [nitpick] Confirm that the removal of TypesenseSourceOptions and TypesenseSinkOptions from the whitelist aligns with the updated configuration changes and does not cause unintended test failures.
whiteList.add("TypesenseSourceOptions") and whiteList.add("TypesenseSinkOptions") removal

seatunnel-connectors-v2/connector-typesense/src/main/java/org/apache/seatunnel/connectors/seatunnel/typesense/client/TypesenseClient.java:116

  • [nitpick] Verify that using TypesenseSourceOptions.QUERY_BATCH_SIZE.defaultValue() correctly reflects the intended default batch size behavior for search operations.
return search(collection, query, offset, TypesenseSourceOptions.QUERY_BATCH_SIZE.defaultValue());

@liunaijie liunaijie force-pushed the improve/typesense_options branch from 6971987 to 1031c2e Compare June 26, 2025 06:22
@github-actions github-actions bot added the e2e label Jun 26, 2025
Hisoka-X
Hisoka-X previously approved these changes Jun 28, 2025
corgy-w
corgy-w previously approved these changes Jun 28, 2025
@corgy-w corgy-w dismissed stale reviews from Hisoka-X and themself via eb944e6 June 28, 2025 15:00
@Hisoka-X Hisoka-X merged commit bf20a3e into apache:dev Jun 29, 2025
7 checks passed
@liunaijie liunaijie deleted the improve/typesense_options branch June 30, 2025 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants