Regards,Dean Stalker
Well, there are two reliable ways:
1. Download the plugins from the Gerrit-CI (see [1])
2. Install the plugins using the plugin manager inside Gerrit (see [2] from the URL of running 'docker run -ti -p 80:8080 -h localhost gerritcodereview/gerrit’)
P.S. When you start Gerrit’s docker container, you may notice at the end of the startup sequence log the following message:
"[plugin-manager-preloader] INFO com.googlesource.gerrit.plugins.manager.OnStartStop : 38 plugins successfully pre-loaded”
The above message means that:
- The plugins versions are NOT all over the place
- The plugins are getting properly built and verified on the CI
- The availability of plugins for a Gerrit version is well organised and available for you to use
On 16 Apr 2025, at 00:26, Dean Stalker <dean.s...@gmail.com> wrote:Hi Luca,On Wed, Apr 16, 2025 at 7:28 AM Luca Milanesio <luca.mi...@gmail.com> wrote:
Well, there are two reliable ways:
1. Download the plugins from the Gerrit-CI (see [1])This is what prompted this message to the group out of frustration. We were ready to upgrade to 3.11, but our CI failed due to the 'go-import' plugin. It only has a `master-master` version, and no stable versions exist. After logging in to Gerrit Forge, I noticed that there weren't any prior builds to fall back to on the master branch.https://gerrit-ci.gerritforge.com/view/Plugins-master/job/plugin-go-import-bazel-master-master/ is the only build available.Downloading and installing that plugin build results in the following error:gerrit-1 | [2025-04-15T01:23:55.585Z] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.11.2
gerrit-1 | [2025-04-15T01:23:55.600Z] [main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
gerrit-1 | java.lang.NoClassDefFoundError: com/google/gerrit/server/permissions/RefPermissionOrLabel
gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
gerrit-1 | at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3549)
gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2727)
It turns out that class only exists in 3.12-rc*, breaking support for it in 3.11. But from what I can see in the stable channels on Gerrit CI, there is no alternative to grab the last compatible version. The repository at https://gerrit.googlesource.com/plugins/go-import/ is out of date, the master branch doesn't correlate with what I'm seeing. So if I'm painting a wide brush across the plugin developers who are doing the right thing, I apologise, for those who aren't ... can the maintainer be advised they're breaking things ?
2. Install the plugins using the plugin manager inside Gerrit (see [2] from the URL of running 'docker run -ti -p 80:8080 -h localhost gerritcodereview/gerrit’)
P.S. When you start Gerrit’s docker container, you may notice at the end of the startup sequence log the following message:
"[plugin-manager-preloader] INFO com.googlesource.gerrit.plugins.manager.OnStartStop : 38 plugins successfully pre-loaded”This is not an option, as we orchestrate Gerrit's deployment from CI/CD, and if its getting the plugins from the same place, it will still cause breakage.
The above message means that:
- The plugins versions are NOT all over the place
- The plugins are getting properly built and verified on the CI
- The availability of plugins for a Gerrit version is well organised and available for you to use
For the most part, these are true. However, my experience with one of the plugins is frustrating.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/CAOi92h6m4okacaV%3DVerw_RXHHnei-nF1X%3DAL13%3DY6Q97i%2B1P3Q%40mail.gmail.com.
Is there a way to reliably target certain plugin versions on Gerrit Forge? I want to download only plugins for v3.10 while we prepare for the v3.11 upgrade.
So far, I'm seeing certain plugins adhering to the `stable-3.x` naming format and others happily committing release candidate code to master (go-import) without providing a stable version to test against (the last attempt was 3.5 for go-import).
Hello,
The summary is: use the master branch, else a matching stable branch, else ask for such stable branch to be created.
Our setup has several additional plugins which we compile from
source. Whenever upgrading Gerrit I thus lookup for each plugin
whether there is an update that would match the target version.
The heuristic I use if upgrading to eg v3.11.2 would be to lookup
for:
The testing of the master branch is only done against the master
version of Gerrit. The master branch is only assumed to
work on the supported
versions but there is no guarantee.
When someone finds out the master branch fails for a version, the
maintainer of the plugin would cut a branch for the affected
version, either to a commit before the breaking change or to
master and then add a fix for that stable branch.
I think the Zuul CI has support to test a change to a plugin
master branch against older stable versions of Gerrit, but I could
not find an example so maybe I have only dreamed about it.
HEAD of go-import is from 3 years ago (it is both master and
stable-3.5). It is working with 3.10 (our setup).
If the plugin breaks with 3.11 then a fix is required there which
will be send to the master branch. You would then continue using
the master branch.
If the fix is not compatible with 3.10, a stable-3.10 branch would
need to be created pointing to the code before the fix. Users of
3.10 would point to it and users of 3.11 and others would use
master.
cheers,
-- Antoine "hashar" Musso Release Engineering
https://gerrit-ci.gerritforge.com/view/Plugins-master/job/plugin-go-import-bazel-master-master/ is the only build available.
Downloading and installing that plugin build results in the following error:
gerrit-1 | [2025-04-15T01:23:55.585Z] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.11.2
gerrit-1 | [2025-04-15T01:23:55.600Z] [main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
gerrit-1 | java.lang.NoClassDefFoundError: com/google/gerrit/server/permissions/RefPermissionOrLabel
gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
gerrit-1 | at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3549)
gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2727)
Hello Dean,
As you found out it is broken. The reason is the Gerrit CI
compiles the plugin using the master branch of Gerrit which is not
back compatible with 3.11. You would need to compile the plugin
yourself using the stable-3.11 version of Gerrit.
The Gerrit CI can be enhanced to create jobs that compiles against
each of the currently
supported versions. I have proposed https://gerrit-review.googlesource.com/c/gerrit-ci-scripts/+/468183
to add jobs that would build the go-import plugin versions 3.9,
3.10 and 3.11 of Gerrit.
Cheers,
Cheers,
-- Antoine "hashar" Musso Release Engineering
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/f6b52bc0-4451-4bdb-b02c-aae7263d6380%40wikimedia.org.
On Wed, Apr 16, 2025 at 11:11 AM Antoine Musso <amu...@wikimedia.org> wrote:Le 16/04/2025 à 01:26, Dean Stalker a écrit :
https://gerrit-ci.gerritforge.com/view/Plugins-master/job/plugin-go-import-bazel-master-master/ is the only build available.
Downloading and installing that plugin build results in the following error:
gerrit-1 | [2025-04-15T01:23:55.585Z] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loaded plugin gitiles, version v3.11.2
gerrit-1 | [2025-04-15T01:23:55.600Z] [main] ERROR com.google.gerrit.pgm.Daemon : Thread main threw exception
gerrit-1 | java.lang.NoClassDefFoundError: com/google/gerrit/server/permissions/RefPermissionOrLabel
gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
gerrit-1 | at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3549)
gerrit-1 | at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2727)Hello Dean,
As you found out it is broken. The reason is the Gerrit CI compiles the plugin using the master branch of Gerrit which is not back compatible with 3.11. You would need to compile the plugin yourself using the stable-3.11 version of Gerrit.
The Gerrit CI can be enhanced to create jobs that compiles against each of the currently supported versions. I have proposed https://gerrit-review.googlesource.com/c/gerrit-ci-scripts/+/468183 to add jobs that would build the go-import plugin versions 3.9, 3.10 and 3.11 of Gerrit.I tried to compile the go-import plugin's master branch in-tree against gerrit core master and installed it intoa gerrit site using gerrit stable-3.11 and that seems to work. On the other hand if I download the latest build of go-import plugin from gerrit-ciI can reproduce the NoClassDefFoundError.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/2e6a2fbf-539d-498b-b739-c07e53d2b37an%40googlegroups.com.
Hi Sven, Rikard, David,Thank you guys for fixing this. I can confirm the latest go-import builds on master and 3.9 are working correctly.
On Wednesday, April 23, 2025 at 1:45:30 AM UTC+2 Dean Stalker wrote:
Hi Sven, Rikard, David,
Thank you guys for fixing this. I can confirm the latest go-import builds on master and 3.9 are working correctly.
Hehe, I wish we could take credit for the fix but it was Antoine who fixed it.
https://gerrit-review.googlesource.com/c/gerrit-ci-scripts/+/468183
Oh it is all team work! My patch would not have been possible
without:
Anyway I am happy to have participated in a fix, that would
surely benefit me when I am upgrade from 3.10 to 3.11 :)
cheers,