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

When resolving dependencies using manifest, do not fail if an optional plugin cannot be retrieved #316

Open
PierreBtz opened this issue Apr 6, 2021 · 0 comments · May be fixed by #317
Open
Labels
bug Something isn't working

Comments

@PierreBtz
Copy link

Version report

Jenkins and plugins versions report:

(FWIW version doesn't matter)

Jenkins: 2.249.3.1
OS: Mac OS X - 10.16
---
trilead-api:1.0.8
jdk-tool:1.4
command-launcher:1.4
script-security:1.75
echarts-api:4.9.0-1
structs:1.20
apache-httpcomponents-client-4-api:4.5.10-2.0
operations-center-server:2.249.0.8
support-core:2.70
cloudbees-analytics:1.27
mailer:1.32.1
bootstrap4-api:4.5.2-1
jquery3-api:3.5.1-1
command-launcher:1.4
workflow-api:2.40
jackson2-api:2.11.2
credentials:2.3.13
operations-center-agent:2.249.0.1
cloudbees-assurance:2.138.0.21
operations-center-context:2.249.0.3
bouncycastle-api:2.18
operations-center-license:2.249.0.1
variant:1.3
async-http-client:1.7.24.3
cloudbees-license:9.47
cloudbees-administrative-monitors:1.0.1
cloudbees-ha:4.25
jaxb:2.3.0.1
cloudbees-uc-data-api:4.43
font-awesome-api:5.14.0-1
token-macro:2.12
script-security:1.75
nectar-license:8.28
snakeyaml-api:1.27.0
node-iterator-api:1.5.0
workflow-step-api:2.22
metrics:4.0.2.6
plugin-util-api:1.2.5
popper-api:1.16.0-6
trilead-api:1.0.8
jdk-tool:1.4
cloudbees-folder:6.14
cloudbees-folders-plus:3.10
junit:1.37
mock-security-realm:1.4
scm-api:2.6.4
display-url-api:2.3.3
cloudbees-monitoring:2.10
cloudbees-support:3.25
mapdb-api:1.0.9.0
google-login:1.6
  • What Operating System are you using (both controller, and any agents involved in the problem)?
masOS Big Sur

Reproduction steps

You will need an Update Center referencing a plugin that declares an optional plugin that is not in said Update Center.

  1. For reproduction purposes, let's use this CloudBees Update Center: https://jenkins-updates.cloudbees.com/update-center/envelope-core-oc/update-center.json?version=2.249.3.1/update-center.json

  2. Try to run the tool on a plugin that declares an optional dependency that is not in this Update Center, eg in our case operations-center-context:2.249.0.3 (make sure to specify the version so that the resolution is done from the MANIFEST of the hpi).

Results

Expected result:

Success

Actual result:

Failure because the optional plugin cannot be downloaded:

Plugin operations-center-context:2.249.0.3 unable to find dependant plugin cloudbees-template in update center https://jenkins-updates.cloudbees.com/update-center/envelope-core-oc/update-center.json?version=2.249.3.1/update-center.json
	at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:200)
	at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:149)
	at io.jenkins.tools.pluginmanager.cli.Main.main(Main.java:70)
	Suppressed: io.jenkins.tools.pluginmanager.impl.PluginNotFoundException: Plugin operations-center-sso:2.249.0.2 (via operations-center-context:2.249.0.3) unable to find dependant plugin cloudbees-template in update center https://jenkins-updates.cloudbees.com/update-center/envelope-core-oc/update-center.json?version=2.249.3.1/update-center.json
		at io.jenkins.tools.pluginmanager.impl.PluginManager.getLatestPluginVersion(PluginManager.java:848)
		at io.jenkins.tools.pluginmanager.impl.PluginManager.resolveDependenciesFromManifest(PluginManager.java:910)
		at io.jenkins.tools.pluginmanager.impl.PluginManager.resolveDirectDependencies(PluginManager.java:1013)
		at io.jenkins.tools.pluginmanager.impl.PluginManager.resolveRecursiveDependencies(PluginManager.java:1047)
		at io.jenkins.tools.pluginmanager.impl.PluginManager.findPluginsAndDependencies(PluginManager.java:627)
		at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:192)
		... 2 more
@PierreBtz PierreBtz added the bug Something isn't working label Apr 6, 2021
PierreBtz added a commit to PierreBtz/plugin-installation-manager-tool that referenced this issue Apr 6, 2021
…ot fail if an optional plugin cannot be retrieved
PierreBtz added a commit to PierreBtz/plugin-installation-manager-tool that referenced this issue Apr 7, 2021
…ot fail if an optional plugin cannot be retrieved
@timja timja linked a pull request Apr 7, 2021 that will close this issue
6 tasks
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

Successfully merging a pull request may close this issue.

1 participant