Fix install requirements of disabled checks#4872
Open
jakubskunda wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request ensures that disabled checks are skipped when collecting essential requirements across the upgrade and prepare steps. In tmt/steps/prepare/distgit.py, use the variable 'g' instead of 'guest' to correctly reference the current guest within the loop.
LecrisUT
approved these changes
May 7, 2026
Contributor
|
A test case would be nice. |
8ae8179 to
5c0aa98
Compare
Skip essential requirements collection for disabled checks in prepare and execute steps. Previously, even checks with `enabled: false` contributed their requirements, causing unnecessary package installations on the guest. Added unit tests verifying that disabled checks do not contribute essential requirements during the prepare step. Fixes teemtee#4860
5c0aa98 to
9b64a29
Compare
| shutil.rmtree(tmp) | ||
|
|
||
| assert result.exit_code == 0 | ||
| assert '/usr/bin/dmesg' not in result.output |
Contributor
There was a problem hiding this comment.
This has since been changed to /bin/dmesg maybe just checking for dmesg would be better
| if TYPE_CHECKING: | ||
| from tests import RunTmt | ||
|
|
||
| DISABLED_CHECK_DATA = Path(__file__).resolve().parent / 'disabled_check_data' |
Contributor
There was a problem hiding this comment.
I can't find this file. Did it get accidentally left out?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip essential requirements collection for disabled checks in prepare and execute steps. Previously, even checks with
enabled: falsecontributed their requirements, causing unnecessary package installations on the guest.Fixes #4860
Pull Request Checklist