On Wed, Jul 15, 2020 at 7:42 AM Michael Carter
<
mikeyca...@gmail.com> wrote:
> java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
> at org.jenkinsci.plugins.workflow.support.concurrent.Futures.addCallback(Futures.java:90)
> …
>
> Not sure what I did to cause the problem
Somehow pulled in an incompatible version of `guava`. Jenkins bundles
11.x, and without a lot of advanced acrobatics¹ you cannot override
this. If your plugin bundles some third-party libraries, they may be
depending on a newer version of Guava and Maven picks that version for
tests, breaking everything. Check
mvn dependency:tree
and use an `<exclusion>` as necessary. Unless the third-party library
actually _requires_ newer Guava features, in which case you have
problems.
Also, did your tests stop working with no code changes? If `master`
was blue/green until now, check whether your `Jenkinsfile` is using,
say,
buildPlugin(configurations: recommendedConfigurations())
which is nondeterministic. If tests broke inside a PR (I would
recommend a PR for all nontrivial changes, even if you are a sole
maintainer, just for trackability and CI), link to that from any post
to the mailing list.
¹Read:
https://www.jenkins.io/doc/developer/plugin-development/dependencies-and-class-loading/#pluginfirstclassloader-and-its-discontents