Skip to content
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

Accept and apply workdir-root cli option in testcloud plugin #2838

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

skycastlelily
Copy link
Collaborator

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • update the specification
  • adjust plugin docstring
  • modify the json schema
  • mention the version
  • include a release note

@@ -611,9 +619,11 @@ def prepare_config(self) -> None:
self.config.DOWNLOAD_PROGRESS = self.debug_level > 2
self.config.DOWNLOAD_PROGRESS_VERBOSE = False

testcloud_data = get_workdir_root(self.opt('workdir-root'))
Copy link
Collaborator

Choose a reason for hiding this comment

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

testcloud plugin does not have workdir-root option, and it should not really have one, or even care about one. At this point of time, the workdir root has been already established by tmt, and used to spawn self.workdir, for example. Instead of guessing what the right value is - with all the involved inputs - we should try to access this single source of truth. We can save the workdir root besides the self.workdir attribute, or we can take self.workdir and use .parent as needed.

And as a concept shared by all plugins, and actually steps and plans as well, there should be one implementation, plugin-agnostic. Putting it into a single plugin does not seem correct to me. Seems more like a property or attribute of tmt.utils.Common, for all classes to use when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants