[JIRA] (JENKINS-58452) Determining Dependencies from Update Center json

11 views
Skip to first unread message

natasha.stopa@gmail.com (JIRA)

unread,
Jul 11, 2019, 6:53:01 PM7/11/19
to jenkinsc...@googlegroups.com
Natasha Stopa created an issue
 
Jenkins / Task JENKINS-58452
Determining Dependencies from Update Center json
Issue Type: Task Task
Assignee: Natasha Stopa
Attachments: artifact-manager-s3_example.png
Components: plugin-installation-manager-tool
Created: 2019-07-11 22:52
Labels: gsoc-2019 plugin-manager
Priority: Minor Minor
Reporter: Natasha Stopa

A plugin is downloaded from a url based on the following logic: 

      if a url is entered, download from that url 

      if "latest" version and there's a jenkins specific update center, download from cfg.getJenkinsUc()/jenkinsVersion/latest

      if experimental or incremental, download from experimental update center or incrementals mirror  repo 

      else: download from cfg.getJenkinsUc()/download/plugins/pluginName/pluginVersion/pluginName

 

Previously, a plugin's dependencies would be resolved after a plugin was downloaded and the dependencies were determined from the manifest. 

Now, a plugin's dependences are resolved by getting the update center json from cfg.getJenkinsUc() + "/update-center.actual.json" and parsing this. 

However, this may not always result in the correct dependencies for the requested/downloaded plugin. 

Example: 

Suppose the Jenkins Version is 2.121 and the requested plugin is artifact-manager-s3:latest. 

The plugin would be downloaded from: 

https://updates.jenkins.io/2.121/latest/artifact-manager-s3.hpi

 

The correct dependencies could be found from the version specific update center json: 

https://updates.jenkins.io/2.121/update-center.actual.json

However, instead the code would get the dependencies from the update center listed in the configuration file, ignoring the version specific update center json: 

https://updates.jenkins.io/current/update-center.actual.json

 

See attached picture. 

The same issue could occur when there is no Jenkins specific update center and the user specifies the version of the plugin directly.

Suppose the user wants to download artifact-manager-s3, version 1.3 and they are directed to https://updates.jenkins.io/download/plugins/artifact-manager-s3/1.3/artifact-manager-s3.hpi

The dependencies it appears this version is dependent on are: 

aws-global-configuration:1.2,workflow-api:2.33,ap
ache-httpcomponents-client-4-api:4.5.5-3.0,aws-credentials:1.23,struc
ts:1.17

Currently the code would find the dependencies from the current update center json (https://updates.jenkins.io/current/update-center.actual.json), which has the following dependencies: aws-global-configuration:1.3, jaxb:2.3.0.1,workflow-api:2.33,apache-httpcomponents-client-4-api, 4.5.5-3.0, aws-credentials:1.26, structs:1.17

 

 

 

 

 

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

natasha.stopa@gmail.com (JIRA)

unread,
Jul 15, 2019, 5:05:02 PM7/15/19
to jenkinsc...@googlegroups.com
Natasha Stopa started work on Task JENKINS-58452
 
Change By: Natasha Stopa
Status: Open In Progress

natasha.stopa@gmail.com (JIRA)

unread,
Jul 15, 2019, 5:06:02 PM7/15/19
to jenkinsc...@googlegroups.com
Natasha Stopa commented on Task JENKINS-58452
 
Re: Determining Dependencies from Update Center json

Found https://updates.jenkins.io/current/plugin-versions.json and will use that to find the dependencies for each requested plugin.

natasha.stopa@gmail.com (JIRA)

unread,
Jul 15, 2019, 5:26:01 PM7/15/19
to jenkinsc...@googlegroups.com

natasha.stopa@gmail.com (JIRA)

unread,
Jul 16, 2019, 12:38:02 PM7/16/19
to jenkinsc...@googlegroups.com

natasha.stopa@gmail.com (JIRA)

unread,
Jul 17, 2019, 12:25:02 PM7/17/19
to jenkinsc...@googlegroups.com
 
Re: Determining Dependencies from Update Center json

The last PR resulted in an error when the user requested an experimental or incrementals version. Because the experimental and incremental versions might require dependencies not yet released in the latest update center, resolving the dependencies based on the latest json or plugin-versions json might not be accurate. Another PR was created that should resolve these issues and although initially there was relunctance about getting json from multiple locations, it seemed that this was the only way to accurately resolve the dependencies.

https://github.com/jenkinsci/plugin-installation-manager-tool/pull/35

natasha.stopa@gmail.com (JIRA)

unread,
Jul 22, 2019, 7:54:02 PM7/22/19
to jenkinsc...@googlegroups.com
 

Fix was merged

Change By: Natasha Stopa
Status: In Review Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages