Skip to content

Conversation

@JacobCallahan
Copy link
Member

Features:

  • Beaker provider help:
    • Display individual job XML with syntax highlighting using rich.syntax.Syntax.
    • Format lists of available jobs into rich tables.
  • Container provider help:
    • Present detailed image information in rich tables.
    • Display image configuration as syntax-highlighted YAML.
    • Convert lists of available host and app images into rich tables.
    • Add support for the container_app parameter to retrieve details for a specific container application.
  • Foreman provider help:
    • Render lists of hostgroups and individual hostgroup details in rich tables.

Refactoring:

  • Replaced direct logging.info calls for user-facing output in provider_help methods with rich.console.Console for improved presentation.
  • Removed the results_limit parameter, as rich tables manage display and filtering more effectively.

Configuration:

  • Integrated _settings.less_colors to control color output in the rich console, allowing users to disable colors.

@JacobCallahan JacobCallahan self-assigned this Dec 6, 2025
Copilot AI review requested due to automatic review settings December 6, 2025 15:37
@JacobCallahan JacobCallahan added enhancement New feature or request 0.8 Issues/PRs going into the 0.8.0 release labels Dec 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the provider help output by integrating Rich library formatting across three providers (Beaker, Container, and Foreman). The changes replace simple logging-based output with formatted tables and syntax-highlighted displays, improving readability and user experience.

Key Changes

  • Replaced logging.info() calls with Rich Console for formatted, colored output in provider help methods
  • Added syntax highlighting for XML (Beaker job definitions) and YAML (container configurations) using rich.syntax.Syntax
  • Converted list outputs to Rich tables using helper functions (dictlist_to_table, dict_to_table)
  • Removed the results_limit parameter across providers in favor of Rich tables managing display

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
broker/providers/foreman.py Updated hostgroups and hostgroup display to use Rich tables with error handling for empty results
broker/providers/container.py Enhanced image info display with tables and syntax-highlighted YAML configs; added container_app parameter support
broker/providers/beaker.py Converted job listings to Rich tables and added XML syntax highlighting for individual job displays

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Features:
- Beaker provider help:
  - Display individual job XML with syntax highlighting using `rich.syntax.Syntax`.
  - Format lists of available jobs into `rich` tables.
- Container provider help:
  - Present detailed image information in `rich` tables.
  - Display image configuration as syntax-highlighted YAML.
  - Convert lists of available host and app images into `rich` tables.
  - Add support for the `container_app` parameter to retrieve details for a specific container application.
- Foreman provider help:
  - Render lists of hostgroups and individual hostgroup details in `rich` tables.

Refactoring:
- Replaced direct `logging.info` calls for user-facing output in `provider_help` methods with `rich.console.Console` for improved presentation.
- Removed the `results_limit` parameter, as `rich` tables manage display and filtering more effectively.

Configuration:
- Integrated `_settings.less_colors` to control color output in the `rich` console, allowing users to disable colors.
@JacobCallahan
Copy link
Member Author

@dosas @knoppi this modifies the output of broker providers Beaker commands. Can you try it out and let me know if the output needs to be improved?

@knoppi
Copy link
Contributor

knoppi commented Dec 8, 2025

@JacobCallahan - I just had a try. Looks nice, it works and it contains the same information as before. Thank you!

@JacobCallahan
Copy link
Member Author

@knoppi thanks for testing! This is aligned to 0.8, which I'm hoping to release late this month. Also, this outputs to stdout do you can do what you will with that.

@JacobCallahan JacobCallahan merged commit e383320 into SatelliteQE:0.8 Dec 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.8 Issues/PRs going into the 0.8.0 release enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants