Skip to content

[JENKINS-58537] Allow some plugin version mismatch#59

Closed
stopalopa wants to merge 1 commit intojenkinsci:masterfrom
stopalopa:non-exact-versions
Closed

[JENKINS-58537] Allow some plugin version mismatch#59
stopalopa wants to merge 1 commit intojenkinsci:masterfrom
stopalopa:non-exact-versions

Conversation

@stopalopa
Copy link
Contributor

@stopalopa stopalopa requested a review from a team August 6, 2019 02:16
* @param plugin plugin to set
* @return
*/
public boolean setAlternateVersion(Plugin plugin) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we doing this? I assume dependencies will always have a correct version, and we shouldn't fix user errors silently? it should just fail and let the user know what plugin was wrong

Copy link
Contributor Author

@stopalopa stopalopa Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would think the dependencies would have the right version, but I had previously found an example where this wasn't the case. The vsphere-cloud plugin version says it requires node-iterator-api version 1.5, but the plugin-versions.json has dependency information for 1.5.0 and 1.5.0 is also the version on the download page. I'm looking at it now and it seems like you can download the plugin if 1.5 or 1.5.0 is listed as the version, but I thought that this wasn't working previously. In this case, since the user didn't directly request that plugin (it was just a dependency), if it failed it wouldn't be their fault.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata looks fine to me?
https://updates.jenkins.io/current/update-center.actual.json
this seems like a giant hack and we should fix the plugin if we can find the issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The metadata for this plugin is still messed up. Vsphere-cloud says it requires node-iterator-api version 1.5, even though that version doesn't exist for node-iterator-api here: http://updates.jenkins.io/download/plugins/node-iterator-api/ or here: http://mirror.xmission.com/jenkins/updates/current/plugin-versions.json, although apparently it doesn't truly matter in this case since
http://updates.jenkins.io/download/plugins/node-iterator-api/1.5.0/node-iterator-api.hpi and
http://updates.jenkins.io/download/plugins/node-iterator-api/1.5/node-iterator-api.hpi will both download the plugin.

However, in the cases where there's a version mismatch of a dependency and the plugin can't be downloaded, with the newer PRs an error would be thrown immediately if the plugin dependencies can't be resolved (if the plugin dependencies can't be determined from plugin-versions.json, which is dependent on having the right plugin version, or the plugin's dependencies are determined from the manifest, which is still dependent on being able to download the plugin, which is dependent on having the right version to build the download url) and there'd be nothing the user could do.

I see what you're saying though, and this could potentially cause more problems than it solves. I didn't really have any idea of how common this issue might be, but maybe it's pretty rare. I'll close this PR and we can see if it's actually a problem users encounter. I'm also open to suggestions on other ways to address this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like both versions are in artifactory:
https://repo.jenkins-ci.org/webapp/#/search/package/eyJzZWFyY2giOiJxdWljayIsInF1ZXJ5Ijoibm9kZS1pdGVyYXRvci1hcGkifQ==
Probably a failed release, sounds like a good idea to hold off on this change 👍

@stopalopa stopalopa closed this Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants