Circular dependencies in plugins

218 views
Skip to first unread message

CLOSE Dave

unread,
Nov 2, 2017, 7:42:06 PM11/2/17
to jenkins...@googlegroups.com
I have a Jenkins server (2.87) with quite a few plugins installed. 95,
actually. I don't actually need some of them and I like to clean things
up a bit. But that doesn't seem practical.

Here's the list of installed plugins.
Ant Plugin 1.7
Audit Trail 2.2
Authentication Tokens API Plugin 1.3
bouncycastle API Plugin 2.16.2
Branch API Plugin 2.0.11
built-on-column 1.1
Bulk Builder 1.5
Conditional BuildStep 1.3.6
Config File Provider Plugin 2.16.3
Credentials Binding Plugin 1.13
Credentials Plugin 2.1.14
Crowd 2 Integration 1.8
Dependency Graph Viewer Plugin 0.11
Display URL API 2.0
Docker Commons Plugin 1.8
Docker Pipeline 1.12
Durable Task Plugin 1.14
Email Extension Plugin 2.58
EnvInject API Plugin 1.2
Environment Injector Plugin 2.1.3
External Monitor Job Type Plugin 1.7
Folders Plugin 6.1.2
Git client plugin 2.5.0
Git Parameter Plug-In 0.8.0
Git plugin 3.5.1
GIT server Plugin 1.7
Gradle Plugin 1.27.1
Hudson Build-Publisher plugin 1.21
Icon Shim Plugin 2.0.3
Jackson 2 API Plugin 2.7.3
Javadoc Plugin 1.4
JavaScript GUI Lib: ACE Editor bundle plugin 1.1
JavaScript GUI Lib: Handlebars bundle plugin 1.1.1
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin 1.2.1
JavaScript GUI Lib: Moment.js bundle plugin 1.1.1
jQuery plugin 1.11.2-0
jQuery UI plugin 1.0.2
JUnit Plugin 1.21
JUnit Realtime Test Reporter Plugin 0.4
LDAP Plugin 1.16
Mailer Plugin 1.20
MapDB API Plugin 1.0.9.0
Matrix Authorization Strategy Plugin 1.7
Matrix Project Plugin 1.11
Maven Integration plugin 2.17
Multijob plugin 1.27
Multiple SCMs plugin 0.6
Node and Label parameter plugin 1.7.2
OWASP Markup Formatter Plugin 1.5
PAM Authentication plugin 1.3
Parameterized Trigger plugin 2.35.1
Pathignore Plugin 0.6
Pipeline 2.5
Pipeline Graph Analysis Plugin 1.5
Pipeline: API 2.20
Pipeline: Basic Steps 2.6
Pipeline: Build Step 2.5.1
Pipeline: Declarative 1.1.9
Pipeline: Declarative Agent API 1.1.1
Pipeline: Declarative Extension Points API 1.1.9
Pipeline: Groovy 2.39
Pipeline: Input Step 2.8
Pipeline: Job 2.14.1
Pipeline: Milestone Step 1.3.1
Pipeline: Model API 1.1.9
Pipeline: Multibranch 2.16
Pipeline: Nodes and Processes 2.14
Pipeline: REST API Plugin 2.8
Pipeline: SCM Step 2.6
Pipeline: Shared Groovy Libraries 2.8
Pipeline: Stage Step 2.2
Pipeline: Stage Tags Metadata 1.1.9
Pipeline: Stage View Plugin 2.8
Pipeline: Step API 2.12
Pipeline: Supporting APIs 2.14
Plain Credentials Plugin 1.4
promoted builds plugin 2.29
ruby-runtime 0.12
Run Condition Plugin 1.0
Schedule Build Plugin 0.4.0
SCM API Plugin 2.2.1
SCM Sync Configuration Plugin 0.0.10
Script Security Plugin 1.33
SonarQube Scanner for Jenkins 2.6.1
SSH Agent Plugin 1.15
SSH Credentials Plugin 1.13
SSH Slaves plugin 1.21
Structs Plugin 1.10
Subversion Plug-in 2.9
TextFinder plugin 1.10
Token Macro Plugin 2.2
Translation Assistance plugin 1.15
Version Number Plug-In 1.8.1
Windows Slaves Plugin 1.3.1
xUnit plugin 1.102

Taking one example, I'd like to delete the Docker Commons Plugin. But I
can't because Docker Pipeline depends on it. But I can't delete Docker
Pipeline because Pipeline: Model Definition depends on it. The
dependency chain seems to go on to the point where I'd need to delete
nearly all the plugins before I could delete this one. I've taken the
time to work out all the dependencies that Jenkins claims are present
and the result, as a Graphviz dot file, is attached.

I know that the dependencies are broken because I have another Jenkins
instance with nearly all the same plugins but without Docker Commons
Plugin. Is there any way to clean up this situation?
--
Dave Close
j.dot

Daniel Beck

unread,
Nov 2, 2017, 8:04:13 PM11/2/17
to jenkins...@googlegroups.com

> On 3. Nov 2017, at 00:41, CLOSE Dave <Dave....@us.thalesgroup.com> wrote:
>
> I know that the dependencies are broken because I have another Jenkins
> instance with nearly all the same plugins but without Docker Commons
> Plugin.

Without a list of plugins (and versions) on the other instance it's impossible to say why might these differ.

> Is there any way to clean up this situation?

No. Dependencies are just that. None of those you mentioned are optional, so even JENKINS-33843 shouldn't be to blame in this case.

Note that none of the dependencies you mention are circular. Jenkins should refuse to even load plugins with actual circular dependencies.

CLOSE Dave

unread,
Nov 2, 2017, 9:17:40 PM11/2/17
to jenkins...@googlegroups.com
Daniel Beck wrote:

> Without a list of plugins (and versions) on the other instance it's
> impossible to say why might these differ.

Ok. Here's another instance with 73 plugins listed below. Again, the
Graphviz dot file is attached.

Ant Plugin 1.2
Apache HttpComponents Client 4.x API Plugin 4.5.3-2.0
Audit Trail 2.2
Authentication Tokens API Plugin 1.3
bouncycastle API Plugin 2.16.2
Branch API Plugin 2.0.15
Build Timeout 1.19
Build-Publisher plugin 1.22
built-on-column 1.1
Conditional BuildStep 1.3.6
Config File Provider Plugin 2.16.4
Copy To Slave Plugin 1.4.4
Credentials Binding Plugin 1.13
Credentials Plugin 2.1.16
CVS Plug-in 2.13
Display URL API 2.1.0
Durable Task Plugin 1.15
Email Extension Plugin 2.61
EnvInject API Plugin 1.4
Environment Injector Plugin 2.1.5
External Monitor Job Type Plugin 1.7
Folders Plugin 6.2.1
Gerrit Trigger 2.26.2
Git client plugin 2.6.0
Git Parameter Plug-In 0.8.1
Git plugin 3.6.3
Icon Shim Plugin 2.0.3
Jackson 2 API Plugin 2.8.7.0
Javadoc Plugin 1.4
JavaScript GUI Lib: ACE Editor bundle plugin 1.1
JavaScript GUI Lib: Handlebars bundle plugin 1.1.1
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin 1.2.1
JavaScript GUI Lib: Moment.js bundle plugin 1.1.1
jQuery plugin 1.12.4-0
jQuery UI plugin 1.0.2
JSch dependency plugin 0.1.54.1
JUnit Plugin 1.21
JUnit Realtime Test Reporter Plugin 0.5
LDAP Plugin 1.17
Mailer Plugin 1.20
MapDB API Plugin 1.0.9.0
Matrix Authorization Strategy Plugin 2.1
Matrix Project Plugin 1.12
Maven Integration plugin 3.0
Multijob plugin 1.28
Multiple SCMs plugin 0.6
Node and Label parameter plugin 1.7.2
OWASP Markup Formatter Plugin 1.5
Parameterized Trigger plugin 2.35.2
Pipeline: API 2.23.1
Pipeline: Job 2.15
Pipeline: Nodes and Processes 2.17
Pipeline: SCM Step 2.6
Pipeline: Step API 2.13
Pipeline: Supporting APIs 2.16
Plain Credentials Plugin 1.4
promoted builds plugin 2.31
Resource Disposer Plugin 0.8
Run Condition Plugin 1.0
Schedule Build Plugin 0.4.0
SCM API Plugin 2.2.3
Script Security Plugin 1.34
SonarQube Scanner for Jenkins 2.6.1
SSH Credentials Plugin 1.13
SSH Slaves plugin 1.22
Structs Plugin 1.10
TextFinder plugin 1.10
Timestamper 1.8.8
Token Macro Plugin 2.3
Translation Assistance plugin 1.15
Version Number Plug-In 1.8.1
Workspace Cleanup Plugin 0.34
xUnit plugin 1.102

I think part of the trouble with the seemingly endless dependency chain
may be the Pipeline plugins. Most if not all of the other plugins seem
to define the other plugins on which they are dependent. The Pipeline
plugins, in contrast, define only the other plugins which depend on them.

>> Is there any way to clean up this situation?
>
> No. Dependencies are just that. None of those you mentioned are
> optional, so even JENKINS-33843 shouldn't be to blame in this case.
>
> Note that none of the dependencies you mention are circular. Jenkins
> should refuse to even load plugins with actual circular
> dependencies.

Sorry about the subject line. I realized later that there are no actual
cycles but forgot to change it.
--
Dave Close, Thales InFlyt Experience, Irvine California USA.
cell +1 949 394 2124, dave....@us.thalesgroup.com

"If your aren't in over your head,
how do you know how tall you are?" -- T. S. Eliot
k.dot

Daniel Beck

unread,
Nov 3, 2017, 6:05:55 AM11/3/17
to jenkins...@googlegroups.com

> On 3. Nov 2017, at 02:17, CLOSE Dave <Dave....@us.thalesgroup.com> wrote:
>
> I think part of the trouble with the seemingly endless dependency chain
> may be the Pipeline plugins. Most if not all of the other plugins seem
> to define the other plugins on which they are dependent. The Pipeline
> plugins, in contrast, define only the other plugins which depend on them.

Not really -- plugins always define what they depend on, not the other way around.

In this case, the 'Pipeline' aggregator plugin depends on Declarative Pipeline. 'Pipeline' itself has no functionality, it just aggregates all 'default' Pipeline functionality.

If you're not using Declarative (or even Pipeline), I'd start disabling things there. (On the plugins manager UI, disabling plugins enables checkboxes of plugins that can then be disabled because nothing else depends on them, etc. -- much easier than deleting one by one.)

CLOSE Dave

unread,
Nov 3, 2017, 1:23:08 PM11/3/17
to jenkins...@googlegroups.com
On 11/03/17 03:05, Daniel Beck wrote:
> If you're not using Declarative (or even Pipeline), I'd start
> disabling things there. (On the plugins manager UI, disabling plugins
> enables checkboxes of plugins that can then be disabled because
> nothing else depends on them, etc. -- much easier than deleting one
> by one.)

Every one of the Pipeline plugins, all 23 of them, claim to be dependent
on some other plugins. None offer the option to disable. The chain seems
endless. And many of the plugins asserted to be dependent are ones I
want to keep, such as Pipeline: Step API says it is dependent on Gerrit
Trigger and Pipeline: SCM Step says it is dependent on Git plugin.

Slide

unread,
Nov 3, 2017, 2:20:19 PM11/3/17
to jenkins...@googlegroups.com
That's odd, according to the pom [1] the only non-test dependency is on the structs plugins.

Can you show a screenshot or something that shows this dependency info?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3a73eed-c867-9057-c65a-fec4f5136850%40us.thalesgroup.com.
For more options, visit https://groups.google.com/d/optout.

CLOSE Dave

unread,
Nov 3, 2017, 3:21:30 PM11/3/17
to jenkins...@googlegroups.com
>> Every one of the Pipeline plugins, all 23 of them, claim to be
>> dependent on some other plugins. None offer the option to disable.
>> The chain seems endless. And many of the plugins asserted to be
>> dependent are ones I want to keep, such as Pipeline: Step API says
>> it is dependent on Gerrit Trigger and Pipeline: SCM Step says it
>> is dependent on Git plugin.

On 11/03/17 11:19, Slide wrote:

> That's odd, according to the pom [1] the only non-test dependency is
> on the structs plugins.
>
> Can you show a screenshot or something that shows this dependency
> info?

Yes. See attached.
jenkins-2.87.png

Stephen Connolly

unread,
Nov 3, 2017, 9:28:33 PM11/3/17
to jenkins...@googlegroups.com
On Fri 3 Nov 2017 at 19:21, CLOSE Dave <Dave....@us.thalesgroup.com> wrote:
>> Every one of the Pipeline plugins, all 23 of them, claim to be
>> dependent on some other plugins. None offer the option to disable.
>> The chain seems endless. And many of the plugins asserted to be
>> dependent are ones I want to keep, such as Pipeline: Step API says
>> it is dependent on Gerrit Trigger and Pipeline: SCM Step says it
>> is dependent on Git plugin.

No you are reading that backwards. That means those plugins depend on step api so you cannot disable step api.

Look for the leaf nodes (ie ones with checkboxes that can be modified)


On 11/03/17 11:19, Slide wrote:

> That's odd, according to the pom [1] the only non-test dependency is
> on the structs plugins.
>
> Can you show a screenshot or something that shows this dependency
> info?

Yes. See attached.
--
Dave Close, Thales InFlyt Experience, Irvine California USA.
cell +1 949 394 2124, dave....@us.thalesgroup.com

 "If your aren't in over your head,
  how do you know how tall you are?" -- T. S. Eliot

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

Victor Martinez

unread,
Nov 4, 2017, 7:45:49 AM11/4/17
to Jenkins Users
Out of this thread but related to the attached screenshot, please obfuscate the jenkins url :)

Daniel Beck

unread,
Nov 4, 2017, 8:03:23 AM11/4/17
to Jenkins Users

> On 3. Nov 2017, at 18:22, CLOSE Dave <Dave....@us.thalesgroup.com> wrote:
>
> Every one of the Pipeline plugins, all 23 of them, claim to be dependent
> on some other plugins. None offer the option to disable. The chain seems
> endless. And many of the plugins asserted to be dependent are ones I
> want to keep, such as Pipeline: Step API says it is dependent on Gerrit
> Trigger and Pipeline: SCM Step says it is dependent on Git plugin.

Look for the list entry just called 'Pipeline' (or search for pipeline-aggregator in the search box). Try to disable it. If the checkbox is disabled and you cannot, file a bug against every plugin that gets listed as a reason you can't -- other than developer laziness, there's no reason to depend on that.

Daniel Beck

unread,
Nov 4, 2017, 8:08:54 AM11/4/17
to jenkins...@googlegroups.com

> On 4. Nov 2017, at 13:02, Daniel Beck <m...@beckweb.net> wrote:
>
> Look for the list entry just called 'Pipeline' (or search for pipeline-aggregator in the search box).

Oops -- used to be called workflow, so workflow-aggregator.

> Try to disable it. If the checkbox is disabled and you cannot, file a bug against every plugin that gets listed as a reason you can't -- other than developer laziness, there's no reason to depend on that.

The following plugins have such a dependency:

build-monitor-plugin
codesonar
convert-to-pipeline
database
delivery-pipeline-plugin
hp-application-automation-tools-plugin
hubot-steps
jira-steps
memory-map
mock-load-builder
simple-build-for-pipeline
simple-travis-runner
sinatra-chef-builder
workflow-remote-loader

None of them appear in your first list, so I'm curious why your Jenkins won't let you disable that entry.

CLOSE Dave

unread,
Nov 6, 2017, 3:52:58 PM11/6/17
to jenkins...@googlegroups.com
On 11/04/17 05:08, Daniel Beck wrote:

>> Look for the list entry just called 'Pipeline' (or search for
>> pipeline-aggregator in the search box).

> Oops -- used to be called workflow, so workflow-aggregator.

>> Try to disable it. If the checkbox is disabled and you cannot, file
>> a bug against every plugin that gets listed as a reason you can't
>> -- other than developer laziness, there's no reason to depend on
>> that.

Yes, that's my basic concern in this topic. I have a couple of other Jenkins
instances where Pipeline was never installed but plugins which this one says
are dependent on it are nonetheless installed and working.

This instance does not have any plugin with "aggregator" in the title.

> The following plugins have such a dependency:
>
> build-monitor-plugin
> codesonar
> convert-to-pipeline
> database
> delivery-pipeline-plugin
> hp-application-automation-tools-plugin
> hubot-steps
> jira-steps
> memory-map
> mock-load-builder
> simple-build-for-pipeline
> simple-travis-runner
> sinatra-chef-builder
> workflow-remote-loader
>
> None of them appear in your first list, so I'm curious why your
> Jenkins won't let you disable that entry.

In fact, none of those are installed on any of my Jenkins instances. But the
instance which concerns me at the moment says Token Macro Plugin is dependent on
Pipeline. The chain goes like this...

Pipeline -> Token Macro Plugin
Token Macro Plugin -> Conditional BuildStep
Conditional BuildStep -> Multijob plugin *
Conditional BuildStep -> Parameterized Trigger plugin
Parameterized Trigger plugin -> Dependency Graph Viewer Plugin *
Parameterized Trigger plugin -> Git plugin
Git plugin -> Git Parameter Plug-In *
Parameterized Trigger plugin -> Multijob plugin *
Parameterized Trigger plugin -> Node and Label parameter plugin *
Token Macro Plugin -> Config File Provider Plugin
Config File Provider Plugin -> Email Extension Plugin *
Token Macro Plugin -> Email Extension Plugin *
Token Macro Plugin -> Git plugin
Git plugin -> Git Parameter Plug-In *
Token Macro Plugin -> Maven Integration plugin
Maven Integration plugin -> Conditional BuildStep
Conditional BuildStep -> Multijob plugin *
Conditional BuildStep -> Parameterized Trigger plugin
Parameterized Trigger plugin -> Dependency Graph Viewer Plugin *
Parameterized Trigger plugin -> Git plugin
Git plugin -> Git Parameter Plug-In *
Parameterized Trigger plugin -> Multijob plugin *
Parameterized Trigger plugin -> Node and Label parameter plugin *
Maven Integration plugin -> Hudson Build-Publisher plugin *
Maven Integration plugin -> JUnit Realtime Test Reporter Plugin *
Maven Integration plugin -> Multijob plugin *
Maven Integration plugin -> promoted builds plugin *
Maven Integration plugin -> SonarQube Scanner for Jenkins *
Token Macro Plugin -> Multijob plugin *
Token Macro Plugin -> Node and Label parameter plugin *
Token Macro Plugin -> promoted builds plugin
promoted builds plugin -> Git plugin
Git plugin -> Git Parameter Plug-In *
promoted builds plugin -> Parameterized Trigger plugin
Parameterized Trigger plugin -> Multijob plugin *
Parameterized Trigger plugin -> Node and Label parameter plugin *
Token Macro Plugin -> Run Condition Plugin
Run Condition Plugin -> Conditional BuildStep
Conditional BuildStep -> Multijob plugin *
Conditional BuildStep -> Parameterized Trigger plugin
Parameterized Trigger plugin -> Dependency Graph Viewer Plugin *
Parameterized Trigger plugin -> Git plugin
Git plugin -> Git Parameter Plug-In *
Parameterized Trigger plugin -> Multijob plugin *
Parameterized Trigger plugin -> Node and Label parameter plugin *

* terminal plugin, no further dependencies.

So in order to delete Pipeline, I would first need to delete or disable
all of the following plugins.

