-
Notifications
You must be signed in to change notification settings - Fork 161
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 job deploy v2 improvements #2524
Conversation
7f5cefe
to
52bfc37
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2524 +/- ##
=============================================
+ Coverage 50.23% 55.93% +5.69%
+ Complexity 2453 1502 -951
=============================================
Files 958 1073 +115
Lines 27553 25955 -1598
Branches 2261 2332 +71
=============================================
+ Hits 13842 14517 +675
+ Misses 12732 10450 -2282
- Partials 979 988 +9
Continue to review full report at Codecov.
|
0f676a4
to
9bb3577
Compare
a68f2f3
to
3072e7a
Compare
3072e7a
to
0fd1b50
Compare
868337f
to
456ee08
Compare
456ee08
to
cab89ee
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.
After reviewing the work in this PR a possible improvement emerged. It is described here below.
When a long running operation is executed, there is a limited possibility that some unsolicited messages sent by the device in order to notify the progress are delivered before the operation execution returns.
As a consequence, if the operation was invoked by a device job, the notification handler is not able to address the correct job in order to update its status and trigger execution of the next job steps.
This is currently solved in the job business logic by passing a unique id as a parameter for
the operation execution. While this works it exposes the client code to more complexity
that is related to implementation details.
Instead of passing the id in, the job should wait until the execution of the operation returns passing back the id of the operation registry to the job. Possible notifications received from the device while the operation execution was in progress, are already logged and persisted in the operation-registry-notification table so they can be used by the job to recover the "missed" notifications.
After the operation execution returns, the job should use the id of the operation registry to retrieve the notifications already collected from the operation-registry-notification table and use them to update the job: update the progress and trigger execution of the next job steps (e.g. enqueuing job executions).
cab89ee
to
3c6c0bd
Compare
3c6c0bd
to
60ba14c
Compare
…installTargetProcessor Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…Package job step Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
…e' module Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
Signed-off-by: coduz <alberto.codutti@eurotech.com>
60ba14c
to
8180351
Compare
Signed-off-by: coduz <alberto.codutti@eurotech.com>
This PR introduces a bunch of improvements for the Job Engine to work properly with async package management service.
Related Issue
None
Description of the solution adopted
Now the NotificationMessage listener checks also for job to be restarted for a target that has completed the Package install
Screenshots
None
Any side note on the changes made
Javadoc and small code improvements applied.