Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60902

Upgrade sshd-module to use SSHD 2.x

    Details

    • Similar Issues:

      Description

      Some of the libraries that Jenkins uses (e.g. JGit) have moved on to use SSHD 2.x. This contains breaking changes. But sshd-module still expects SSHD 1.x. The incompatibilities cause either compile-time or runtime 'class not found' errors in Jenkins and its plugins.

      We need to bump our SSHD dependencies to fix this.

      Options:

      • SSHD 2.2.0 (also used by the current release of JGit)
      • SSHD 2.3.0 (the very latest version)

      Affected downstream components:

      • Gerrit Trigger plugin
      • git-server plugin
      • Jenkins Core CLI
      • Remote terminal access plugin
      • ...

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          When the first 2.0 versions were announced, I was a bit hesitant about moving immediately due to compatibility issues. I believe we should move rather sooner than later, so we should definitely start exploring our options to keep compatibility as much as possible.

          > In my experience, the number 1 cause of compilation errors and runtime NoClassDefFoundErrors from this change is that Command and CommandFactory have been moved to a sub-package.

          For this purpose we could create bridge classes in SSHD Module and to extend the moved classes. But we need a full scope of breaking changes to analyze and mitigate the impact

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - When the first 2.0 versions were announced, I was a bit hesitant about moving immediately due to compatibility issues. I believe we should move rather sooner than later, so we should definitely start exploring our options to keep compatibility as much as possible. > In my experience, the number 1 cause of compilation errors and runtime NoClassDefFoundErrors from this change is that  Command  and  CommandFactory  have been moved to a sub-package. For this purpose we could create bridge classes in SSHD Module and to extend the moved classes. But we need a full scope of breaking changes to analyze and mitigate the impact  
          Hide
          markewaite Mark Waite added a comment -

          This seems like a large enough change to justify setting the major number of the sshd module to 3.0. The prior releases of sshd module did not seem to contain major API breaking changes like this one does.

          Show
          markewaite Mark Waite added a comment - This seems like a large enough change to justify setting the major number of the sshd module to 3.0. The prior releases of sshd module did not seem to contain major API breaking changes like this one does.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          3.0 for sure if it remains a module. I am rather tempted to merge https://github.com/jenkinsci/sshd-module/pull/29 from Jesse Glick and move it to the plugin entirely before bumping the dependency, but it will require bumps to recent Jenkins core versions in all dependent plugins to get the issue fixed. Not sure what would rsandell say about Gerrit trigger

          Show
          oleg_nenashev Oleg Nenashev added a comment - 3.0 for sure if it remains a module. I am rather tempted to merge  https://github.com/jenkinsci/sshd-module/pull/29  from Jesse Glick and move it to the plugin entirely before bumping the dependency, but it will require bumps to recent Jenkins core versions in all dependent plugins to get the issue fixed. Not sure what would rsandell say about Gerrit trigger
          Hide
          jglick Jesse Glick added a comment -

          Is there some urgency here?

          The incompatibilities cause either compile-time or runtime 'class not found' errors in Jenkins and its plugins.

          Do you mean that these incompatibilities would cause such errors were we to carelessly update, say, the git-client plugin’s dependency? Or that there are such errors for users today?

          Show
          jglick Jesse Glick added a comment - Is there some urgency here? The incompatibilities cause either compile-time or runtime 'class not found' errors in Jenkins and its plugins. Do you mean that these incompatibilities would cause such errors were we to carelessly update, say, the git-client plugin’s dependency? Or that there are such errors for users today?
          Hide
          chriskilding Chris Kilding added a comment -

          Let’s say not an immediate urgency but perhaps a medium-term one...

          I get those errors in my plugin today, but fortunately only in tests: this is because the JGit SSH JUnit helper lib pulls in SSHD 2.2.0. It doesn’t affect my plugin in operation as I don’t need JGit in compile scope.

          But a plugin that does need a recent JGit version in compile scope would be affected today.

          Show
          chriskilding Chris Kilding added a comment - Let’s say not an immediate urgency but perhaps a medium-term one... I get those errors in my plugin today, but fortunately only in tests: this is because the JGit SSH JUnit helper lib pulls in SSHD 2.2.0. It doesn’t affect my plugin in operation as I don’t need JGit in compile scope. But a plugin that does need a recent JGit version in compile scope would be affected today.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Just an update here, 2.222.x LTS has happened recently. If we want to land an incompatible change, it would be great to do so in one month or so so that we can get plugins verified and, if needed, fixed before the next LTS

          Show
          oleg_nenashev Oleg Nenashev added a comment - Just an update here, 2.222.x LTS has happened recently. If we want to land an incompatible change, it would be great to do so in one month or so so that we can get plugins verified and, if needed, fixed before the next LTS

            People

            • Assignee:
              Unassigned
              Reporter:
              chriskilding Chris Kilding
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: