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

"Available updates" shows updates if 'latest' is used #208

Closed
reinholdfuereder opened this issue Oct 21, 2020 · 6 comments · Fixed by #225
Closed

"Available updates" shows updates if 'latest' is used #208

reinholdfuereder opened this issue Oct 21, 2020 · 6 comments · Fixed by #225
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@reinholdfuereder
Copy link

jenkins-plugin-cli --available-updates -f plugins.txt
... shows IMHO all plugins, including those that are definitely already on latest version (i.e. up-to-date):

Available updates:
ace-editor (latest) has an available update: 1.1
analysis-model-api (latest) has an available update: 9.1.0
antisamy-markup-formatter (latest) has an available update: 2.1
blueocean-autofavorite (latest) has an available update: 1.2.4
blueocean-display-url (latest) has an available update: 2.4.0
blueocean (latest) has an available update: 1.24.1
bouncycastle-api (latest) has an available update: 2.18
branch-api (latest) has an available update: 2.6.0
...

E.g. "Branch API v2.6.0" is (already) installed (in this version and is the latest available version) => Should not be shown for option "--available-updates" (I had hoped/expected)!?

@timja timja added bug Something isn't working good first issue Good for newcomers labels Oct 21, 2020
@Larusso
Copy link

Larusso commented Nov 9, 2020

I think the expectation is that this command returns a complete new txt/yml file with all your plugins. Could mean it returns the same file back.

@timja
Copy link
Member

timja commented Nov 9, 2020

the difference here is that latest isn't being considered as a (pseudo) version and it's giving a new version when really latest should just be ignored in the version update check.

@reinholdfuereder
Copy link
Author

I think the expectation is that this command returns a complete new txt/yml file with all your plugins. Could mean it returns the same file back.

@Larusso Please correct me if I misunderstand you: But do you really expect that funtionality from an "--available-updates" option?

Maybe it could make sense to add another option, maybe named "--list-with-available-updates", that does what you are describing, i.e. generating a new list with all your plugins with latest available versions, which could return the same file back (if there are no updates available at all).

This would also nicely match the 7h ago mentioned new idea/approach of @timja in #173 (#173 (comment)) with respect to fixing "--list", wouldn't it?

@timja
Copy link
Member

timja commented Nov 15, 2020

If you specify an output format it already does that (yaml or txt).

The console one is for humans although not really sure why you would want to use it

@timja timja changed the title "Available updates" option shows also up-to-date plugins (or all plugins?) "Available updates" shows updates if 'latest' is used Nov 15, 2020
@timja timja self-assigned this Nov 15, 2020
@reinholdfuereder
Copy link
Author

@timja First of all thanks for the fix!

Secondly, I am not sure that I understand your comment #208 (comment) correctly: Does that mean if I specify "only" the option "--output {json,stdout,yaml}" (no, in addition to certain other flags!? Which?) then this will return all plugins (including latest versions) AND available updates?

@timja
Copy link
Member

timja commented Nov 17, 2020

So available updates will return you a complete plugins file including any updates if you specify and output format of yaml or txt.

If you don’t specify an output format it uses a console reporter which only outputs plugins with an update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants