-
Notifications
You must be signed in to change notification settings - Fork 165
Do not fetch disabled remote plans in tmt run
#4749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -62,6 +62,16 @@ | |||||
| name: /plans/provision/connect | ||||||
| enabled: true | ||||||
|
|
||||||
| /disabled-by-adjust: | ||||||
| summary: Local plan disabled by adjust should not import remote plan | ||||||
| plan: | ||||||
| import: | ||||||
| url: https://github.com/teemtee/tmt | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about using here an inaccessible repository? For example:
Suggested change
In this way we would clearly/simply verify that an unexpected |
||||||
| name: /plans/provision/connect | ||||||
| adjust: | ||||||
| enabled: false | ||||||
| when: distro == fedora-rawhide | ||||||
|
|
||||||
| /disabled: | ||||||
| summary: Imported plan will be disabled by local plan | ||||||
| plan: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2626,6 +2626,13 @@ def plans( | |||||
| plans = [] | ||||||
| for plan in unresolved_plans: | ||||||
| try: | ||||||
| # Do not resolve disabled plans during `tmt run` | ||||||
| if run is not None and not plan.enabled: | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems that in order to fix the
Suggested change
If the fix would be as simple as this (or similar complexity), I'd suggest to fix both use cases in this pull request. |
||||||
| plan.debug( | ||||||
| f"Plan {plan.name} is not enabled, skipping imports resolution", | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| level=3, | ||||||
| ) | ||||||
| continue | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. |
||||||
| plans += plan.resolve_imports() | ||||||
| except Exception as error: | ||||||
| if self.import_before_name_filter: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run these with
-ddand checkrlAssertNotGrep "Run command: git clone"(we will improve it when switching to pytest). And also the debug message you just added.Currently when no plans are enabled the output is
No plans found.let's also check for that one.