Add description field to healthcheck results - #377
Open
rjeffman wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
Result.__init__, an explicitdescriptionargument is only used whensource/checkare provided, and is ignored when apluginis passed; consider either allowing the explicit value to overrideplugin.descriptionor clearly documenting this behavior to avoid surprising callers.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `Result.__init__`, an explicit `description` argument is only used when `source`/`check` are provided, and is ignored when a `plugin` is passed; consider either allowing the explicit value to override `plugin.description` or clearly documenting this behavior to avoid surprising callers.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
rjeffman
marked this pull request as draft
April 1, 2026 14:06
Add a description class attribute to Plugin that flows through to Result and appears in JSON output when set. This makes healthcheck results self-documenting by including human-readable descriptions of what each check does. The description field is optional and only included in JSON output when not None, maintaining backward compatibility with existing consumers. Added descriptions to 54 checks documented in README.md across dogtag, ipa, meta, and system modules. Checks without descriptions in the README inherit None and omit the field from output. Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
Add comprehensive tests covering all description field use cases: - Result with plugin that has description set - Result with plugin without description (backward compatibility) - Result with explicit description parameter - json_to_results() with description in input data - json_to_results() without description (backward compatibility) Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
rjeffman
force-pushed
the
source_description
branch
from
April 1, 2026 14:12
2c6c270 to
597fde4
Compare
rjeffman
marked this pull request as ready for review
April 1, 2026 14:14
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- For the service checks in
meta/services.py, all thedescriptionvalues follow the same pattern ("Checks if the X service is running"); consider deriving the description fromservice_namein a shared base/helper to avoid repetition and reduce the chance of these drifting out of sync. - In
Results.output(), the description field is only omitted when it isNone; if empty strings or whitespace-only descriptions should also be treated as "unset" for output/backward-compatibility, consider normalizing or adjusting the condition to check for truthiness instead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- For the service checks in `meta/services.py`, all the `description` values follow the same pattern ("Checks if the X service is running"); consider deriving the description from `service_name` in a shared base/helper to avoid repetition and reduce the chance of these drifting out of sync.
- In `Results.output()`, the description field is only omitted when it is `None`; if empty strings or whitespace-only descriptions should also be treated as "unset" for output/backward-compatibility, consider normalizing or adjusting the condition to check for truthiness instead.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a description class attribute to Plugin that flows through to Result and appears in JSON output when set. This makes healthcheck results self-documenting by including human-readable descriptions of what each check does.
The description field is optional and only included in JSON output when not None, maintaining backward compatibility with existing consumers.
Added descriptions to 54 checks documented in README.md across dogtag, ipa, meta, and system modules. Checks without descriptions in the README inherit None and omit the field from output.
Assisted-by: Claude Sonnet 4.5 noreply@anthropic.com
Summary by Sourcery
Add an optional human-readable description field to health check results and populate it across key plugins for more self-describing output.
New Features:
Enhancements:
Tests: