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

Convert modules to plugins

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      None of the currently bundled jenkins-module packages actually look like they need to be modules: they do not appear to need to be loaded in the same class loader as jenkins-core.jar, nor to have extensions/services registered early in the startup sequence. As such, they could be made into regular plugins (hpi packaging), and the usual split-plugins.txt registry used to retain compatibility for existing plugins which happen to refer to their classes (InstanceIdentity and SshCommandFactory are the main examples).

      As an aside refiled as JENKINS-57023.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Assignee Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            jglick Jesse Glick added a comment -

            Started off by making sure they all at least have up-to-date build metadata, which should make things easier.

            Show
            jglick Jesse Glick added a comment - Started off by making sure they all at least have up-to-date build metadata, which should make things easier.
            jglick Jesse Glick made changes -
            Description None of the [currently bundled {{jenkins-module}} packages|https://github.com/jenkinsci/jenkins/blob/6d2eb679a6fccc53d32708cc23c5927201953248/war/pom.xml#L95-L134] actually look like they need to be modules: they do not appear to need to be loaded in the same class loader as {{jenkins-core.jar}}, nor to have extensions/services registered [early in the startup sequence|https://javadoc.jenkins.io/jenkins/security/ConfidentialStore.html]. As such, they could be made into regular plugins ({{hpi}} packaging), and the usual {{split-plugins.txt}} registry used to retain compatibility for existing plugins which happen to refer to their classes ({{InstanceIdentity}} and {{SshCommandFactory}} are the main examples).

            As an aside, in the case of {{sshd}} / {{git-server}} this would allow the older and deprecated half of {{workflow-cps-global-lib}} to be split into its own plugin so that the {{org.jenkinsci.plugins.workflow.libs}} package can be used without reference to existing modules. This would lighten its footprint and simplify some functional test configuration.
            None of the [currently bundled {{jenkins-module}} packages|https://github.com/jenkinsci/jenkins/blob/6d2eb679a6fccc53d32708cc23c5927201953248/war/pom.xml#L95-L134] actually look like they need to be modules: they do not appear to need to be loaded in the same class loader as {{jenkins-core.jar}}, nor to have extensions/services registered [early in the startup sequence|https://javadoc.jenkins.io/jenkins/security/ConfidentialStore.html]. As such, they could be made into regular plugins ({{hpi}} packaging), and the usual {{split-plugins.txt}} registry used to retain compatibility for existing plugins which happen to refer to their classes ({{InstanceIdentity}} and {{SshCommandFactory}} are the main examples).

            -As an aside- _refiled as JENKINS-57023._
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-44100 [ JENKINS-44100 ]
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-44100 would be useful here too.

            Show
            jglick Jesse Glick added a comment - JENKINS-44100 would be useful here too.
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-41987 [ JENKINS-41987 ]
            Hide
            danielbeck Daniel Beck added a comment -

            Why though?

            Show
            danielbeck Daniel Beck added a comment - Why though?
            jglick Jesse Glick made changes -
            Remote Link This issue links to "instance-identity #17 (Web Link)" [ 22602 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "ssh-cli-auth #9 (Web Link)" [ 22603 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "slave-installer #5 (Web Link)" [ 22604 ]
            Hide
            jglick Jesse Glick added a comment -

            The JNLP 4 protocol implementation does not work unless instance-identity (or technically some InstanceIdentityProvider) is installed, so it would be cleaner to move that to a plugin as well and express a dependency.

            Show
            jglick Jesse Glick added a comment - The JNLP 4 protocol implementation does not work unless instance-identity (or technically some InstanceIdentityProvider ) is installed, so it would be cleaner to move that to a plugin as well and express a dependency.
            Hide
            danielbeck Daniel Beck added a comment -

            Or, alternatively, do none of this…?

            Show
            danielbeck Daniel Beck added a comment - Or, alternatively, do none of this…?
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I think it needs a JEP. I am in favor of killing the "module" type and converting everything to plugins, but this is a massive change which requires careful review and public discussion

            Show
            oleg_nenashev Oleg Nenashev added a comment - I think it needs a JEP. I am in favor of killing the "module" type and converting everything to plugins, but this is a massive change which requires careful review and public discussion
            jglick Jesse Glick made changes -
            Remote Link This issue links to "jenkins #3988 (Web Link)" [ 22700 ]
            Hide
            jglick Jesse Glick added a comment -

            It is actually not a large change at all; turned out to be quite straightforward. See the core PR for summary.

            Show
            jglick Jesse Glick added a comment - It is actually not a large change at all; turned out to be quite straightforward. See the core PR for summary.
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            jglick Jesse Glick made changes -
            Link This issue is blocked by JENKINS-57071 [ JENKINS-57071 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-57528 [ JENKINS-57528 ]
            Hide
            basil Basil Crow added a comment -

            Or, alternatively, do none of this…?

            I think this is worth doing. Right now, it's more or less impossible for plugins to depend on modules in a sane way (see the discussion in jenkinsci/git-server-plugin#10 to see what I mean). With this change in place, plugins could explicitly depend on the correct version of the "module" (turned plugin) that they need.

            Show
            basil Basil Crow added a comment - Or, alternatively, do none of this…? I think this is worth doing. Right now, it's more or less impossible for plugins to depend on modules in a sane way (see the discussion in jenkinsci/git-server-plugin#10 to see what I mean). With this change in place, plugins could explicitly depend on the correct version of the "module" (turned plugin) that they need.
            Hide
            jglick Jesse Glick added a comment -

            I have a to-do item to write this up a JEP by the way.

            Show
            jglick Jesse Glick added a comment - I have a to-do item to write this up a JEP by the way.
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to WEBSITE-642 [ WEBSITE-642 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment - - edited

            I have created WEBSITE-642 to deuglify the Plugin Site Web UI. Probably you want to convert this task to EPIC Jesse Glick

            Show
            oleg_nenashev Oleg Nenashev added a comment - - edited I have created  WEBSITE-642 to deuglify the Plugin Site Web UI. Probably you want to convert this task to EPIC Jesse Glick
            Hide
            jglick Jesse Glick added a comment -

            Just now realized that the slave installers only work if the inbound agent is launched in “GUI” mode, which is only available when using javaws, which is semi-deprecated and might be dropped altogether if we decline to keep signing remoting.jar. (Anyway they are only useful if the user account launching the agent has administrator privileges to register a service.) So while slave-installer and its four implementations can still be trivially converted to plugins, we may decide to stop bundling them, meaning that we would be down to three detached plugins (instance-identity, ssh-cli-auth, sshd), which might ease some of the objections to this change.

            Show
            jglick Jesse Glick added a comment - Just now realized that the slave installers only work if the inbound agent is launched in “GUI” mode, which is only available when using javaws , which is semi-deprecated and might be dropped altogether if we decline to keep signing remoting.jar . (Anyway they are only useful if the user account launching the agent has administrator privileges to register a service.) So while slave-installer and its four implementations can still be trivially converted to plugins, we may decide to stop bundling them, meaning that we would be down to three detached plugins ( instance-identity , ssh-cli-auth , sshd ), which might ease some of the objections to this change.
            jglick Jesse Glick made changes -
            Labels split-plugins-from-core split-plugins-from-core stalled-pr
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            Jesse GlickOleg Nenashev I recently started thinking to bump the Apache Mina to 2.5.x version on the SSHD module, doing it, I have found several works in progress related to this module, the bum of the library JENKINS-60902, and this one about converting the module in a plugin. After thinking deeply about it I think that we have to move it first to plugin and then bump the version of the library. So, If you do not have any objection, I'd like to take ownership of move SSHD module to a plugin, I have made one of those in the past wit the trilead-ssh2.

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - Jesse Glick Oleg Nenashev I recently started thinking to bump the Apache Mina to 2.5.x version on the SSHD module, doing it, I have found several works in progress related to this module, the bum of the library JENKINS-60902 , and this one about converting the module in a plugin. After thinking deeply about it I think that we have to move it first to plugin and then bump the version of the library. So, If you do not have any objection, I'd like to take ownership of move SSHD module to a plugin, I have made one of those in the past wit the trilead-ssh2.
            Hide
            jglick Jesse Glick added a comment - - edited

            I was actually thinking about resurrecting this effort and filing a JEP with the updated proposal. One change from the initial proposal would be to inline ssh-cli-auth into sshd. Ivan Fernandez Calvo Do you mind waiting a day or two for me to file a JEP draft so we have a baseline for discussion? It should be possible to separate the actual work and do it in stages, so it would be perfect if you wanted to handle the SSH-related portions, since you have the detailed knowledge of associated issues.

            Show
            jglick Jesse Glick added a comment - - edited I was actually thinking about resurrecting this effort and filing a JEP with the updated proposal. One change from the initial proposal would be to inline ssh-cli-auth into sshd . Ivan Fernandez Calvo Do you mind waiting a day or two for me to file a JEP draft so we have a baseline for discussion? It should be possible to separate the actual work and do it in stages, so it would be perfect if you wanted to handle the SSH-related portions, since you have the detailed knowledge of associated issues.
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            sure, there is no rush.

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - sure, there is no rush.
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue is blocking JENKINS-64104 [ JENKINS-64104 ]
            Hide
            jglick Jesse Glick added a comment -

            I filed jep #326 to both formalize this change and reflect changes to my original proposal.

            Show
            jglick Jesse Glick added a comment - I filed jep #326 to both formalize this change and reflect changes to my original proposal.
            jglick Jesse Glick made changes -
            Remote Link This issue links to "jep #326 (Web Link)" [ 26207 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue causes JENKINS-64107 [ JENKINS-64107 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "JEP-230 (Web Link)" [ 26599 ]

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              jglick Jesse Glick
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: