feat(F18): plugin-to-core connector bridge - #76
Merged
Merged
Conversation
Implement the missing integration layer between the plugin system and the core connector SPI so installed plugins are usable by pipelines, snapshots, CDC, and metadata discovery. New classes: - PluginConnectorAdapter: superset adapter implementing all core SPI sub-interfaces (Connector, MetadataCapableConnector, SnapshotCapableConnector, CdcCapableConnector, DestinationWriter) - PluginContextAdapter, PluginCapabilitiesAdapter, PluginHealthAdapter, PluginCdcEventAdapter, PluginCursorCodec, PluginWriterAdapter: helper adapters for type conversion - ConnectorTypeResolver: maps free-form plugin connectorType string to ConnectorType enum - DelegatingConnectorRegistry: @primary connector registry composing SpringConnectorRegistry and PluginConnectorRegistry - PluginConnectorRegistry: pluginId-keyed plugin connector store Changes to existing code: - ConnectorType.GENERIC_PLUGIN enum value added - DestinationWriterProvider: added default delete() and upsert() methods (backward-compatible, existing plugins compile unchanged) - PluginManager: enable/disable/uninstall now register/unregister adapters in the connector registry Documented limitations: - rangeChunks returns single whole-table chunk (no PK splitting) - Metadata: PK/fk/index/constraint discovery return empty/zero - CDC transaction metadata is always null - Pause/resume CDC are no-op flags on plugin side - Parallel snapshot parallelism=1 for plugin-backed sources Tests: 28 new unit tests covering adapters, registry delegation, cursor round-trip, CDC event synthesis, capabilities mapping, health parsing, and operation normalization.
…ce, validation - DelegatingConnectorRegistry.unregisterPlugin(): disconnect before unregister (was: remove from map first, disconnect never fired) - readBatch cursor check: strict 'b:' prefix (was: single-char 'b', matched any plugin cursor starting with 'b') - isCdcActive(): check adapter flag first so pauseCDC makes it return false consistently with captureStatus() - startCDC(): set cdcActive=true before startCapture() to close the race window where concurrent stopCDC() skips stopCapture() - validate(): call delegate.health() and check status instead of always returning ok() (connect() was a no-op)
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.
Summary
Implements the missing integration layer between the plugin system and the core connector SPI. Installed plugins are now usable by pipelines, snapshots, CDC, and metadata discovery end to end.
What This Adds
Adapter Layer (10 new files)
PluginConnectorAdapterPluginContextAdapterPluginCapabilitiesAdapterPluginHealthAdapterPluginCdcEventAdapterPluginCursorCodecPluginWriterAdapterConnectorTypeResolverRegistry Integration (2 new files)
DelegatingConnectorRegistryPluginConnectorRegistryChanges to Existing Code
ConnectorType: addedGENERIC_PLUGINenum valueDestinationWriterProvider: added defaultdelete()andupsert()methods (backward-compatible)PluginManager: enable/disable/uninstall now register/unregister adapters in the connector registryTests (28 new unit tests)
Documented Limitations
rangeChunksreturns single whole-table chunk (no PK splitting) -- plugin SPI has no range API