Skip to content

[flink] Centralize action factory registration in flink-common - #5407

Merged
luoyuxia merged 1 commit into
apache:mainfrom
luoyuxia:fix/flink-common-action-spi
Nov 28, 2026
Merged

luoyuxia merged 1 commit into
apache:mainfrom
luoyuxia:fix/flink-common-action-spi

Conversation

@luoyuxia

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: Part of #4846; follow-up to #5400.

Action implementations live in fluss-flink-common, but their ServiceLoader registrations are only shipped by the version-specific connectors. Downstream connectors that depend on common must repeat these registrations to discover the actions.

Ship the registrations with the common implementations while keeping orphan cleanup excluded from the Flink 1.18 connector.

Brief change log

  • Move the shared ActionFactory service descriptor to fluss-flink-common and remove duplicate descriptors from Flink 1.19, 1.20, 2.2 and 2.3.
  • Keep Flink 1.18's BulkLoad-only descriptor. Exclude the common descriptor during shading alongside the existing orphan cleanup class exclusion.

Tests

  • Packaged Flink 1.18 and 1.20 with their reactor dependencies using ./mvnw package -t /tmp/fluss-commit-toolchains.xml -pl fluss-flink/fluss-flink-1.18,fluss-flink/fluss-flink-1.20 -am -DskipTests -Dmaven.jar.forceCreation=true. Checkstyle, Spotless and license checks passed.
  • Inspected the common and connector JARs: common and Flink 1.20 register both factories; Flink 1.18 registers only BulkLoad and contains no orphan cleanup classes.
  • Ran FlussActionEntrypoint --help from both packaged connector JARs. Flink 1.18 lists only load_lake_data_to_fluss; Flink 1.20 lists it and remove_orphan_files.

The full test suite was not run; this change only relocates service metadata and adjusts the Flink 1.18 shading filter.

API and Format

No API or storage format changes. ServiceLoader metadata is now included in the common artifact; supported actions in the packaged version-specific connectors remain unchanged.

Documentation

No new action or option. No user documentation changes needed.

Ship the ActionFactory service descriptor with the common implementations
so downstream connectors inherit both built-in actions. Keep Flink 1.18's
local descriptor and exclude the common descriptor during shading to avoid
registering the unsupported orphan cleanup action.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-6
AI-Contributed/Feature: 62/62
AI-Contributed/UT: 0/0
@luoyuxia
luoyuxia merged commit 60f8d54 into apache:main Nov 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant