fix: de-duplicate custom operations on c8y/devicecontrol/notifications#3744
Merged
jarhodes314 merged 1 commit intothin-edge:mainfrom Jul 29, 2025
Merged
Conversation
Signed-off-by: James Rhodes <jarhodes314@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Contributor
Robot Results
|
rina23q
approved these changes
Jul 28, 2025
Member
rina23q
left a comment
There was a problem hiding this comment.
I was trying to think of corner cases by removing the .is_empty() blocks, but nothing came to mind. So I'm fine with approving it.
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.
Proposed changes
Ensure
tedge-mapper-c8ydoesn't handle incoming custom operations if received multiple times from Cumulocity.The specific case this fixes is for custom operations from Cumulocity JSON fragements (e.g. on
c8y/devicecontrol/notifications) where these execute using acommandfrom the mapper. Since these don't use a workflow to execute, these operations didn't generate anyte/...messages, so we didn't track them inactive_commands. This PR changes this so that any operation with an ID is included inactive_commands, and it will be removed after a 12 hour timeout elapses.This won't fix any cases where we are using smartrest to receive the operation payload, since those messages do not have an ID included in the payload.
Types of changes
Paste Link to the issue
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments