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

Stream fix errata:UI (test_end_to_end) #12978

Merged
merged 4 commits into from
Nov 9, 2023

Conversation

damoore044
Copy link
Contributor

@damoore044 damoore044 commented Oct 25, 2023

Refactor errata e2e with updated standards, contenthost through Global Registration, enable repositories with subscription manager.

Remove setting_update of remote_execution_by_default:True (BZ 2029192), this user setting has
been removed for 6.15.0, and by default is set to True.

Used request.addfinalizer for cleanup of entities modified in the new fixture registered_contenthost, to prevent conflicts between parameterized runs.
Depends on navigation fix in airgun 1018. Merged

@damoore044

This comment was marked as duplicate.

@damoore044 damoore044 force-pushed the errata-stream-fix branch 5 times, most recently from e4e2074 to 6e85ba1 Compare October 27, 2023 17:16
@damoore044

This comment was marked as duplicate.

@damoore044

This comment was marked as duplicate.

@damoore044 damoore044 force-pushed the errata-stream-fix branch 3 times, most recently from 307ea77 to 5b72ec4 Compare October 31, 2023 22:38
@damoore044 damoore044 added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Oct 31, 2023
@damoore044

This comment was marked as duplicate.

@damoore044 damoore044 marked this pull request as ready for review October 31, 2023 23:26
@damoore044 damoore044 requested review from a team as code owners October 31, 2023 23:26
@damoore044
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/ui/test_errata.py -k test_end_to_end
airgun: 1018

@damoore044

This comment was marked as duplicate.

@damoore044

This comment was marked as duplicate.

Copy link
Contributor

@jeremylenz jeremylenz left a comment

Choose a reason for hiding this comment

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

A couple thoughts below, for what they're worth :)

In general we're moving away from the term "content host" in favor of simply "host."

tests/foreman/ui/test_errata.py Outdated Show resolved Hide resolved
tests/foreman/ui/test_errata.py Outdated Show resolved Hide resolved
@damoore044

This comment was marked as duplicate.

@damoore044
Copy link
Contributor Author

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

tests/foreman/ui/test_errata.py Outdated Show resolved Hide resolved
tests/foreman/ui/test_errata.py Outdated Show resolved Hide resolved
_remove_client_package(registered_contenthost, FAKE_1_CUSTOM_PACKAGE_NAME)
assert _install_client_package(registered_contenthost, FAKE_1_CUSTOM_PACKAGE)
assert (
appl_errata := registered_contenthost.applicable_errata_count
Copy link
Contributor

Choose a reason for hiding this comment

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

PRT just blows my mind here with E assert 1 == 1
I though I understood how the walrus operator works, also locally this works. No idea what's wrong in PRT's python version walrus implementation. Maybe try without walrus.

Copy link
Contributor Author

@damoore044 damoore044 Nov 7, 2023

Choose a reason for hiding this comment

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

@JacobCallahan and I had some discussion around this, there must be some sort of ambiguity in the assignment I am not seeing. I see success assigning the applicable_errata count first, and then arresting on the next line

@damoore044 damoore044 force-pushed the errata-stream-fix branch 2 times, most recently from 6d79acb to 83cc4bc Compare November 6, 2023 15:16
Comment on lines 1696 to 1697
assert len(cv_info['versions']) > 0
cvv = sorted(cvv['id'] for cvv in cv_info['versions'])[-1]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Non-blocking, Sorting is fine here, but why we're explicitly hitting this issue in stream(seen a couple of PRs for this), so just wondering if are you aware of any related changes in stream? @damoore044 @vsedmik @sambible

Copy link
Contributor

Choose a reason for hiding this comment

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

@Gauravtalreja1 The issue is not specific to stream, I've seen it in older versions before and this BZ was reported already. However, it feels to happen more frequently in stream - same passes in z-streams but fails in stream.

tests/foreman/ui/test_errata.py Outdated Show resolved Hide resolved
tests/foreman/ui/test_errata.py Outdated Show resolved Hide resolved
@damoore044
Copy link
Contributor Author

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

1 similar comment
@damoore044
Copy link
Contributor Author

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

@vsedmik
Copy link
Contributor

vsedmik commented Nov 9, 2023

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

@Griffin-Sullivan Griffin-Sullivan merged commit 783549a into SatelliteQE:master Nov 9, 2023
6 checks passed

@request.addfinalizer
# Cleanup for in between parameterized runs
def cleanup():
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks that in this cleanup we just roll back all the changes so that we have the module-scoped fixtures (mostly module_cv) ready for the next RHEL contenthost (via parametrization). What is the idea behind this need? Isn't it just fine to go with function-scoped fixtures instead module-scoped?

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 could switch them to function fixtures, but may not be a simple change.
Many of the errata tests already run using module scope fixtures, so was keeping those for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, no worries, merged already.

@damoore044
Copy link
Contributor Author

damoore044 commented Nov 10, 2023

Future Notes: Will probably also work without extensive cleanup, by using function-scoped cv fixture or custom.

Vlad made a good point today however- the teardown is nice testing to have, of a graceful cleanup of entities being used to host content w/ registered host. Could probably use some assertions at some point.

I wonder if we have any other testing around cleanup for content & entities of a reg. host? Looking into that

shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
* Updates for UI errata e2e

* Check bulk generate applicability task

* Cleanup between parameterized runs

* Addressing comments
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 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