-
Notifications
You must be signed in to change notification settings - Fork 56
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
C8y mapping of entity registration messages #2266
Conversation
Robot Results
|
f73f4a2
to
65550c9
Compare
@albinsuresh I've been trying out the new settings and things mostly work without the below minor exceptions:
|
Codecov Report
Additional details and impacted files
|
Stuck with
Fixed by appending the the main device's |
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.
The duplications with the EntityStore
must be resolved.
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.
No issues with the code, just requesting some additional comments
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.
The main comments from my previous review have been addressed. I still have some comments - notably about the entity_store.update()
method.
594c162
to
f977d21
Compare
tests/RobotFramework/tests/cumulocity/registration/device_registration.robot
Outdated
Show resolved
Hide resolved
Signed-off-by: Didier Wenzek <didier.wenzek@free.fr>
b3af707
to
f6ccc38
Compare
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.
One needs to check what are the impacts of using the new external ids on the c8y topics.
format!("101,{child_id},{child_id},thin-edge.io-child"), | ||
); | ||
self.mqtt_publisher.send(message).await?; | ||
let child_topic_id = EntityTopicId::default_child_device(&child_id).unwrap(); |
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 is the drawback of using short child device names in path: one has to assume a default topic scheme.
Ideally, I would use the same hierarchy for paths as for MQTT. i.e. with a device
directory and there a sub directory per child plus a main
directory. Or an a/b/c/d
tree if the user prefer its own schema.
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 is the drawback of using short child device names in path: one has to assume a default topic scheme.
Since we're doing this for a legacy mechanism which assumed such things, isn't safe to make the assumptions here as well for the sake of consistency?
Ideally, I would use the same hierarchy for paths as for MQTT. i.e. with a device directory and there a sub directory per child plus a main directory. Or an a/b/c/d tree if the user prefer its own schema.
Yeah, we could do that if we are going to continue supporting this file system based entity creation mechanism for much longer. But, my understanding was that it's not gonna be around for much longer and hence there's no point in extending that further by supporting hierarchical nested child devices and all. So, if we really want to extend this API, we could do that in a follow-up PR.
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.
we could do that in a follow-up PR
Sure. The scope of this PR is already unexpectedly growing. We need to focus on what is definitely wrong. We will later address this kind of inconsistencies.
Follow-up tasks:
|
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.
Approved. Thank you!
Proposed changes
Cumulocity mapping for:
Deferred for later:
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments