Skip to content

Require Java 11 and Jenkins 2.361.4 or newer - #939

Merged
MarkEWaite merged 20 commits into
jenkinsci:masterfrom
MarkEWaite:require-java-11
Dec 25, 2022
Merged

Require Java 11 and Jenkins 2.361.4 or newer#939
MarkEWaite merged 20 commits into
jenkinsci:masterfrom
MarkEWaite:require-java-11

Conversation

@MarkEWaite

@MarkEWaite MarkEWaite commented Dec 3, 2022

Copy link
Copy Markdown
Contributor

Require Java 11 and Jenkins 2.361.4 or newer

  • Test Java 11 and Java 17 in CI
  • Do not include JGit or Java 8 links in Javadoc
  • Remove site generation customization
  • Require Jenkins 2.371.4 or newer
  • Use JGit 6.4.0
  • Update JGit javadoc link to JGit 6.4.0
  • Remove Java 8 reference from contributing guide

Switch from Java 8 to Java 11 as minimum Java version. Use JGit 6.4.0 instead of JGit 5.13.x.

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

  • New feature (non-breaking change which adds functionality)

Further comments

JGit project has dropped support for Java 8 with the release of JGit 6.0. It is time to run exclusively on Java 11 or newer.

  • Needs Fix JMH environment test setup #940 to be merged to the master branch before this can be merged.
  • JMH benchmark comparison between JGit 5.13.1 and JGit 6.4.0. The JMH comparison shows no significant regressions in JGit 6.4.0 performance compared to JGit 5.13.1. Measurements on large repository fetch operations showed a small improvement in JGit 6.4.0 compared to JGit 5.13.1. No attempt was made to confirm the details of the differences, only happiness that JGit 6.4.0 seems to consistently match or exceed JGit 5.13.1 performance
  • Test git client plugin 4.0.0 incremental bom#1619 needs to be run successfully to confirm that this pull request does not break something in the plugin bill of materials.
  • The fetch/clone failures on my cluster with FreeBSD agents running Java 11.0.16 were resolved by restarting the agents after installation of the pre-release that includes JGit 6.4.0

@MarkEWaite MarkEWaite added the enhancement Improvement or new feature label Dec 3, 2022
@github-actions github-actions Bot added the test Automated test addition or improvement label Dec 3, 2022
@MarkEWaite
MarkEWaite marked this pull request as draft December 3, 2022 21:48
@MarkEWaite MarkEWaite removed the test Automated test addition or improvement label Dec 3, 2022
@basil

basil commented Dec 4, 2022

Copy link
Copy Markdown
Member

jenkinsci/git-plugin#1367 and this PR work fine for me on my local Linux development machine with both Freestyle and Pipeline jobs cloning with both command-line Git and JGit on the latest weekly release and Java 19. What's your stack trace from the FreeBSD box?

@MarkEWaite

MarkEWaite commented Dec 4, 2022

Copy link
Copy Markdown
Contributor Author

jenkinsci/git-plugin#1367 and this PR work fine for me on my local Linux development machine with both Freestyle and Pipeline jobs cloning with both command-line Git and JGit on the latest weekly release and Java 19. What's your stack trace from the FreeBSD box?

As far as I can tell, the stack traces no longer appear once I explicitly restarted the FreeBSD agents. I'll continue to monitor the behavior.

Stack traces reported by various FreeBSD agents running Java 11.0.16 as provided by /usr/local/bin/java from an install with pkg:

freebsd-13-b-jagent

Agent successfully connected and online
Dec 03, 2022 12:24:30 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@47a6ecbb
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

freebsd-13-c-jagent

Agent successfully connected and online
Dec 03, 2022 12:25:14 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@2d717a01
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 4:52:53 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@47cff41f
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 6:33:47 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@2c758192
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

freebsd12-d-jagent

Dec 03, 2022 11:45:35 AM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@624111b2
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 11:50:09 AM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@82e6a5e
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 11:51:14 AM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@7cf66bd0
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Dec 03, 2022 11:51:17 AM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@27bfb0a8
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

gcp-fr3eebsd-13-1-a

Agent successfully connected and online
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
Dec 03, 2022 5:17:19 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@798634b8
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 5:34:00 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@66cc8cc9
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 5:35:34 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@656bf7c
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 6:53:32 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@710c49b8
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 6:53:39 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@7c777d08
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

Dec 03, 2022 6:53:45 PM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing UserRequest:org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable@c6a20f5
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.SshSessionFactory$DefaultFactory
        at org.eclipse.jgit.transport.SshSessionFactory.setInstance(SshSessionFactory.java:91)
        at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:166)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:184)
        at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:166)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3492)
        at hudson.remoting.UserRequest.perform(UserRequest.java:211)
        at hudson.remoting.UserRequest.perform(UserRequest.java:54)
        at hudson.remoting.Request$2.run(Request.java:377)
        at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

@basil

basil commented Dec 4, 2022

Copy link
Copy Markdown
Member

As far as I can tell, the stack traces no longer appear once I explicitly restarted the FreeBSD agents. I'll continue to monitor the behavior.

Did you need to restart the whole box or just the Remoting process? Restarting the whole box should not be necessary but I would not be surprised if Remoting was caching loaded classes from before the upgrade leading to a situation where both old and new versions of JGit classes were present in the same classloader at the same time. As annoying as restarting the Remoting process is, it seems like the path of least resistance to simply mention this in the release notes / upgrade documentation.

@MarkEWaite

Copy link
Copy Markdown
Contributor Author

Did you need to restart the whole box or just the Remoting process?

I disconnected the agent from the Jenkins agents page. No restart of the computer hosting the agent.

Restarting the whole box should not be necessary but I would not be surprised if Remoting was caching loaded classes from before the upgrade leading to a situation where both old and new versions of JGit classes were present in the same classloader at the same time. As annoying as restarting the Remoting process is, it seems like the path of least resistance to simply mention this in the release notes / upgrade documentation.

I like that suggestion. I thought that I had completely restarted Jenkins after upgrading the plugin, but I may be wrong on that recollection. In any case, it is a good idea to recommend that agents be restarted when the git client plugin is upgraded to use the new JGit library.

@github-actions github-actions Bot added the test Automated test addition or improvement label Dec 5, 2022

@basil basil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jenkinsci/git-plugin#1367 and this PR work fine for me on my local Linux development machine with both Freestyle and Pipeline jobs cloning with both command-line Git and JGit on the latest weekly release and Java 19.

@MarkEWaite
MarkEWaite marked this pull request as ready for review December 6, 2022 22:57
@MarkEWaite

Copy link
Copy Markdown
Contributor Author

I'm not ready to release it yet, but I've marked it as "Ready for Review" because it has passed automated testing, interactive testing, and plugin compatibility testing in the BOM repository. I hope to release by the end of December 2022, together with a release of git plugin 5.0.0.

MarkEWaite added a commit to MarkEWaite/pipeline-groovy-lib-plugin that referenced this pull request Dec 18, 2022
Git plugin 5.0 will require Java 11 and will add symbols to improve
the Pipeline syntax editing experience.  The test being modified in
this pull request checks the specific syntax of the Pipeline snippet
syntax generator.  Adapt the test to check for current syntax with git
plugin 4.x releases and for new syntax with any other releases.

jenkinsci/git-client-plugin#939 is the git
client plugin pull request that prepares git client plugin 4.0.0.
It will require Java 11 and will upgrade from JGit 5.13.1 to JGit 6.4.0.

jenkinsci/bom#1619 is the bom draft pull request
that confirms git client plugin 4.0.0 pre-release works in the plugin bom.

jenkinsci/git-plugin#1367 is the git plugin pull
request that prepares git plugin 5.0.0.  It will require Java 11.

jenkinsci/bom#1624 is the bom draft pull request
that tests git plugin 5.0.0 works in the plugin bom.

jenkinsci/git-plugin#1373 is the git plugin pull
request that relies on jenkinsci/git-plugin#1367
and adds symbols to the git plugin.

jenkinsci/bom#1625 is the bom draft pull request
that tests git plugin 5.0.0 with added symbols works in the plugin bom.
It detected this test failure when run with git plugin 5.0.0 pre-release.
@MarkEWaite MarkEWaite removed the test Automated test addition or improvement label Dec 25, 2022
@MarkEWaite
MarkEWaite merged commit 656c060 into jenkinsci:master Dec 25, 2022
@MarkEWaite
MarkEWaite deleted the require-java-11 branch December 25, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants