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

RHEL10 Clients support, test in Errata e2e parametrized registered hosts #16807

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

damoore044
Copy link
Contributor

@damoore044 damoore044 commented Oct 28, 2024

  • Add RHEL10 to robottelo supported versions, implement in some existing e2e tests that already use RHEL9 /prior.
  • Fix CLI setup method setup_org_for_a_custom_repo , where updating the activation-key requires the name.
    ^This was a bug, wrapping up reverting those changes

Problem Statement:

  • Almost all existing pytest markers need to be bumped, and will again when RHEL11 is supported or RHEL8 is dropped from support. Existing fixture args regex patterns are matching chars not str, so '10' is excluded from normal collection, unless passed explicitly ('|10') , or we use string matching for regex to get two-digit versions matched, see below.

Solution

  • Pass the rhel_ver_match fixture a string to collect rhel8, 9, and 10 params for fixture rhel_contenthost.
    @pytest.marker.rhel_ver_match(r'^(?!.*(7|fips)).*$') < str match, exclude any with "7" or "fips"
    @pytest.marker.rhel_ver_match('8|9|10') or ('[^7]|10') < pass "10" explicitly

  • ^ Above solutions will need regular bumping, when versions are added or dropped from supportability.yaml

  • @pytest.marker.rhel_ver_match('N-2') N is RHEL10 (newest version), additionally RHEL9, RHEL8

Proposed Fixture change

  • For pytest marker rhel_ver_match , it would be useful to accept input of N-# (major rhel versions). This would be helpful because we won't have to change the fixtures for each and every test, everytime we add a new RHEL version or remove one from supportability.yaml.

  • ie: many tests use ('[^6]') which is 'all single-char versions except 6' , RHEL6 is not in supportability anymore, and 10 is two digits and so will be all future versions. So we would need to pass explicitly, ie ('10|11|12') and bump with each added/removed version.

  • Solution: Accept and check for a strict fixture argument of length 3, "N-#" , where N is always the latest supported version, and # is a single digit number of preceding supported versions to also collect, excluding fips. Existing test markers will not conflict and will be parsed as before, so their collection should not be impacted.

  • Example: @pytest.mark.rhel_ver_match('N-3') would collect 4 params, N which in this PR is RHEL10, along with the 3 preceding supported versions, RHEL9, RHEL8 and RHEL7.

  • To collect a single param for just N (latest version only, here is RHEL10);
    simply pass the marker rhel_ver_match('N-0')

PRT

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py -k 'rhel10-ipv4'  # or /cli/ /api/
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end --collect-only

@damoore044 damoore044 added CherryPick PR needs CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master 6.16.z Introduced in or relating directly to Satellite 6.16 labels Oct 28, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9172
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : =================== 9 warnings, 1 error in 579.86s (0:09:39) ===================

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Oct 28, 2024
@damoore044 damoore044 marked this pull request as draft October 28, 2024 16:13
@devendra104
Copy link
Member

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9174
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : ================== 9 warnings, 2 errors in 692.91s (0:11:32) ===================

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
deploy_rhel_version: 10
target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9178
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : =================== 9 warnings, 1 error in 600.65s (0:10:00) ===================

@Gauravtalreja1
Copy link
Collaborator

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9215
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_end_to_end[rhel10-ipv4-registered_contenthost0] --external-logging
Test Result : ================= 1 passed, 20 warnings in 1065.16s (0:17:45) ==================

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR PRT-Passed Indicates that latest PRT run is passed for the PR labels Nov 4, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py -k 'test_positive_install_multiple_in_host or test_positive_install_in_hc'
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4-registered_contenthost0]
env:
    ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
    ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4]
env:
ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4]
env:
ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

1 similar comment
@devendra104
Copy link
Member

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py::test_positive_install_in_hc[rhel10-ipv4]
env:
ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-rhel'
ROBOTTELO_content_host__rhel10__vm__target_template: 'RHEL-10-x86_64-nightly-beta-latest'

@damoore044
Copy link
Contributor Author

damoore044 commented Nov 20, 2024

^ SatJenkins MR has been merged, 'rhel10' is in broker_settings.yaml and content_host.yaml.
This case (test_positive_apply_for_all_hosts) should use Broker to check out 4 RHEL10 hosts by the nick.

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py::test_positive_apply_for_all_hosts

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9414
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_errata.py::test_positive_apply_for_all_hosts --external-logging
Test Result : ================= 1 passed, 40 warnings in 1544.68s (0:25:44) ==================

@Satellite-QE Satellite-QE added PRT-Passed Indicates that latest PRT run is passed for the PR and removed PRT-Failed Indicates that latest PRT run is failed for the PR labels Nov 20, 2024
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 20, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py -k 'test_positive_filter_by_environment or test_content_host_errata_se
arch_commands'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py -k 'test_positive_filter_by_environment or test_content_host_errata_se
arch_commands'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py -k 'test_positive_filter_by_environment or test_content_host_errata_search_commands'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9441
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/ui/test_errata.py -k test_positive_filter_by_environment or test_content_host_errata_search_commands --external-logging
Test Result : ========= 2 passed, 30 deselected, 786 warnings in 5533.62s (1:32:13) ==========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 21, 2024
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Nov 22, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_errata.py tests/foreman/cli/test_errata.py tests/foreman/ui/test_errata.py
env:
     ROBOTTELO_content_host__rhel10__vm__workflow: 'deploy-template'
     ROBOTTELO_content_host__rhel10__vm__deploy_template_type: 'rhel'
     ROBOTTELO_content_host__rhel10__vm__deploy_custom_template_version: '10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9458
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_errata.py tests/foreman/cli/test_errata.py tests/foreman/ui/test_errata.py --external-logging
Test Result : ========== 3 failed, 91 passed, 7978 warnings in 18638.31s (5:10:38) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Nov 26, 2024
@damoore044
Copy link
Contributor Author

^ All cases parametrized by RHEL10 pass, collection is as expected with a higher total number.
Individual stream fixes coming in an separate PR for the 3 transient failures

@damoore044 damoore044 removed the request for review from Gauravtalreja1 November 26, 2024 14:17
@JacobCallahan JacobCallahan merged commit 97e4c00 into SatelliteQE:master Nov 26, 2024
9 of 10 checks passed
Comment on lines +1668 to +1670
with Broker(
nick='rhel10', workflow='deploy-template', host_class=ContentHost, _count=2
) as clients:
Copy link
Collaborator

Choose a reason for hiding this comment

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

@damoore044 If we already have the nick defined in broker_settings, we might not require workflow arg here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will circle back to this and test locally

# one custom repo on satellite, for all hosts to use
custom_repo = target_sat.api.Repository(url=CUSTOM_REPO_URL, product=module_product).create()
custom_repo.sync()
module_cv.repository = [custom_repo]
module_cv.update(['repository'])
with Broker(
nick=distro,
workflow='deploy-rhel',
workflow='deploy-template',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPick PR needs CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR Stream Introduced in or relating directly to Satellite Stream/Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants