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

Fixes #18694: Rudder-pkg fails at upgrade when no newer version of a plugin are available #3425

Conversation

Fdall
Copy link
Contributor

@Fdall Fdall commented Nov 25, 2020

@@ -350,20 +350,21 @@ def upgrade_all(mode):
currentVersion = rpkg.PluginVersion(utils.DB["plugins"][p]["version"])
pkgs = plugin.Plugin(p)
pkgs.getAvailablePackages()
latestversion = None
Copy link
Member

Choose a reason for hiding this comment

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

I would have put currentVersion in latestVersion, so we don't have to check if it is None

if mode == "nightly":
latest_packages = pkgs.getLatestCompatibleNightly()
if (latest_packages is None):
print("No newer %s compatible versions found for the plugin %s"%(mode, p))
logging.error("No newer %s compatible versions found for the plugin %s"%(mode, p))
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that's an error but an info and maybe we can get rid of that message here because it will be also printed at the end by a logging.info

Copy link
Member

Choose a reason for hiding this comment

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

I think we should only do the else par (with is not None in if)

@Fdall
Copy link
Contributor Author

Fdall commented Nov 25, 2020

PR updated with a new commit

1 similar comment
@Fdall
Copy link
Contributor Author

Fdall commented Nov 25, 2020

PR updated with a new commit

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/3425
-- Your faithful QA
Kant merge: "Live your life as though your every act were to become a universal law."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/33129/console)

@Fdall
Copy link
Contributor Author

Fdall commented Nov 25, 2020

OK, squash merging this PR

@Fdall Fdall force-pushed the bug_18694/rudder_pkg_fails_at_upgrade_when_no_newer_version_of_a_plugin_are_available branch from 9e4202c to ef7bfae Compare November 25, 2020 10:16
@Fdall Fdall merged commit ef7bfae into Normation:branches/rudder/6.2 Nov 25, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants