[JIRA] (JENKINS-60205) Optional dependencies should be considered when resolving version

3 views
Skip to first unread message

martin.danjou14@gmail.com (JIRA)

unread,
Nov 18, 2019, 2:19:02 PM11/18/19
to jenkinsc...@googlegroups.com
Martin d'Anjou created an issue
 
Jenkins / Improvement JENKINS-60205
Optional dependencies should be considered when resolving version
Issue Type: Improvement Improvement
Assignee: Natasha Stopa
Components: plugin-installation-manager-tool
Created: 2019-11-18 19:18
Labels: plugin-manager
Priority: Minor Minor
Reporter: Martin d'Anjou

The following yaml file results in a bad dependency version for the git plugin:

 plugins:
  - artifactId: configuration-as-code
    source:
      version: 1.32
  - artifactId: git
    source:
      version: 4.0.0
  - artifactId: workflow-aggregator
    source:
      version: 2.6
  - artifactId: ssh-slaves
    source:
      version: 1.31.0
  - artifactId: build-user-vars
    source:
      version: 1.5

When Jenkins starts, the following happens:

2019-11-18 15:14:50.418+0000 [id=33]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Jenkins Git plugin v4.0.0 (git)
java.io.IOException: Jenkins Git plugin version 4.0.0 failed to load.
 - Matrix Project Plugin version 1.4 is older than required. To fix, install version 1.14 or later.
        at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:922)
        at hudson.PluginManager$2$1$1.run(PluginManager.java:545)
        at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
        at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
        at jenkins.model.Jenkins$5.runTask(Jenkins.java:1118)
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

It is because the git plugin lists the matrix plugin as optional:

Plugin-Dependencies: configuration-as-code:1.30;resolution:=optional,w
 orkflow-scm-step:2.9,workflow-step-api:2.20,credentials:2.3.0,git-cli
 ent:3.0.0,mailer:1.23,matrix-project:1.14;resolution:=optional,parame
 terized-trigger:2.33;resolution:=optional,promoted-builds:3.2;resolut
 ion:=optional,scm-api:2.6.3,ssh-credentials:1.17.2,structs:1.20,token
 -macro:2.8;resolution:=optional

But at the same time, the workflow-aggregator depends on the lockable-resources, which depend on matrix-project 1.4. So even though the git plugin lists the matrix-project:1.14 as optional, if it's there, it has to be the "right" version for the git plugin, which means 1.14 instead of 1.4.

The workaround is to explicitly list matrix-project 1.14 in the yaml.

Can the plugin manager support this type of situation?

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

slide.o.mix@gmail.com (JIRA)

unread,
Nov 18, 2019, 5:47:06 PM11/18/19
to jenkinsc...@googlegroups.com
Alex Earl commented on Improvement JENKINS-60205
 
Re: Optional dependencies should be considered when resolving version

I believe this is happening because matrix-project is an optional dependency of the git plugin and the plugin-installation-manager doesn't not deal with optional dependencies (from what I can gather).

Reply all
Reply to author
Forward
0 new messages