docker icon indicating copy to clipboard operation
docker copied to clipboard

`jenkins-plugin-cli` reports `War not found, installing all plugins: /usr/share/java/jenkins.war`

Open dominykas opened this issue 6 months ago • 5 comments

Jenkins and plugins versions report

Official container version: 2.439-alpine

What Operating System are you using (both controller, and any agents involved in the problem)?

Alpine

Reproduction steps

  1. Run jenkins-plugin-cli -l

Expected Results

Lists the installed plugins, without any warnings.

Actual Results

Prints War not found, installing all plugins: /usr/share/java/jenkins.war at the start.

Anything else?

This is because the jenkins-plugin-cli changed the default Jenkins WAR path in https://github.com/jenkinsci/plugin-installation-manager-tool/pull/622 (released as 2.12.14, first appeared in 2.436 [2.435 seems to still be OK, despite Github claiming this was released in 2.426.2] via https://github.com/jenkinsci/docker/pull/1794)

Are you interested in contributing a fix?

I'm not sure what the fix should be, but I could give it a stab.

dominykas avatar Jan 02 '24 14:01 dominykas

I think the fix should be made in the Jenkins plugin installation manager tool. It should check both the old and the new locations rather than only checking the new location

MarkEWaite avatar Jan 02 '24 15:01 MarkEWaite

I think the fix should be made in the Jenkins plugin installation manager tool. It should check both the old and the new locations rather than only checking the new location

I vote for rollbacking the change in the CLI and republish it under a 3.x version as it looks like a breaking change

dduportal avatar Jan 02 '24 16:01 dduportal

An additional test checking the absence of "War not found, installing all plugins: /usr/share/java/jenkins.war" would be nice too.

hervelemeur avatar Jan 02 '24 16:01 hervelemeur

An additional test checking the absence of "War not found, installing all plugins: /usr/share/java/jenkins.war" would be nice too.

checking for absence of isn't that useful, it should verify that whatever is broken works correctly here though. I'm surprised it got through the tests here 😢.

timja avatar Jan 02 '24 16:01 timja

Since this just caused us significant problems and a broken Jenkins state even after downgrade (https://github.com/jenkinsci/plugin-installation-manager-tool/issues/641 )

I would like to propose that this check for the previous default location as well before throwing an error? I would not think that both would exist on a system and if so just default to using the new default?

Or at the very least a comment to make sure this works with the official docker image since this would be a breaking change that is a bit hard to track down.

ninjonxb avatar Feb 02 '24 19:02 ninjonxb