You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(plugin): report a partial unload when a JAR replace fails #117
DynamicJobLoaderService.doReplaceJar sets unloaded = true only after doUnloadJob(definitionId, false) returns. doUnloadJob unregisters the plugin (pluginRegistryService.unregisterDynamicPlugin) and closes its classloader before it saves the UNLOADED status. If that save throws, the plugin is already unregistered on this instance, but the JAR_REPLACED FAILURE audit says "Nothing was changed; ..." because unloaded is still false.
Proposed Solution
Make the failure outcome reflect how far the unload got. For example, have the unload report the point it reached, or mark the replace as unloaded as soon as the plugin is unregistered, so the audit says the plugin was unregistered and is no longer runnable on this instance.
Acceptance Criteria
When the unload fails after unregistering the plugin, the JAR_REPLACED FAILURE audit does not say "Nothing was changed" and names the plugin's actual state.
The new JAR is still discarded in that case.
A test simulates a failure of the UNLOADED save during replace and asserts the audit text.
Affected Area
Plugin lifecycle: job definition JAR replace
Out of Scope
Re-registering the plugin automatically after a failed unload.
Activity