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

use packaged pytest, not some venv #16694

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Oct 17, 2024

Problem Statement

The current FAM test setup relies on being able to reach the Internet, which is "bad design"™ but also actually broken in IPv6-only environments because our lab network has IPv6, but no route to the broader Internet.

Solution

Instead of installing test dependencies via pip from the Internet, install them via dnf from the RH CDN and use them in the tests here.
There is an accompanying PR against the repo that carries the setup playbooks.

Related Issues

@evgeni evgeni marked this pull request as ready for review October 17, 2024 13:33
@evgeni evgeni requested a review from a team as a code owner October 17, 2024 13:33
@jameerpathan111 jameerpathan111 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Oct 17, 2024
@jameerpathan111
Copy link
Contributor

trigger: test-robottelo
pytest: tests/foreman/sys/test_fam.py
network_type: ipv6

@evgeni
Copy link
Member Author

evgeni commented Oct 17, 2024

@jameerpathan111 given the executed fam-test-setup playbook is the same for every Satellite branch, I think this needs cherry-picking to all supported branches.

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 8994
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/sys/test_fam.py --external-logging
Test Result : =========== 108 failed, 2 passed, 472 warnings in 2113.86s (0:35:13) ===========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Oct 17, 2024
@evgeni
Copy link
Member Author

evgeni commented Oct 17, 2024

The PRT failure is expected, you need to run it against an AAP that has my deployment patches in.

@jameerpathan111 jameerpathan111 added 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z Introduced in or relating directly to Satellite 6.16 labels Oct 18, 2024
@jameerpathan111
Copy link
Contributor

@evgeni Acked. Can you fix pre-commit failures?

@evgeni
Copy link
Member Author

evgeni commented Oct 18, 2024

Done!

@jameerpathan111 jameerpathan111 added CherryPick PR needs CherryPick to previous branches and removed No-CherryPick PR doesnt need CherryPick to previous branches labels Oct 18, 2024
@@ -74,6 +74,13 @@ def setup_fam(module_target_sat, module_sca_manifest, install_import_ansible_rol
# Edit Makefile to not try to rebuild the collection when tests run
module_target_sat.execute(f"sed -i '/^live/ s/$(MANIFEST)//' {FAM_ROOT_DIR}/Makefile")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but could we introduce an environment variable for this as well so we can avoid patching code altogether?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, probably. But not today ;)

@evgeni
Copy link
Member Author

evgeni commented Oct 21, 2024

Rebased and updated to match the last version of theforeman/foreman-ansible-modules#1788 -- now only replacing pytest to $(PYTEST_COMMAND) and letting the rest of the -vv handling to other means.

@jameerpathan111 jameerpathan111 merged commit ddb3ec1 into SatelliteQE:master Oct 21, 2024
8 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 21, 2024
github-actions bot pushed a commit that referenced this pull request Oct 21, 2024
github-actions bot pushed a commit that referenced this pull request Oct 21, 2024
@evgeni evgeni deleted the fam-packaged-pytest branch October 21, 2024 10:05
jameerpathan111 pushed a commit that referenced this pull request Oct 21, 2024
use packaged pytest, not some venv (#16694)

(cherry picked from commit ddb3ec1)

Co-authored-by: Evgeni Golov <[email protected]>
jameerpathan111 pushed a commit that referenced this pull request Oct 21, 2024
use packaged pytest, not some venv (#16694)

(cherry picked from commit ddb3ec1)

Co-authored-by: Evgeni Golov <[email protected]>
jameerpathan111 pushed a commit that referenced this pull request Oct 21, 2024
use packaged pytest, not some venv (#16694)

(cherry picked from commit ddb3ec1)

Co-authored-by: Evgeni Golov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 6.16.z Introduced in or relating directly to Satellite 6.16 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.

4 participants