fix: Capability message for firmware_update workflow#3146
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files📢 Thoughts on this report? Let us know! |
Robot Results
|
There was a problem hiding this comment.
I think we should just replace the existing system tests in this file: tests/RobotFramework/tests/cumulocity/firmware/firmware_operation.robot, as the old test file was created before thin-edge.io had official support for c8y_Firmware, and now the existing test add no value.
There was a problem hiding this comment.
Okay. I left it as-is since it's still testing the "C8Y operation overriding" mechanism with the c8y_Firmware operation definition file. If we don't really need that anymore, then yeah I can replace that with this one.
There was a problem hiding this comment.
Since we have workflows, we don't need the older operation declaration, especially for the c8y_Firmware operation as the official recommended extension point is to create a workflow.
e5be66b to
57cdbcb
Compare
| Set Suite Variable $DEVICE_SN | ||
| Device Should Exist ${DEVICE_SN} | ||
|
|
||
| Execute Command tedge config set c8y.enable.firmware_update true |
There was a problem hiding this comment.
Wondering why we've disabled this by default at the mapper level. Unless someone explicitly creates a C8Y operation file or defines a workflow, the supported operation won't be declared by the mapper. So, I'm not sure why we want to disable the whole mapping itself, by default. @rina23q do you remember why? Can we switch to back to true?
There was a problem hiding this comment.
I believe it was done to ensure we don't break systems which are using c8y-firmware-plugin...though we do need to think about a cleaner upgrade path (though correct me if I'm wrong here).
There was a problem hiding this comment.
I think first mapper implementation was done while agent side was not completed. That's why it was marked false as a temporary solution, however, it's forgotten to be true, even after firmware implementation in agent side was done...
|
|
||
| *** Test Cases *** | ||
| Send firmware update operation from Cumulocity IoT | ||
| Cumulocity.Should Contain Supported Operations c8y_Firmware |
There was a problem hiding this comment.
It might also be worthwhile to add a check for the local capability message as well, e.g. te/device/main///cmd/firmware_update, to ensure that the functionality on the main device is discoverable to other clients listening to the same MQTT broker.
57cdbcb to
bdaabc5
Compare
| Test Teardown Get Logs | ||
|
|
||
| Test Tags theme:c8y theme:firmware theme:plugins | ||
| Test Tags theme:tedge_agent |
There was a problem hiding this comment.
We can still have the c8y theme on this as we are also testing the c8y_Firmware cloud operation, and tedge-agent is not needed as we would have to add the tag to almost all the non-cloud features
| Test Tags theme:tedge_agent | |
| Test Tags theme:c8y theme:firmware |
| Library Cumulocity | ||
|
|
||
| Test Setup Custom Setup | ||
| Suite Setup Custom Setup |
There was a problem hiding this comment.
Why do we need to change to a Suite Setup, it would be better to leave it untouched as Test Suite is less prone to unexpected side effects from preceding test cases (in the same file).
| Suite Setup Custom Setup | |
| Test Setup Custom Setup |
| Resource ../../../resources/common.resource | ||
| Library Cumulocity | ||
| Library ThinEdgeIO | ||
| Library Cumulocity |
There was a problem hiding this comment.
Revert the Libary import sequence (not change is necessary)
Library Cumulocity
Library ThinEdgeIO
didier-wenzek
left a comment
There was a problem hiding this comment.
Approved (rust updates)
bdaabc5 to
d2c2cff
Compare
reubenmiller
left a comment
There was a problem hiding this comment.
Looks good (Tests and change of default firmware_update setting)
Proposed changes
Tedge-agent to publish empty capability message when a workflow is defined for
firmware_updateoperation.Types of changes
Paste Link to the issue
#3145
Checklist
cargo fmtas mentioned in CODING_GUIDELINEScargo clippyas mentioned in CODING_GUIDELINESFurther comments