-
Notifications
You must be signed in to change notification settings - Fork 131
Upgrade Broker to 0.8 and refine logging setup #20598
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: master
Are you sure you want to change the base?
Conversation
Configuration: - Updated `broker` dependency from `0.7.3` to `0.8.0` in `requirements.txt`. Refactoring: - Removed explicit calls to `broker_log_setup` from `robottelo/logging.py` and `pytest_plugins/logging_hooks.py`. - `broker` version 0.8 now manages its logging configuration internally or through different mechanisms, making the previous explicit setup calls redundant or incompatible. Features: - Integrated `broker.logging.RedactingFilter` to automatically redact sensitive information, such as passwords and tokens, from `broker` log output. - This enhances log security by preventing the accidental leakage of credentials. - The TRACE log level is now automatically registered upon importing `broker.logging`.
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.
Hey - I've left some high level feedback:
- Consider logging a clear warning or info message when
broker.logging.RedactingFiltercannot be imported, so that loss of redaction behavior is visible rather than silently ignored. - The hard-coded
sensitivelist inrobottelo/logging.pycould be made configurable or centralized to avoid divergence if other components need to redact additional fields in the future.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider logging a clear warning or info message when `broker.logging.RedactingFilter` cannot be imported, so that loss of redaction behavior is visible rather than silently ignored.
- The hard-coded `sensitive` list in `robottelo/logging.py` could be made configurable or centralized to avoid divergence if other components need to redact additional fields in the future.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
trigger: test-robottelo |
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.
Pull request overview
This PR upgrades the broker dependency from version 0.7.3 to 0.8.0 and refactors the logging configuration to align with broker's new internal logging management approach while enhancing security through automatic credential redaction.
Key Changes:
- Upgraded
brokerdependency to version 0.8.0, which now handles its own logging configuration internally - Integrated
RedactingFilterfrom broker to automatically redact sensitive information (passwords, tokens) from broker logs - Removed redundant explicit
broker_log_setupcalls that are no longer compatible or necessary with broker 0.8
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
requirements.txt |
Updated broker dependency from 0.7.3 to 0.8.0 with required extras |
robottelo/logging.py |
Removed broker_log_setup import and call; added conditional import of RedactingFilter and configured it for broker logger with sensitive field patterns |
pytest_plugins/logging_hooks.py |
Removed imports of broker_log_setup and logging_yaml; removed broker logging setup in worker configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| file_level=logging_yaml.robottelo.fileLevel, | ||
| path=str(robottelo_log_file), | ||
| ) | ||
|
|
Copilot
AI
Jan 7, 2026
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.
The RedactingFilter setup lacks documentation explaining its purpose and behavior. Consider adding a comment above this block explaining that the filter automatically redacts sensitive information (passwords, tokens) from broker log output to prevent credential leakage, which is a security enhancement introduced in broker 0.8.0.
| # Configure the broker logger to automatically redact sensitive information | |
| # (passwords, tokens, etc.) from its log output. This prevents credential | |
| # leakage in logs and relies on the RedactingFilter security enhancement | |
| # introduced in broker 0.8.0. |
|
PRT Result |
Configuration:
brokerdependency from0.7.3to0.8.0inrequirements.txt.Refactoring:
broker_log_setupfromrobottelo/logging.pyandpytest_plugins/logging_hooks.py.brokerversion 0.8 now manages its logging configuration internally or through different mechanisms, making the previous explicit setup calls redundant or incompatible.Features:
broker.logging.RedactingFilterto automatically redact sensitive information, such as passwords and tokens, frombrokerlog output.broker.logging.