HomeMesosphereNo notifications. 4 unresolved issues.

Adding Plugin Initialization Handling
ClosedAll Users

Authored by kensipe on Aug 9 2017, 9:58 PM.

Details

Summary

This provides a RuntimeException for InitializationExceptions to the plugin lib along with error handling for the plugin initialization.
This allows a plugin to throw an InitializationException if it is unable to init properly. Implementation details left to the plugin.
This has the limitation of requiring plugins that want this feature to implement the PluginConfiguration interface. Throwing exceptions
in the constructor will still be handled stopping the JVM but will be less graceful.

Additionally the exception handling in PluginManagerImpl is NOT absolutely necessary. However without it the stacktrace on JVM exit is 10x as long
and can be misleading IMO. It will have a large numbef of guice initialization failures in other parts of the system complaining about akka actor setup
etc. With this error handling in place it is a simple stack trace of the issue.

This is part 1 of the full implementation regarding the filed JIRA. The heart of the solution is in the plugin.

Test Plan

run tests

Diff Detail

Repository
rMARATHON marathon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Changes from before your most recent comment are hidden. Show Older Changes
jeschkies accepted this revision.Aug 16 2017, 6:57 PM

Thanks for your patience!

plugin-interface/src/main/scala/mesosphere/marathon/plugin/plugin/InitializationException.scala
4 ↗(On Diff #3993)

If you remove this file you should be good to go from my side :).

kensipe updated this revision to Diff 4045.Aug 16 2017, 10:31 PM
  • changing catch to Runtime providing the same behavior for Initialization issues and illegal argument issues.
  • moved exception to inner plugin package. It is the plugin configuration for which the initialization exception applies
  • proper packaging after refactor
  • switching to NonFatal for exception handling
  • switched exit to the crash strategy
  • pulling crash strategy out of modules and defining one at core configuration
  • starting plugin testing... switch to another task for now
  • removing runtime exception per team discussion.
jenkins requested changes to this revision.Aug 16 2017, 10:32 PM
This revision now requires changes to proceed.Aug 16 2017, 10:32 PM
✗ Build of 4045 failed jenkins-public-marathon-phabricator-777.

Error message:

Stage Compile and Test failed.

(๑′°︿°๑)

This revision was automatically updated to reflect the committed changes.