refactor: Refactor health status code#2919
Conversation
Robot Results
|
didier-wenzek
left a comment
There was a problem hiding this comment.
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.
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.
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).
didier-wenzek
left a comment
There was a problem hiding this comment.
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 fmtas mentioned in CODING_GUIDELINEScargo clippyas mentioned in CODING_GUIDELINESFurther comments