Conditional BuildStep
Config File Provider Plugin
Dependency Graph Viewer Plugin
Email Extension Plugin
Git Parameter Plug-In
Git plugin
Hudson Build-Publisher plugin
JUnit Realtime Test Reporter Plugin
Maven Integration plugin
Multijob plugin
Node and Label parameter plugin
Parameterized Trigger plugin
promoted builds plugin
Run Condition Plugin
SonarQube Scanner for Jenkins
Token Macro Plugin

CLOSE Dave

unread,
Nov 6, 2017, 3:54:29 PM11/6/17
to jenkins...@googlegroups.com
On 11/03/17 18:27, Stephen Connolly wrote:

>> Every one of the Pipeline plugins, all 23 of them, claim to be dependent
>> on some other plugins. None offer the option to disable. The chain seems
>> endless. And many of the plugins asserted to be dependent are ones I want
>> to keep, such as Pipeline: Step API says it is dependent on Gerrit
>> Trigger and Pipeline: SCM Step says it is dependent on Git plugin.

> No you are reading that backwards. That means those plugins depend on step
> api so you cannot disable step api.

I'll be more careful in my terminology.

Daniel Beck

unread,
Nov 6, 2017, 4:47:02 PM11/6/17
to Jenkins Users

> On 6. Nov 2017, at 21:52, CLOSE Dave <Dave....@us.thalesgroup.com> wrote:
>
> But the instance which concerns me at the moment says Token Macro Plugin is dependent on Pipeline.

token-macro 2.2 had the dependency, it was dropped in 2.3. Which are the versions you're using.

CLOSE Dave

unread,
Nov 6, 2017, 6:58:20 PM11/6/17
to jenkins...@googlegroups.com
On 11/06/17 13:46, Daniel Beck wrote:

>> But the instance which concerns me at the moment says Token Macro
>> Plugin is dependent on Pipeline.
>
> token-macro 2.2 had the dependency, it was dropped in 2.3. Which are
> the versions you're using.

Thank you. I was using 2.2. I had deferred updates until my cleanup was
done. But upgrading to 2.3 removed many of the bogus dependencies and I
am now able to disable/delete many plugins that I couldn't before.

However, I still see some dependencies which seem bogus to me. For example,

Pipeline: API 2.20 says Version Number Plugin 1.8.1 is dependent.

Pipeline: Groovy 2.39 says SonarCube Scanner for Jenkins 2.6.1 is dependent.

Pipeline: Job 2.14.1 says Email Extension Plugin 2.58 and Token Macro
Plugin 2.3 are dependent.

Pipeline: SCM Step 2.6 says Git Plugin 3.5.1 and Subversion Plugin 2.9
are dependent.

Pipeline: Step API 2.12 says Credentials Binding Plugin 1.13, Email
Extension Plugin 2.58, Token Macro Plugin 2.3, and SSH Agent Plugin 1.15
are dependent.

Daniel Beck

unread,
Nov 6, 2017, 8:43:02 PM11/6/17
to jenkins...@googlegroups.com

> On 7. Nov 2017, at 00:57, CLOSE Dave <Dave....@us.thalesgroup.com> wrote:
>
> However, I still see some dependencies which seem bogus to me.

All of those plugins implement features to support their use in Pipeline, so have a dependency on them.

CLOSE Dave

unread,
Nov 7, 2017, 7:29:04 PM11/7/17
to jenkins...@googlegroups.com
On 11/06/17 17:42, Daniel Beck wrote:

>> However, I still see some dependencies which seem bogus to me.
>
> All of those plugins implement features to support their use in
> Pipeline, so have a dependency on them.

Thank you.

Pipeline is dependent on them, or they are dependent on Pipeline? If the
former, I should be able to delete Pipeline. If the latter, that is
simply incoherent design (IMHO).

I contend that, if I'm not using Pipeline, I shouldn't have to have any
Pipeline plugins installed. I know that, in earlier installations, I had
these plugins installed without any Pipeline plugins (which may not have
existed then). If there are common features that are used by nearly all
plugins, they should be extracted into a separate plugin or moved into
Jenkins proper. The plugin world should not become like the Windoze
DLL-hell.
Reply all
Reply to author
Forward
0 new messages