Skip to content
Commit a21402b5 authored by Romén Rodríguez-Gil's avatar Romén Rodríguez-Gil Committed by Oleg Nenashev
Browse files

[JENKINS-56477] Fix to allow selecting compatible-only updates for plugins (#3985)

* [JENKINS-56477] New "isCompatible" method avoiding all plugins w/ warns

Previous version was only checking "isCompatibleWithInstalledVersion", but there were several other cases that had to be checked

* [JENKINS-56477] Added issue annotation to isPluginUpdateCompatible test

* [JENKINS-56477] Factored out getUpdateSite, init method used by 2 tests

Also removed the "sites" list from the init, since it seemed it was not being used, only using the specific site created from the external json

* [JENKINS-56477] Added a new option for plugin selection: "compatible"

Now users can select "All", "Compatible" or "None"

* [JENKINS-56477] checkPluginsWithoutWarnings also unchecks now

Useful if the user first clicks "Select All" and now wants to "Select Compatible" only.

* [JENKINS-56477] Added unit test for "UpdateSite.Plugin.isCompatible"

The UpdateSite class and its internal classes (e.g. Plugin) are a bit tricky to unit-test. Using some stubs to set the necessary context for the test to run

* [JENKINS-56477] "mock-maker-inline" incompatible w/ other tests

Had to remove the unit test checking "pluginUpdateNotCompatible. It needed "mock-maker-inline" config to mock/spy the Plugin class (which is final), but that mockito config caused conflicts with pre-existing tests.

* [JENKINS-56477] Simplifying condition to check the candidate checkbox

* [JENKINS-56477] Method overload with param should not be exported

* [JENKINS-56477] Javadoc for isCompatible(). Overloaded ver. restricted

Also switched the call in table.jelly to the overloaded version of isCompatible, since a "cache" var was available in the context (and was being already used by calls to the internal methods to show the warnings)

* Removed empty line.

Trivial change to force re-execution of pipeline.

* [JENKINS-56477] "isCompatible" set to @Restricted for now

This method is currently only being used by the Jenkins UI, so we are not being exposing it to plugins nor exporting it. If in the future that need emerges, this can be changed
parent b641aa82
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment