You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Status

Current state: Under Discussion

Discussion thread: here

JIRA: here

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Connect has a REST API where clients can easily ask for which connectors are loaded by the Worker. SMTs are popular feature, and it would be great to have a programmatic way to ask the worker which SMTs it has loaded. Currently the best way to do this is by parsing logs.

Existing endpoint to get Connectors is actually called "GET /connector-pluings", implying it should be used for all plugins. In reality, Connectors are just one type of plugin: Other types include Simple Message Transformations (SMTs), Converters, HeaderConverters, ConfigProviders, and RestExtensions (loaded by the "DelegatingClassLoader").

This KIP will add HTTP endpoints for Transformations, Converters, HeaderConverters, ConfigProviders, and ConnectRestExtensions to Connect RestServers.

Public Interfaces


The new endpoints are specified below in bold in OpenApi format.

/connector-plugins
get:
summary: Lists available Connector plugins
...
...

/plugins

  get:

    summary: Returns plugin descriptions of all types

....

/plugins/{pluginType}:

  get:

    summary: Returns plugin descriptions of the given type

    parameters:

      -in: path

        name: pluginType

        schema:

          type: string

        required: true

        description: pluginType can be one of Connector, Converter, HeaderConverter, Transformation, ConfigProvider, ConnectRestExtension

....

Return types for 200OK responses will be same schemas as existing return types for existing endpoint "GET /connector-plugins".


Proposed Changes

The new endpoints are described in the API Spec above.

The proposal is to implement them on a new "PluginsResource" analogous to the existing "ConnectorPluginsResource", and using the ConnectorPluginsResource's access to a Herder instance, by using Herder.plugins(), analogous to existing ConnectorPluginsResource.getConnectorPlugins(). 

Compatibility, Deprecation, and Migration Plan

This is a simple addition, so no compatibility or migration issues. Existing APIs are intentionally left unaltered for simplicity.

We will need to update the docs.

Rejected Alternatives

Limiting scope of KIP to just SMTs

The scope could be limited to just adding HTTP Endpoints for just SMTs, which have the most pressing need. However, any design extending the current API to include SMTs would be designed to be elegantly extensible, and then most of the work to just include the other Plugin types is already done.

Updating existing endpoint for "GET /connector-plugins/" to include all plugins, as its name suggests

This strategy would break compatibility, and there are suitable alternatives without breaking changes.

Add implementation on existing ConnectorsPluginsResource

This idea is good, too, but leaned towards a new class to keep the naming very precise.


  • No labels