timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-33830] Hooks to get plugin lifecycle events #8026

Open timja opened 8 years ago

timja commented 8 years ago

Some plugin might like to do interesting things with plugin lifecycle, when a plugin is installed or uninstalled.

There is InitReactorListener interface but it gets loaded way early during boot time and the InitReactorListener implementations inside plugins never get loaded to receive post-boot plugin lifecycle events.


Originally reported by vivek, imported from: Hooks to get plugin lifecycle events
  • status: Open
  • priority: Minor
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 8 years ago

danielbeck:

when a plugin is installed

Makes sense; roughly similar to ExtensionList change events.

uninstalled

Makes less sense, as there's no runtime unloading of plugins, and plugins can always 'uninstalled' by deleting their HPI file while Jenkins is down. Implementing this will likely lead to misery because whoever uses the notification to do something clever will not consider this.

timja commented 8 years ago

vivek:

I see. So removal of a plugin does not change runtime functionality of that plugin unless Jenkins is restarted? That is uninstall of a plugin is not complete till restart?

In case a plugin's HPI is removed when jenkins is down should be ok as during boot process a plugin interested in funding installed plugins will get a new list from pluginManager.getPlugins().