-
Notifications
You must be signed in to change notification settings - Fork 72
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
Drop --target-version parameter #911
Conversation
246121d
to
7e80d7c
Compare
Almost LGTM. However I've found out an issue after an upgrade to 6.16 is performed:
it should just say "Nothing to update....." w/o any error |
@phase = :pre_upgrade_checks | ||
condition = { :tags => [:upgrade_scenario, phase] } | ||
matching_scenarios = find_scenarios(condition) | ||
@version = matching_scenarios.first.target_version |
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.
if next scenario is not installed (next maintenance is not enabled) and you run "upgrade" then it produces:
undefined method `target_version' for nil:NilClass
Is question mark missing?
@version = matching_scenarios.first.target_version | |
@version = matching_scenarios.first.target_version? |
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.
@version = matching_scenarios.first.target_version | |
@version = matching_scenarios.first&.target_version |
Safe operator is &
, but I wonder what else that might break
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.
[root@sat-stream-qa-rhel8 ~]# foreman-maintain upgrade check
Checking for new version of satellite-maintain...
Nothing to update, can't find new version of satellite-maintain.
[root@sat-stream-qa-rhel8 ~]# foreman-maintain upgrade run
Checking for new version of satellite-maintain...
Nothing to update, can't find new version of satellite-maintain.
--------------------------------------------------------------------------------
Upgrade finished.
This doesn't look correct to me. I'd have expected an error "there is nothing to upgrade to" or something like that.
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.
Please fix
undefined method `target_version' for nil:NilClass
when next scenario is not yet installed
f34dd75
to
c18b493
Compare
Updated and here is the new output:
Feel free to suggest any word smithing. |
c18b493
to
11fda4d
Compare
This parameter is no longer used by the upgrade runner as it is defined internally by the scenarios.
11fda4d
to
ab88247
Compare
@ehelms I can't re-test since there are other missing changes that you have rebased on |
Now it is more broken:
I can't upgrade at all |
This parameter is no longer used by the upgrade runner as it is defined internally by the scenarios.