-
Notifications
You must be signed in to change notification settings - Fork 55
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
refactor: Refactor health status code #2919
refactor: Refactor health status code #2919
Conversation
Robot Results
|
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.
This PR is a nice step forward, grouping all health-check related logic in one place . However, some constants have still to be made private, in order to avoid inappropriate uses.
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.
I'm happy with the changes asides from the aforementioned pub const
issues
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
mqtt_schema: &MqttSchema, | ||
bridge_service_topic: &Topic, | ||
) -> Result<Self, HealthTopicError> { | ||
if let Ok((topic_id, Channel::Health)) = mqtt_schema.entity_channel_of(&message.topic) { |
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.
Unrelated to this PR, but this highlights an issue I got several time: this method uses a specific mqtt_schema
only to parse a topic. The MQTT root prefix doesn't really matter and it would be more convenient to have a parse
method returning all the component of a topic is set (i.e. not only the topic_id and channel but also the root prefix).
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.
This PR is a nice step forward, grouping all health-check related logic in one place .
b30236a
to
4914cff
Compare
Proposed changes
Refactor health status refactoring code, including addressing review comments from #2903
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments