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.
Comment on lines
+338
to
341
| if not check.enabled: | ||
| continue | ||
| collected_requires += check.plugin.essential_requires( | ||
| guest, test, self._logger |
Contributor
There was a problem hiding this comment.
Use g instead of guest to correctly refer to the current guest in the loop when collecting essential requirements for checks.
Suggested change
| if not check.enabled: | |
| continue | |
| collected_requires += check.plugin.essential_requires( | |
| guest, test, self._logger | |
| if not check.enabled: | |
| continue | |
| collected_requires += check.plugin.essential_requires( | |
| g, test, self._logger |
LecrisUT
approved these changes
May 7, 2026
Contributor
|
A test case would be nice. |
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
8ae8179 to
5c0aa98
Compare
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