Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state: Under Discussion Released in 3.6.0

Discussion thread: here

Voting Discussion thread: here

JIRA: here

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

...

This change will require connector developers to add service declarations to their plugins. This can be done in one of two ways:

  • Add one or more ServiceLoader manifest files.
  • Add a module-info.java  containing one or more provides … with  directives.
    • See Section 7.7.4 of the Java Language Specification 9 for details
    • Connectors using module-info files without also providing a ServiceLoader manifest will not be accessible in Java 8 environments.

Both of these are well-established Java interfaces for which public documentation should be readily available. Once a service declaration is added, plugins can be released and distributed normally.

...

The Connect Worker will have a new configuration: plugin.path.discovery  which can take one of multiple values with the following meanings:

  • ONLY_SCAN  : Corresponding to the legacy behavior, in which every class on the plugin.path is scanned on startup for plugins. In addition, a warning will be printed to suggest reconfiguring the worker to HYBRID_WARN. This is intended to silence warnings, and to disable the new code paths if a bug is present.
  • HYBRID_WARN : In addition to the legacy scanning behavior, use the new mechanism and print a warning if a class is present via scanning but not via ServiceLoader. If there are no discrepancies, a warning will be printed to suggest reconfiguring the worker with SERVICE_LOAD . This is intended to inform operators that they are depending on out-of-date plugins that need to be updated.
  • HYBRID_FAIL : Same as HYBRID_WARN , except a discrepancy between the old and new mechanisms will cause a worker to fail to start up, instead of appearing at runtime as a missing plugin. This is intended for use in downstream unit and packaging tests to assert that all plugins have been updated.
  • SERVICE_LOAD : Only use the new ServiceLoader mechanism to load plugins. This is intended for production usage after all plugins have been updated, and will be the only mode with performance benefits.

...

If a plugin declares an implementation via a module-info.java file, a duplicate shim manifest will not be generated. If a plugin declares an implementation via a module-info.java which is not loadable, the module-info.java will not be modified.

This script will only list and migrate plugins which are on the plugin.path of a Connect worker, and are loaded in isolation. This script will not list or migrate plugins which are included on the classpath, and will assume that classpath plugins have manifests added through some other method.

Compatibility, Deprecation, and Migration Plan

...