jenkinsci / badge-plugin

Jenkins Badge plugin
https://plugins.jenkins.io/badge/
MIT License
32 stars 43 forks source link

version 2.0 is incompatible and breaks groovy-postbuild plugin #189

Closed mawinter69 closed 1 month ago

mawinter69 commented 1 month ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

doesn't matter

Reproduction steps

https://github.com/jenkinsci/groovy-postbuild-plugin/blob/6eeecb7aeac5faa75313280ad67ad4c938e5bdc0/src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java#L214 creates a new instance of BadgeSummaryAction I don't know the exact conditions when the code is called but it results in this stacktrace

[2024-09-18T03:04:30.919Z] java.lang.NoSuchMethodError: 'void com.jenkinsci.plugins.badge.action.BadgeSummaryAction.<init>(java.lang.String)'
[2024-09-18T03:04:30.919Z]  at PluginClassLoader for groovy-postbuild//org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder$BadgeManager.createSummary(GroovyPostbuildRecorder.java:214)
[2024-09-18T03:04:30.919Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-09-18T03:04:30.919Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

Expected Results

badge is properly created

Actual Results

build fails

Anything else?

No response

Are you interested in contributing a fix?

No response

strangelookingnerd commented 1 month ago

My suggestion is to upgrade the groovy-postbuild-plugin in order to be compatible (I had that on my bucket list anyway). WDYT?

mawinter69 commented 1 month ago

definitely a solution

mawinter69 commented 1 month ago

Once groovy-postbuild is adjusted I think the release notes should be updated to mention that groovy-postbuild must be updated as well

MarkEWaite commented 1 month ago

A pre-release of the groovy postbuild plugin is available for testing. Use the "Jenkins Incrementals Publisher" tab to access the most recent build.

knapsu commented 1 month ago

Thanks @MarkEWaite. The most recent build fixes the issue.

strangelookingnerd commented 1 month ago

Fixed in release 264.vf6e02a_77d5b_c of the groovy postbuild plugin.