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

Implement --dry for mrack plugin #3460

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Implement --dry for mrack plugin #3460

wants to merge 2 commits into from

Conversation

skycastlelily
Copy link
Collaborator

@skycastlelily skycastlelily commented Jan 10, 2025

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

@skycastlelily skycastlelily added the ci | full test Pull request is ready for the full test execution label Jan 13, 2025
@skycastlelily skycastlelily added this to the 1.42 milestone Jan 13, 2025
mrack_requirement = self.api._mrack_transformer.create_host_requirement(data)
if self.is_dry_run:
job = self.api._mrack_provider._req_to_bkr_job(mrack_requirement)
self.info(f"beaker job xml: '{job.toxml()}'")
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about using self.print() here to print the job xml to stdout (not the introduction comment line) so that it can be easily consumed/parsed? Also, what about using pretty print (with indented content) to make it more human readable for users to review?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That would make the XML output of tmt run provision -h beaker. Is it a debugging aid, or are we going to make a deliberate decision that this shall be (the only?) output of tmt run --dry-run? Just making sure it's a known effect :)

+1 for pretty-print, we absolutely want that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it a debugging aid, or are we going to make a deliberate decision that this shall be (the only?) output of tmt run --dry-run

I guess this is a deliberate decision that this shall be the output of tmt run --dry-run:)

Updated with self.print and pretty-print^^ : 6c540fa

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.

3 participants