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 coverage, rhel7 & 8 hosts bumped #17003

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

damoore044
Copy link
Contributor

@damoore044 damoore044 commented Nov 26, 2024

Update RH repos for RHEL10 Beta, BaseOS, and Appstream
Migrate existing rhel 7 and 8 content hosts to rhel 9 and 10.
By parametrization of host fixtures listed here: /pytest_plugins/fixture_markers.py

Fore Reviewers: Many clients are still using RHEL8, and their BZ coverage relies on some RedHat packages, errata, content etc, that is not yet available for RHEL10. Should we bump these 8 clients to RHEL9, until the needed content is available for RHEL10?

PRT

For cases using fixture rhel_contenthost
parametrized by pytest.marker.rhel_ver_match or rhel_ver_list

trigger: test-robottelo
pytest: tests/foreman/api cli ui/module.py -k 'rhel10' 

@damoore044 damoore044 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Nov 26, 2024
@damoore044 damoore044 self-assigned this Nov 26, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ -k 'rhel10' --ignore-glob='**/test_errata.py' --collect-only

@damoore044
Copy link
Contributor Author

damoore044 commented Nov 26, 2024

^ ignoring errata rhel10 cases for first collection,
as they've already been tested and merged in #16807

Works locally but fails for PRT, see below for proper CI exclusion comment

17:46:48  ============================= test session starts ==============================
17:46:48  platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
    ...
17:47:20  collected 5460 items / 5412 deselected / 48 selected <<<

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ -k 'rhel10' --collect-only $(find tests/foreman/ -type f -name 'test_errata.py' -exec echo --ignore={} \;)

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/ -k 'rhel10' $(find tests/foreman/ -type f -name 'test_errata.py' -exec echo --ignore={} \;)
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

damoore044 commented Nov 26, 2024

^ foreman/API tests with rhel10 params, ignoring test_errata.py
Should be 9 new cases (rhel10) collected and executed

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/ -k 'rhel10' $(find tests/foreman/api/ -type f -name 'test_errata.py' -exec echo --ignore={} \;)
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 damoore044 changed the title RHEL10 Clients coverage in Content, some rhel8 content bumped to rhel9 RHEL10 Clients coverage in Content, some rhel7 and 8 content bumped to rhel9 and 10 Nov 26, 2024
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_contenthost.py -k 'rhel10' 
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: 9471
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui/test_contenthost.py -k rhel10 --external-logging
Test Result : == 10 failed, 10 passed, 129 deselected, 1457 warnings in 6396.11s (1:46:36) ===

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

trigger: test-robottelo
pytest: tests/foreman/api/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'

@damoore044
Copy link
Contributor Author

^ Full test of all cases api/test_errata.py , rhel10 and priors.
Due to significant changes to that module

@damoore044
Copy link
Contributor Author

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

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9490
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_errata.py --external-logging
Test Result : ========== 4 failed, 10 passed, 4437 warnings in 10620.88s (2:57:00) ===========

@damoore044
Copy link
Contributor Author

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

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9554
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_errata.py --external-logging
Test Result : =========== 7 failed, 1279 warnings, 7 errors in 6489.17s (1:48:09) ============

@damoore044 damoore044 force-pushed the rhel10-cases branch 2 times, most recently from a16ae35 to 448d830 Compare December 17, 2024 16:36
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api -k 'rhel10'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli -k 'rhel10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 9659
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli -k rhel10 --external-logging
Test Result : = 9 failed, 12 passed, 1938 deselected, 5353 warnings, 14 errors in 16245.78s (4:30:45) =

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api -k 'rhel10'

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_errata.py::test_downgrading_package_shows_errata_from_library[rhel10-ipv4]

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10211
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/cli/test_errata.py::test_downgrading_package_shows_errata_from_library[rhel10-ipv4] --external-logging
Test Result : ================== 1 passed, 16 warnings in 915.21s (0:15:15) ==================

@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 Feb 17, 2025
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api -k 'rhel10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10212
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api -k rhel10 --external-logging
Test Result : == 2 failed, 22 passed, 2332 deselected, 4270 warnings in 6403.66s (1:46:43) ===

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

trigger: test-robottelo
pytest: tests/foreman/cli -k 'rhel10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10213
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/cli -k rhel10 --external-logging
Test Result : = 9 failed, 24 passed, 1943 deselected, 3811 warnings, 3 errors in 9389.54s (2:36:29) =

@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui -k 'rhel10'

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 10231
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/ui -k rhel10 --external-logging
Test Result : === 4 failed, 17 passed, 766 deselected, 2259 warnings in 6718.27s (1:51:58) ===

Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

Looks good to me, just one question.

'YumRepository': {'url': settings.repos.yum_0.url},
}
],
indirect=True,
)
@pytest.mark.rhel_ver_list([settings.content_host.default_rhel_version])
@pytest.mark.rhel_ver_match('N-0')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't it same as running test against EL10? or do you wish to parametrize this test for EL9 and E10?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes just EL10, I could specify '10' for rhel_ver_match , but with N-0 it will always pick the newest RHEL supported, and only that one.

Copy link
Member

@JacobCallahan JacobCallahan left a comment

Choose a reason for hiding this comment

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

just a couple of small things

rhel_xy = Version(
constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos_beta']['version']
if rhel_ver == 10 # TODO: Remove beta repos once RHEL10 is GA
else constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version']
if rhel_ver == 7
else constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version']
)
Copy link
Member

Choose a reason for hiding this comment

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

In cases like these, normal if/elif/else blocks are the same number of lines and flow better.

Suggested change
rhel_xy = Version(
constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos_beta']['version']
if rhel_ver == 10 # TODO: Remove beta repos once RHEL10 is GA
else constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version']
if rhel_ver == 7
else constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version']
)
if rhel_ver == 10 # TODO: Remove beta repos once RHEL10 is GA
rhel_xy = Version(constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos_beta']['version'])
elif rhel_ver == 7:
rhel_xy = Version(constants.REPOS['kickstart'][f'rhel{rhel_ver}']['version'])
else:
rhel_xy = Version(constants.REPOS['kickstart'][f'rhel{rhel_ver}_bos']['version'])

Comment on lines 872 to 878
tail = (
f'rhel/server/7/{REPOS["kickstart"][distro]["version"]}/x86_64/kickstart'
if distro == 'rhel7'
else f'{distro.split("_")[0]}/{REPOS["kickstart"][distro]["version"]}/beta/x86_64/baseos/kickstart'
if 'beta' in distro # for future beta rhel distros
else f'{distro.split("_")[0]}/{REPOS["kickstart"][distro]["version"]}/x86_64/baseos/kickstart' # noqa:E501
)
Copy link
Member

Choose a reason for hiding this comment

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

now that you're injecting the two additional lines (and additional condition), i'd recommend the same as earlier.

@JacobCallahan JacobCallahan merged commit 1b41e14 into SatelliteQE:master Feb 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No-CherryPick PR doesnt need 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.

8 participants