Skip to content

Fix install requirements of disabled checks#4872

Open
jakubskunda wants to merge 1 commit into
teemtee:mainfrom
jakubskunda:fix-install-requirements-of-disabled-checks
Open

Fix install requirements of disabled checks#4872
jakubskunda wants to merge 1 commit into
teemtee:mainfrom
jakubskunda:fix-install-requirements-of-disabled-checks

Conversation

@jakubskunda
Copy link
Copy Markdown

@jakubskunda jakubskunda commented May 7, 2026

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.

Fixes #4860

Pull Request Checklist

  • implement the feature
  • add test case

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

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

@happz happz added area | check Test check implementation ci | full test Pull request is ready for the full test execution labels May 7, 2026
@happz
Copy link
Copy Markdown
Contributor

happz commented May 7, 2026

A test case would be nice.

@happz happz added this to planning May 7, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning May 7, 2026
@happz happz moved this from backlog to implement in planning May 7, 2026
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
@jakubskunda jakubskunda force-pushed the fix-install-requirements-of-disabled-checks branch from 8ae8179 to 5c0aa98 Compare May 13, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area | check Test check implementation ci | full test Pull request is ready for the full test execution

Projects

Status: implement

Development

Successfully merging this pull request may close these issues.

tmt attempts to install essential requirements of disabled checks

3 participants