-
Couldn't load subscription status.
- Fork 232
Small health check improvements #3021
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
Small health check improvements #3021
Conversation
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 fixes a typo in a debug log message and implements the getStatus() method for TimerEventSource to properly report health status instead of defaulting to UNKNOWN.
Key Changes:
- Corrected "for for" typo in InformerWrapper debug log
- Implemented
getStatus()method in TimerEventSource to return HEALTHY/UNHEALTHY based on running state - Refactored InformerWrappingEventSourceHealthIndicator to use more concise stream operation
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| TimerEventSource.java | Adds getStatus() method implementation to report HEALTHY when running, UNHEALTHY when stopped |
| TimerEventSourceTest.java | Adds assertions to verify status is HEALTHY/UNHEALTHY in appropriate test scenarios |
| InformerWrapper.java | Fixes typo "for for" → "for" and adjusts spacing in debug log message |
| InformerWrappingEventSourceHealthIndicator.java | Simplifies stream logic using anyMatch instead of filter/findAny |
| PollingEventSourceTest.java | Removes unnecessary throws declaration from test method |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Hi @Donnerbart I think this is reasonable to change it this way. Thank you! |
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.
LGTM
|
I did not checked yet, but this might be also interesting: |
Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
Signed-off-by: David Sondermann <david.sondermann@hivemq.com>
4247e2a to
4eec857
Compare
|
thank you @Donnerbart ! |
We're digging into a reported operator health issue right now, and I noticed the
for fortypo in the debug log.I also noticed a
RetryAndRescheduleTimerEventSourcewith statusUNKNOWNin the event source health indicators, caused byTimerEventSourcenot implementing thegetStatus()method. If that was intentional (since we don't know if the actual timer tasks have been executed successfully), I can drop that commit again.