-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
sort according to VersionNumber comparator #697
sort according to VersionNumber comparator #697
Conversation
the file plugin-versions.json is the base for sorting the releases of a plugin on the plugins page at https://plugins.jenkins.io The sorting with string causes wrong ordering in some cases as described in jenkins-infra/plugin-site#1336 By sorting with the Comparator of VersionNumber we get the same sorting as in other places.
Thanks. Originally added in daniel-beck@64d85c2, but I don't remember why I added the TODO instead of simply addressing it. My best guess is that I wanted to have identical output with the large-scale overhaul of the tool, given the bad test coverage, so kept the existing behavior, just noting it for later. I guess "later" is now. |
This by itself won't be enough because plugin-site parses the JSON and sorts things independently (see e.g. https://github.com/jenkins-infra/plugin-site/pull/1297/files). Reusing ordering from update center would be great of coursem, but I'm not sure is a way to do that with the current JSON format. Unfortunatelly |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daniel-beck please don't consider my comment blocking, I think this is an improvement, just needs a follow-up in plugin-site
@daniel-beck is there anything blocking merge of this PR? |
@zbynek Nothing blocking this, except there was no real need for a new release AFAICT. Due to limited test coverage it's always a bit cumbersome to publish and use a new release, so I generally try to bundle up a bunch of changes. To make it easier to recover what those changes are (e.g. for the changelog) given the metadata is in the same repo and changes are far more numerous, I hold PRs until shortly before the intended release date. |
The file plugin-versions.json is the base for sorting the releases of a plugin on the plugins page at https://plugins.jenkins.io
The sorting with string causes wrong ordering in some cases as described in jenkins-infra/plugin-site#1336
By sorting with the Comparator of VersionNumber we get the same sorting as in other places.