fix: clear retained entity twin messages on deregister#3499
Conversation
Robot Results
|
d8f2118 to
a51180d
Compare
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
| if let Channel::EntityTwinData { fragment_key } = channel { | ||
| let fragment_value = serde_json::from_slice(message.payload_bytes())?; | ||
| let twin_message = EntityTwinMessage::new(topic_id, fragment_key, fragment_value); | ||
| self.entity_store.update_twin_fragment(twin_message)?; | ||
| } |
There was a problem hiding this comment.
I'm surprised by this bit. This is unrelated to the goal of this PR (clearing retained twin data messages on delete). And wasn't twin data already processed by the agent?
There was a problem hiding this comment.
Yes, I was surprised by that too. This bit got missed during the entity store migration. Writing the test for the bug highlighted this gap. This was never spotted because the entity cache of the mapper was still processing it properly. The twin_data maintained by the agent was somewhat unused so far, until now.
reubenmiller
left a comment
There was a problem hiding this comment.
Approved. Nice addition of the retained keyword for RobotFramework system tests.
cd477e6 to
bc0d8be
Compare
bc0d8be to
46bec66
Compare
Proposed changes
Clear retained twin data messages on entity deregister.
Types of changes
Paste Link to the issue
#3492
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments