gharris1727 opened a new pull request, #13182:
URL: https://github.com/apache/kafka/pull/13182

   Plugin path scanning can fail for multiple reasons:
   1. A developer incorrectly implements a plugin (e.g. by not providing a 
default constructor)
   2. A packaging mistake happens, and some required class is not present on 
the plugin.path
   3. A plugin throws a runtime exception during initialization or instantiation
   
   In some of these cases, the error will propagate and crash the worker.
   In other cases, the error will be caught by the plugin path scanning 
infrastructure, and the erroneous plugin will not appear in the REST API or be 
available for running connectors/tasks. This can cause other co-packaged 
plugins to also be hidden from the REST API.
   
   1. Instead of some errors crashing the worker, all errors from plugin path 
scanning should be logged, and allow the worker to continue starting up, but 
with the faulty plugins not available.
   2. Instead of errors from one classloader hiding co-packaged plugins, the 
connect worker should continue scanning for other plugins after a failure.
   
   These should reduce the blast radius of a bad connector deployment down to 
just that one plugin class not being usable on a cluster, instead of a worker 
being offline.
   This will also help in development scenarios where exceptions and packaging 
errors are more common, as only tests pertaining the the faulty connector will 
fail, rather than an entire suite failing because the worker was unable to 
start.
   
   This PR also adds tests for a variety of failure scenarios, and asserts that 
they each prevent the scanning from crashing the test, while still failing to 
load the faulty plugin.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to