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

Removing changes associated with Bugbear rule B019 #13715

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

JacobCallahan
Copy link
Member

This PR reverts the change from lru_cache to cachedmethod. The primary goal of the original change was to avoid memory leaks, due to lru_cache holding instances of a class alive longer than they should be.
However, for our test framework, the workaround to avoid these memory leaks really aren't worth it.

I also added an lru_cache to cli_factory.getattr, improving its recurring lookup time substantially.

Finally, I corrected a type check that was erroneously converted in the initial pass.

This PR reverts the change from lru_cache to cachedmethod.
The primary goal of the original change was to avoid memory leaks, due
to lru_cache holding instances of a class alive longer than they should
be.
However, for our test framework, the workaround to avoid these memory
leaks really aren't worth it.

I also added an lru_cache to cli_factory.__getattr__, improving its
recurring lookup time substantially.

Finally, I corrected a type check that was erroneously converted in the
initial pass.
@JacobCallahan JacobCallahan added Bug This is an issue with the robottelo framework Urgent Priority Get this done now Framework Changes A modification of the robottelo framework CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jan 10, 2024
@JacobCallahan JacobCallahan requested a review from a team as a code owner January 10, 2024 15:30
@JacobCallahan
Copy link
Member Author

trigger: test-robottelo
pytest: tests/foreman/cli -k test_host_registration_end_to_end

@JacobCallahan
Copy link
Member Author

PRT results look good, the one error is due to rhel6 checkout, so unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 Bug This is an issue with the robottelo framework CherryPick PR needs CherryPick to previous branches Framework Changes A modification of the robottelo framework Urgent Priority Get this done now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants