Skip to content

a tangible use case to detect circular dependency in package managers#4779

Closed
AthreyVinay wants to merge 1 commit intomainfrom
avinay-detect-circular-imports-pm
Closed

a tangible use case to detect circular dependency in package managers#4779
AthreyVinay wants to merge 1 commit intomainfrom
avinay-detect-circular-imports-pm

Conversation

@AthreyVinay
Copy link
Copy Markdown
Member

investigating #4746

@AthreyVinay AthreyVinay added the ci | full test Pull request is ready for the full test execution label Apr 3, 2026
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 moves the import of Dnf5 to the top level of tmt/package_managers/rpm_ostree.py. Please revert this change and keep the import local to the enable_copr method to prevent circular dependencies during plugin discovery.

escape_installables,
provides_package_manager,
)
from tmt.package_managers.dnf import Dnf5
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

Remove this top-level import. It introduces a circular dependency between tmt.package_managers.rpm_ostree and tmt.package_managers.dnf during plugin discovery, as both modules are part of the same namespace and use the plugin registry. The import should remain local to the enable_copr method to avoid initialization issues.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thats the whole point of this - test if this works or not :D

@AthreyVinay
Copy link
Copy Markdown
Member Author

Closing as this does not seem to be an issue.

@AthreyVinay AthreyVinay closed this Apr 7, 2026
@AthreyVinay AthreyVinay deleted the avinay-detect-circular-imports-pm branch April 7, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant