Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Hudson-ci/features/Load Plugins Without Restart
Load Plugins Without Restart
The need to restart Hudson for routine system administration adversely affects the perceived stability of the server. Even a soft restart, with adequate warning, interrupts build flow, ability to configure jobs, etc. Particularly with the new Team feature, restart on behalf of one team adversely affects all the others.
There are several cases where administration requires restart<nowiki>&emdash;</nowiki>for example, a configuration change in a cascaded job is not propagated to jobs that should inherit the change until Hudson is restarted<nowiki>&emdash;</nowiki>but the most common cases are plugin loading and update. These vary considerably in difficulty.
- Initial plugin loading is probably safe for most plugins as long as plugin dependencies are properly satisfied, although there may be cases where plugins expect Hudson not to be running when they initialize.
- Plugin update without the plugin's knowledge could fail for any number of reasons.
- Any dependent plugins must also be reloaded; those reloads might fail.
- To avoid memory leaks, superseded plugin classes and instances must not be allowed to remain in memory. This may be difficult or impossible to ensure without the plugin's cooperation.
- All plugin-started threads must be interrupted. This implies that long-running CPU operations should be interruptable.
- All references to the plugin, e.g., by extension points, must be freed.
For this reason, dynamic plugin loading will be presumed safe unless the plugin indicates otherwise, while dynamic plugin update will be presumed unsafe and will not be attempted in this release.
Manifest Directives
The following directive will be recognized in the plugin's MANIFEST.MF file:
Support-Dynamic-Loading: true|false
If the manifest of a plugin or any plugin it depends on contains Support-Dynamic-Loading: false
, loading the plugin will require restart. Otherwise (directive is absent or specifies true
) the plugin will be loaded without restart.