Bug P0
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: gerrit
Branch: stable-3.9
commit 3cadc00490e111daa8c56df742f9a25db48bdf6e
Author: Luca Milanesio <luca.milanesio@gmail.com>
Date: Mon Jun 10 23:42:16 2024
Manage attach of ApiModule binding upon plugin reload
The introduction of the x-plugin communication in I63c9b7f2a
did not consider the special case of plugin reloading where
the bindings are updated atomically rather than being
removed and reconnected.
Reattach all Dynamic{Item,Set,Map} also coming from ApiModule
when reloading plugins in the same way was done for the other
API provided by Gerrit core.
Bug: Issue 346350837
Release-Notes: Fix binding of ApiModule bindings upload plugin reload
Change-Id: I6cda1b3fcf9dcd14ea851f765099be8707071c62
M java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java
https://gerrit-review.googlesource.com/429357
Branch: stable-3.9
commit 3cadc00490e111daa8c56df742f9a25db48bdf6e
Author: Luca Milanesio <luca.milanesio@gmail.com>
Date: Mon Jun 10 23:42:16 2024
Manage attach of ApiModule binding upon plugin reload
The introduction of the x-plugin communication in I63c9b7f2a
did not consider the special case of plugin reloading where
the bindings are updated atomically rather than being
removed and reconnected.
Reattach all Dynamic{Item,Set,Map} also coming from ApiModule
when reloading plugins in the same way was done for the other
API provided by Gerrit core.
Bug:
Release-Notes: Fix binding of ApiModule bindings upload plugin reload
Change-Id: I6cda1b3fcf9dcd14ea851f765099be8707071c62
M java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java
Description
*** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!! *** Do not submit bugs for chrome/android and issues with your company's *** Gerrit setup here. Those issues belong in different issue trackers.
Background
The introduction of x-plugin communication with the
ApiModule
in Gerrit v3.9 has introduce an additional step in the mapping ofDynamicItem
,DynamicSet
andDynamicMap
. The additional step was missed in thePluginGuiceEnvironment
which implemented only theonStartPlugin()
but not theonReloadPlugin()
.How to reproduce the issue
What steps will reproduce the problem?
$GERRIT_SITE/plugins
ssh -p 29418 admin@localhost gerrit-random generate
gerrit-random-impl
with the commandssh -p 29418 admin@localhost gerrit reload gerrit-random-impl
What is the expected output?
The plugin
gerrit-random-impl
is reloaded and the new implementation of theDynamicItem
replaces the old one.What do you see instead?
The
DynamicItem
isn't bound anymore after the reload.Additional information below.
The
onReloadPlugin()
needs to have the additional binding of theApiModule
which was missed in the initial implementation.