-
Notifications
You must be signed in to change notification settings - Fork 267
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
Harmonize updating handling SUSE/openSUSE #5175
Conversation
e715250
to
165b904
Compare
products/sle/main.pm
Outdated
loadtest "update/zypper_up"; | ||
} | ||
} | ||
|
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 am not sure why you want to have this method in the sle-main but still check for is_sle
which should always be set in here. Did you copy-paste this from opensuse/main.pm? Then it should be rather moved to lib/main_common.pm . The idea was to not introduce duplicate but to reduce
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.
This is what was extracted from subs load_consoletests and load_x11tests. I will try to move it to a common place.
products/sle/main.pm
Outdated
@@ -919,6 +928,7 @@ elsif (get_var("QAM_MINIMAL")) { | |||
loadtest "qam-minimal/check_logs"; | |||
if (check_var("QAM_MINIMAL", 'full')) { | |||
loadtest "qam-minimal/install_patterns"; | |||
load_system_update_tests(); |
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.
why do you want to schedule this additionally now?
@@ -1155,8 +1154,6 @@ sub load_x11tests { | |||
loadtest "x11/xterm"; | |||
loadtest "x11/sshxterm" unless get_var("LIVETEST"); | |||
if (gnomestep_is_applicable()) { | |||
# openSUSE has an explicit update check elsewhere | |||
loadtest "update/updates_packagekit_gpk" if is_sle && !is_staging; |
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.
yes, it's good if you want to remove it from here but I think you are doing it the wrong way around. Do not define a SLE specific function elsewhere but find out why SLE calls it here and openSUSE does not. And then try to find a way which is common for both openSUSE and SLE
20f157e
to
d736cf2
Compare
What I tried now is to call the update subroutine, one call from |
d736cf2
to
178fcb8
Compare
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.
Your changes seem to become more clear now so I think we are moving in the right direction.
For the difference we still have between SLE and openSUSE I assume there could be mainly two reasons:
- Simply historical reasons, the both main.pm files deviated because we had the duplication and there is no better reason so we can just select one of both approaches and align the other to it
- Actual different product behaviour which we need to preserve but properly describe in comments why it must differ
lib/main_common.pm
Outdated
loadtest "update/zypper_up"; | ||
} | ||
} | ||
} |
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.
ok, this looks like it's going in the right direction but you still have the whole update function still in products/opensuse/main.pm which I think you can remove and fully replace by this one.
products/opensuse/main.pm
Outdated
@@ -480,7 +467,6 @@ else { | |||
{ | |||
load_fixup_network(); | |||
load_fixup_firewall(); | |||
load_system_update_tests(); |
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.
can we actually remove the call here? Why should this be ok?
f2bd6fc
to
7b43a76
Compare
Using an internal variable to not schedule updates tests in openSUSE three times in the same tests (1 for the removed call that I added back again, 1 for the console tests and 1 for the x11 tests) and still keep the same behavior. |
7b43a76
to
0ce28f4
Compare
lib/main_common.pm
Outdated
} | ||
} | ||
set_var('SYSTEM_UPDATED', 1); | ||
} |
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.
Already a big step forward. Now we should make sure that the part loadtest "update/updates_packagekit_gpk";
as well as loadtest "update/zypper_up";
only appears once.
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.
ok, could you please still try to extract the duplicate call of the two mentioned modules?
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.
.
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 missed that comment, now that part is refactored.
lib/main_common.pm
Outdated
} | ||
if (get_var('ZYPPER_ADD_REPOS')) { | ||
loadtest "console/zypper_add_repos"; | ||
} |
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.
@rwx788 do you think we can just extract the above two loadtest outside of the is_sle/opensuse
branch? I think both should be applicable just based on the variables, e.g. ZYPPER_ADD_REPOS
, and not need to be additionally depending on is_sle/opensuse
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.
This part was there long time ago, so I haven't touched it. As of now it's used only for openSUSE. Of course we can move control to variables instead of using variables we already have. But it won't help much as main.pms are spaghetti code which contains complex logic which cannot be always generalized.
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.
and this is why we are improving the code here. I was asking to simplify by just moving that part out of the is_sle
-branch, nothing else, no new variables, no change in variables.
0ce28f4
to
4562709
Compare
Moved outside those two subroutines for clearing and addding repos. |
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.
Can we get schedule for 2 runs before changes and after to reduce risks of scheduling something differently? You can use _EXIT_AFTER_SCHEDULE test suite variable to just output scheduled test modules and exit. But looks good already.
4562709
to
860bb64
Compare
Now looks similar comparing among different schedules: |
860bb64
to
758ac03
Compare
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.
LGTM. Provided schedules are identical, so if @okurz you don't have other points, let's merge.
Yes, the PR looks very nice now. We should keep the ticket open though to answer why we have the remaining differences, e.g. why we skip some tests on SLE-staging but not openSUSE-staging. |
@andreasstieger @lnussel @DimStar77 @nilxam @mimi1vx FYI this PR might have some influence on the test schedule and update handling even though it is intended to not cause any problems |
Thanks for the heads-up |
@czerw for openSUSE QAM |
Was this change verified on SLE12 ? Maybe it is just coincidence but today started to fail |
Did verification with code before the change and it works http://10.100.12.105/tests/2391. @okurz could you please check it? |
@czerw, that's weird as schedules are identical for runs before the change and after, and there is no functional change. Have you reverted just this commit for your local run? Looks like test/product issue as window you get http://10.100.12.105/tests/2391#step/updates_packagekit_gpk/13 doesn't show up on osd. |
@rwx788 , my local run was done without this PR, i just cloned failing job from osd and it works. So it is not product issue.
Same behavior is also for SLE15 https://openqa.suse.de/tests/1791027, although it was failing even before, but for other reason. |
@rwx788 probably for the reason that in consoletest_setup is packagekit stopped and is not running and is started in consoletest_finish |
@rwx788 Thank you! |
Harmonize updating handling SUSE/openSUSE: