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 thread tmt/steps/prepare/distgit.py
@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
@jakubskunda jakubskunda force-pushed the fix-install-requirements-of-disabled-checks branch from 8ae8179 to 5c0aa98 Compare May 13, 2026 13:41
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
@tcornell-bus tcornell-bus force-pushed the fix-install-requirements-of-disabled-checks branch from 5c0aa98 to 9b64a29 Compare May 20, 2026 12:12
shutil.rmtree(tmp)

assert result.exit_code == 0
assert '/usr/bin/dmesg' not in result.output
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.

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'
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.

I can't find this file. Did it get accidentally left out?

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

4 participants