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 #35058 - upgrade scenario for Foreman and Katello nightly #633
Conversation
Issues: #35058 |
Ought the commit message only mention Foreman and not Katello? |
Could you include on here a comment describing what the expected workflow for upgrades will be? |
Current status:
|
I have removed the version based scenarios of Foreman and Katello and kept nightly. The tests were updated as per the change in installer feature. |
No comments besides the outstanding one around |
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.
I played a bit with refactoring things so you don't repeat the target version all the time. In 3f99cc4 I restructured the directory layout a bit (it may break other things). Then in f0520bf I introduced a target_version
method. In ab755a9 I tried to reduce duplication by introducing a base class for various upgrade scenarios.
While writing this, I realized I could apply the same changes in a more minimal patch to this one: dab29a9 does that. Then 1013221 makes the diff even smaller. Now it's:
--- definitions/scenarios/upgrade_to_foreman_nightly.rb 2022-09-08 13:05:33.742733736 +0200
+++ definitions/scenarios/upgrade_to_katello_nightly.rb 2022-09-08 13:08:45.405873682 +0200
@@ -1,4 +1,4 @@
-module Scenarios::Foreman_Nightly
+module Scenarios::Katello_Nightly
class Abstract < ForemanMaintain::Scenario
def self.target_version
'nightly'
@@ -10,7 +10,7 @@
metadata do
tags :upgrade_scenario
confine do
- feature(:foreman_install) || ForemanMaintain.upgrade_in_progress == target_version
+ feature(:katello_install) || ForemanMaintain.upgrade_in_progress == target_version
end
@target_version = target_version
@@ -19,7 +19,7 @@
end
def target
- "Foreman #{target_version}"
+ "Katello #{target_version}"
end
instance_eval(&block)
@@ -67,7 +67,7 @@
end
def modules_to_enable
- el? ? ["foreman:#{el_short_name}"] : []
+ ["katello:#{el_short_name}", "pulpcore:#{el_short_name}"]
end
def compose
Now the next step could be to enhance modules_to_enable
to look at the features to determine it. Once you have that, we can simplify it to just upgrade_to_upstream_nightly
and we would simply have an upstream scenario that does the right thing for all installations.
Please include my patches (feel free to squash them in) and unify to a single upstream scenario.
I like and admire your suggestions however I would like to have completely separate pull request or even work to refactor the upgrade scenarios/procedures. I have forked a new Redmine for same : https://projects.theforeman.org/issues/35508 |
Can we merge this one? |
Depends on #626
The flow for the Foreman and Katello upgrade should be as below,