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

[6.14.z] Removing changes associated with Bugbear rule B019 #13718

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #13715

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.

(cherry picked from commit 8f7fe94)
@Satellite-QE Satellite-QE added 6.14.z Introduced in or relating directly to Satellite 6.14 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Jan 10, 2024
@Satellite-QE
Copy link
Collaborator Author

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

@JacobCallahan JacobCallahan merged commit 4353101 into 6.14.z Jan 10, 2024
17 of 18 checks passed
@JacobCallahan JacobCallahan deleted the cherry-pick-6.14.z-8f7fe941d1f474328d6862692b20f9ed5d2f1b14 branch January 10, 2024 18:53
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 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants