Skip to content
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

Device Management Notification message support #2758

Merged

Conversation

Coduz
Copy link
Contributor

@Coduz Coduz commented Nov 6, 2019

This PR introduces the support for devices to provide messages with the notifications sent when performing a Device Package Management operations.
All the messages sent are then collected at the end of the execution to build a simple log file which is bound to the Device Management Operation.
This allows easy debug of situation where the device does not work as expected.

Related Issue
None

Description of the solution adopted
Added new fields and mappings to store the Device Management Notification messages sent from the device.
After the device sends a Device Management Notification with status COMPLETED or FAILED all notifications are fetched and their messages are put as a log into the Device Management Operation sorted by SentOn, and then the Device Management Notifications are deleted.
From the UI there is a new button that shows the log (see screenshot below).

Screenshots
Screen Shot 2019-11-05 at 5 12 49 PM

Any side note on the changes made
Small improvements on class involved in the changes

@Coduz Coduz added the Enhancement This PR/Issue improves an part of Kapua label Nov 6, 2019
@Coduz Coduz requested a review from lorthirk November 6, 2019 08:45
@Coduz Coduz force-pushed the feature-deployNotificationMessageSupport branch from bccb850 to 8492a7d Compare November 7, 2019 09:16
@codecov
Copy link

codecov bot commented Nov 7, 2019

Codecov Report

Merging #2758 into develop will decrease coverage by 4.13%.
The diff coverage is 77.96%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2758      +/-   ##
=============================================
- Coverage      57.44%   53.31%   -4.14%     
+ Complexity      3444     3146     -298     
=============================================
  Files           1073     1073              
  Lines          30369    30640     +271     
  Branches        2414     2452      +38     
=============================================
- Hits           17446    16336    -1110     
- Misses         11745    13166    +1421     
+ Partials        1178     1138      -40
Impacted Files Coverage Δ Complexity Δ
.../registry/operation/DeviceManagementOperation.java 0% <ø> (ø) 0 <0> (ø) ⬇️
.../notification/ManagementOperationNotification.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...n/internal/ManagementOperationNotificationDAO.java 73.33% <100%> (+1.9%) 3 <0> (ø) ⬇️
...s/message/notification/KapuaNotifyPayloadImpl.java 100% <100%> (ø) 0 <0> (ø) ⬇️
...ator/kura/kapua/TranslatorLifeNotifyKuraKapua.java 88.88% <100%> (+0.2%) 9 <0> (ø) ⬇️
...ssage/kura/app/notification/KuraNotifyMetrics.java 100% <100%> (ø) 3 <0> (ø) ⬇️
...al/ManagementOperationNotificationCreatorImpl.java 100% <100%> (ø) 13 <2> (+2) ⬆️
.../DeviceManagementNotificationMessageProcessor.java 68.29% <100%> (+0.79%) 0 <0> (ø) ⬇️
...ssage/kura/app/notification/KuraNotifyPayload.java 75% <57.14%> (-11.37%) 12 <1> (+1)
...ration/internal/DeviceManagementOperationImpl.java 68.62% <66.66%> (-0.13%) 21 <1> (+1)
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59fad2f...06df7e6. Read the comment docs.

Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
@Coduz Coduz force-pushed the feature-deployNotificationMessageSupport branch from 8492a7d to 06df7e6 Compare November 13, 2019 09:30
@Coduz Coduz merged commit d826f1c into eclipse-kapua:develop Nov 13, 2019
@Coduz Coduz deleted the feature-deployNotificationMessageSupport branch November 13, 2019 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This PR/Issue improves an part of Kapua
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant