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

Harmonize updating handling SUSE/openSUSE #5175

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

jknphy
Copy link
Contributor

@jknphy jknphy commented Jun 6, 2018

Harmonize updating handling SUSE/openSUSE:

@jknphy jknphy force-pushed the harmonize_updating_handling branch 8 times, most recently from e715250 to 165b904 Compare June 8, 2018 05:18
loadtest "update/zypper_up";
}
}

Copy link
Member

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

Copy link
Contributor Author

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.

@@ -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();
Copy link
Member

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;
Copy link
Member

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

@jknphy jknphy force-pushed the harmonize_updating_handling branch 5 times, most recently from 20f157e to d736cf2 Compare June 8, 2018 12:17
@jknphy
Copy link
Contributor Author

jknphy commented Jun 8, 2018

What I tried now is to call the update subroutine, one call from load_x11tests and another one from load_consoletests and I moved the required code to main_common to only have one subroutine load_system_update_tests that try to work with both products.

@jknphy jknphy force-pushed the harmonize_updating_handling branch from d736cf2 to 178fcb8 Compare June 8, 2018 12:44
@jknphy
Copy link
Contributor Author

jknphy commented Jun 8, 2018

VRs: gnome and minimal_x

Copy link
Member

@okurz okurz left a 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:

  1. 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
  2. Actual different product behaviour which we need to preserve but properly describe in comments why it must differ

loadtest "update/zypper_up";
}
}
}
Copy link
Member

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.

@@ -480,7 +467,6 @@ else {
{
load_fixup_network();
load_fixup_firewall();
load_system_update_tests();
Copy link
Member

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?

@jknphy jknphy force-pushed the harmonize_updating_handling branch 2 times, most recently from f2bd6fc to 7b43a76 Compare June 11, 2018 07:01
@jknphy
Copy link
Contributor Author

jknphy commented Jun 11, 2018

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.
VRs:

@jknphy jknphy force-pushed the harmonize_updating_handling branch from 7b43a76 to 0ce28f4 Compare June 11, 2018 07:08
}
}
set_var('SYSTEM_UPDATED', 1);
}
Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

.

Copy link
Contributor Author

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.

}
if (get_var('ZYPPER_ADD_REPOS')) {
loadtest "console/zypper_add_repos";
}
Copy link
Member

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

Copy link
Member

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.

Copy link
Member

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.

@jknphy jknphy force-pushed the harmonize_updating_handling branch from 0ce28f4 to 4562709 Compare June 13, 2018 11:49
@jknphy
Copy link
Contributor Author

jknphy commented Jun 18, 2018

Moved outside those two subroutines for clearing and addding repos.

@jknphy jknphy changed the title [WIP] Harmonize updating handling SUSE/openSUSE Harmonize updating handling SUSE/openSUSE Jun 18, 2018
Copy link
Member

@rwx788 rwx788 left a 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.

@jknphy
Copy link
Contributor Author

jknphy commented Jun 22, 2018

@jknphy jknphy force-pushed the harmonize_updating_handling branch from 4562709 to 860bb64 Compare June 25, 2018 06:58
@jknphy
Copy link
Contributor Author

jknphy commented Jun 25, 2018

Now looks similar comparing among different schedules:

  • opensuse-Staging:J-Staging2-DVD-x86_64-Build1945.2-gnome@64bit: O3 vs local
  • opensuse-Staging:J-Staging2-DVD-x86_64-Build1945.2-textmode@64bit: O3 vs local
  • sle-15-Installer-DVD-x86_64-Build668.1-textmode@64bit: OSD vs local
  • sle-15-Installer-DVD-x86_64-Build668.1-gnome@64bit: OSD vs local

@jknphy jknphy force-pushed the harmonize_updating_handling branch from 860bb64 to 758ac03 Compare June 25, 2018 07:12
Copy link
Member

@rwx788 rwx788 left a 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.

@okurz
Copy link
Member

okurz commented Jun 27, 2018

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.

@okurz okurz merged commit 5742ab6 into os-autoinst:master Jun 27, 2018
@okurz
Copy link
Member

okurz commented Jun 27, 2018

@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

@DimStar77
Copy link
Contributor

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

@andreasstieger
Copy link
Contributor

@czerw for openSUSE QAM

@czerw
Copy link
Contributor

czerw commented Jun 28, 2018

Was this change verified on SLE12 ? Maybe it is just coincidence but today started to fail
updates_packagekit_gpk https://openqa.suse.de/tests/1790992#step/updates_packagekit_gpk/18.
What I see that order of the test is little bit different when comparing with last good result https://openqa.suse.de/tests/1789711. (progress is down at the moment, so there is no poo yet).

@czerw
Copy link
Contributor

czerw commented Jun 28, 2018

Did verification with code before the change and it works http://10.100.12.105/tests/2391. @okurz could you please check it?

@rwx788
Copy link
Member

rwx788 commented Jun 28, 2018

@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.

@czerw
Copy link
Contributor

czerw commented Jun 28, 2018

@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.
Schedules are not identical before and after:

Same behavior is also for SLE15 https://openqa.suse.de/tests/1791027, although it was failing even before, but for other reason.

@czerw
Copy link
Contributor

czerw commented Jun 28, 2018

@rwx788 probably for the reason that in consoletest_setup is packagekit stopped and is not running and is started in consoletest_finish

@rwx788
Copy link
Member

rwx788 commented Jun 28, 2018

@czerw right, missed where test suit is scheduled. I'll revert this PR then, because @jknphy is off today. Thanks!

@czerw
Copy link
Contributor

czerw commented Jun 28, 2018

@rwx788 Thank you!

@jknphy jknphy mentioned this pull request Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants