Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0.1 incorrectly resolves required versions in dependencies #193

Open
oleg-nenashev opened this issue Sep 17, 2020 · 9 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Sep 17, 2020

Looks like there is a regression after switching to "download latest by default" in 2.0.0

2020-09-17 11:49:21
Step 4/4 : RUN java -jar /app/bin/jenkins-plugin-manager.jar   --war /app/jenkins/jenkins.war   --plugins docker-workflow:1.22 workflow-durable-task-step:2.35
2020-09-17 11:49:21

2020-09-17 11:49:21
 ---> Running in 90ef99b3c292
2020-09-17 11:49:22
Unable to open /app/jenkins/jenkins.war
2020-09-17 11:49:22
Unable to get version from war file
2020-09-17 11:49:26
War not found, installing all plugins: /app/jenkins/jenkins.war
2020-09-17 11:49:26
Plugin docker-workflow:1.22 depends on workflow-durable-task-step:2.36, but there is an older version defined on the top level - workflow-durable-task-step:2.35

At the same time, even the most recent release of Docker Pipeline plugin requires 2.35:

image

@simonvanderveldt
Copy link

simonvanderveldt commented Oct 30, 2020

We're running into this issue as well, we've pinned the versions of all plugins including their (transitive) dependencies in plugins.txt and our build just failed because one plugin (let's call it plugin a) now pulls in a newer dependency of plugin b than the dependency that's defined in it's POM and in our plugins.txt, probably because there's a new release of plugin a which depends on a newer version of plugin b.

[edit] We've switched back to the install-plugins.sh script for now, that still works correctly.

@timja
Copy link
Member

timja commented Oct 30, 2020

Yeah it’s a bit of a pain, possibly the error should be relaxed if there’s a compatible version declared elsewhere in the file.

We’ve been working around it by using the available-updates flag to update our file for us when that happens

@gregswift
Copy link

Unfortunately the --available-updates runs afoul of #169 when you are using LTS

@timja
Copy link
Member

timja commented Nov 13, 2020

I’ll try look at issues in this repo soon, patches very welcome though

@timja timja self-assigned this Nov 15, 2020
@novettaberin
Copy link

To answer your questions, yes it should only pull the latest available for the Jenkins Core I am running. Turning --latest false is very much a pain as I now have to iteratively correct the version numbers of my plugins until I have a working configuration.

@timja
Copy link
Member

timja commented Nov 20, 2020

It already does that, but Jenkinsfile runner is probably messing with it

see explanation here: #219 (comment)

@novettaberin
Copy link

I think I saw a log message saying the plugin-manager could not determine the version of Jenkins from the war file. I'm not sure how it checks that.

@timja
Copy link
Member

timja commented Nov 20, 2020

That’s the cause of it for you then

@oleg-nenashev
Copy link
Member Author

Jenkinsfile Runner is not really "messing" with it. Taking the packaging, there is just no Jenkins WAR which could be really used to retrieve the version as documented here: https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/impl/PluginManager.java#L1064-L1072 . An alternative solution is needed, and it is going to be a problem with recent plugin releases requiring new core versions. I will create a patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants