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

Check SMELT to decide when SLES+HA tests can be skipped on QAM #19968

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

alvarocarvajald
Copy link
Contributor

@alvarocarvajald alvarocarvajald commented Aug 14, 2024

The lib/hacluster::is_not_maintenance function was originally created to skip resource-expensive test modules when the package under test in Maintenance is not related to these tests (for example, samba or ctdb for ha/ctdb and ha/filesystem, haproxy for ha/haproxy or drbd for ha/drbd_passive and ha/filesystem). The function would decide this only based on the BUILD setting, which was supposed to contain the package under test, but in reality a Maintenance Update can include multiple packages and the one which is used in the BUILD setting is actually only the first package from the MU when ordered alphabetically. This of course causes some tests to be skipped even when it is necessary that they run.

This commit modifies the lib/hacluster::is_not_maintenance function to also query SMELT for the list of packages associated to the Maintenance Incident, and then check against that list too after having checked against the value of the BUILD setting. This way, the function is more exhaustive in its checks, and should not skip necessary tests based on incomplete information. It also adds a check for kernel, as kernel maintenances should not skip any tests.

  • Related ticket: N/A
  • Needles: N/A

Verification runs

  • Non Maintenance (ha/ctdb test should run fully): node 1, node 2, client 🟢
  • Maintenance for a samba update (ha/ctdb test should run fully): node 1, node 2, client 🟢
  • Kernel maintenance (ha/ctdb, ha/drbd_passive and ha/haproxy should run fully): node 1, node 2, client 🟢
  • Maintenance for a non kernel, samba, haproxy nor drbd update (ha/ctdb, ha/drbd_passive and ha/haproxy tests should be skipped): node 1, node 2, client 🟢

Copy link

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

This is an automatically generated QA checklist based on modified files.

tests/ha/ctdb.pm Outdated Show resolved Hide resolved
Copy link
Contributor

@jankohoutek jankohoutek left a comment

Choose a reason for hiding this comment

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

LGTM

The `lib/hacluster::is_not_maintenance` function was originally created
to skip resource-expensive test modules when the package under test in
Maintenance is not related to these tests (for example, `samba` or
`ctdb` for `ha/ctdb` and `ha/filesystem`, `haproxy` for `ha/haproxy` or
`drbd` for `ha/drbd_passive` and `ha/filesystem`). The function would
decide this only based on the *BUILD* setting, which was supposed to
contain the package under test, but in reality a Maintenance Update can
include multiple packages and the one which is used in the *BUILD*
setting is actually only the first package from the MU when ordered
alphabetically. This of course causes some tests to be skipped even when
it is necessary that they run.

This commit modifies the `lib/hacluster::is_not_maintenance` function to
also query SMELT for the list of packages associated to the Maintenance
Incident, and then check against that list too after having checked
against the value of the *BUILD* setting. This way, the function is more
exhaustive in its checks, and should not skip necessary tests based on
incomplete information. It also adds a check for `kernel`, as kernel
maintenances should not skip any tests.
so it doesn't clash with the one in `ha/ctdb` when both test modules are
scheduled in the same test.
@alvarocarvajald alvarocarvajald merged commit 0aed2ac into os-autoinst:master Aug 15, 2024
10 checks passed
@alvarocarvajald alvarocarvajald deleted the check_qam_pkgs branch August 15, 2024 16:32
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