* DDI API: Limit number of feedback messages for an action status.
Even though the number of ActionStatus entries are limited to 1000 per
action using QuotaManagement, there is no limit on the number of
messages that can be sent as part of a single ActionStatus. This allows
a controller to potentially send large number of messages for a single
action.
Limiting the number of allowed messages to 50 using the
javax.validation.constraints.Size within DdiStatus.
Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>
* DDI API: Extend API response to retrieve controller feedback. (#381)
Resolves#381
The mechanism is useful for example, when the client software running on
the device loses this information prior to reporting a final execution
status such as 'closed' to hawkBit. This may happen, e.g., due to a
power cycle or simply a crash. Upon the client software restarting, it
installs the same payload again as advertised by hawkBit (as the device
has not sent a final update execution status). Instead, if the last
feedback sent to hawkBit would be reported back to the device, the
client may resume installation.
Feedback messages sent as part of POST
/{tenant}/controller/v1/{targetid}/deploymentBase/{actionId}/feedback,
are sent back to controller as part of response to GET
/{tenant}/controller/v1/{targetid}/deploymentBase/{actionId}.
Following example illustrates the API changes:
1. After retrieving the action from server, controller starts download
and sends a feedback.
curl
'http://127.0.0.1:8080/default/controller/v1/1/deploymentBase/1/feedback'
-i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept:
application/hal+json' -d '{
"id" : "1",
"time" : "20170406T121500",
"status" : {
"result" : {
"progress" : {
"of" : 1,
"cnt" : 0
},
"finished" : "none"
},
"execution" : "proceeding",
"details" : [ "proceeding with download" ]
}
}'
2. Once artifact download has finished, controller sends another
feedback.
curl
'http://127.0.0.1:8080/default/controller/v1/1/deploymentBase/1/feedback'
-i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept:
application/hal+json' -d '{
{
"id" : "1",
"time" : "20170406T123000",
"status" : {
"result" : {
"progress" : {
"of" : 1,
"cnt" : 0
},
"finished" : "none"
},
"execution" : "proceeding",
"details" : [ "downloaded artifacts for update" ]
}
}'
3. If there is a power outage now, the controller can retrieve the
messages posted earlier from the action history when it restarts again.
curl
'http://127.0.0.1:8080/default/controller/v1/1/deploymentBase/1?c=411599879&actionHistory=-1'
-i -H 'Accept: application/hal+json'
Response will be like below
{
"id": "1",
"deployment": {
"download": "forced",
"update": "forced",
"chunks": [
{
"part": "os",
"version": "1",
"name": "1",
"artifacts": [....],
}
],
},
"actionHistory": {
"status": "RETRIEVED",
"messages": [
"downloaded artifacts for update",
"proceeding with download"
]
}
}
4. Based on the feedback messages, controller may be able to skip the
download and resume with installation and send additional feedback.
curl
'http://127.0.0.1:8080/default/controller/v1/1/deploymentBase/1/feedback'
-i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept:
application/hal+json' -d '{
"id" : "1",
"time" : "20170406T121314",
"status" : {
"result" : {
"progress" : {
"of" : 1,
"cnt" : 0
},
"finished" : "none"
},
"execution" : "resumed",
"details" : [ "resuming installation based on previous feedback,
download skipped" ]
}
}'
Note: The maximum number of messages to be retrieved from the database
by a controller is limited to 100. The actionHistory parameter's value
has the following meaning:
Input Value | Output
-----------------------------
<0 | Retrieve maximum allowed number of messages from
| action history.
unspecified or =0 | Do not retrieve any message (default).
>0 | Retrieve specified number of messages, limited by
| maximum allowed number.
Signed-off-by: Christian Storm <christian.storm@siemens.com>
Signed-off-by: Himanshu Kumar Singh <himanshu.singh@siemens.com>
Signed-off-by: Raju HS <raju.hs@siemens.com>
* Add findActionStatusByAction to controller management to allow device
facing APIs to access this under controller authentication
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
* Use repository directly.
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
* - Move TargetIdName, DistributionSetIdName, SoftwareModuleIdName to ui
entity package
- Refactor tables. Use the entity id instead of the *idname entity
- Remove expensive getEntity() calls from remote events
- Fix some NPE, if entity is deleted from another session
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Add TagretFilter Query client resource
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Fix methode signature for feign
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* fix sonar issue after merge
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* remove ds set id name after merging from rollout view
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Rollout creation UI with groups definition
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Improved code quality
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Added a legend to the Rollouts Creation UI's PieChart
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Updated color palette for pie chart. Using RolloutGroupCreate for validation. Displaying pie chart for group editing.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Optimized ComboBoxBuilder
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Removed not necessary RPC interfaces.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Fix Rollout verification count query. Improved UI style. Added dependency management for d3.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Auto start and scheduled start of Rollouts
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Optimized RSQL Utility to avoid multiple joins on the same table.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Fixed RSQL Utility to avoid multiple joins on the same table to only work with OR nodes. Optimized validation queries for rollout group creation.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Asynchronous handling of groups validation in the create rollouts UI.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Added loading indicator to create rollout UI.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Avoid parallel validation for a user session.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Fix issues after merge of master into branch.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Improve code quality
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Refreshing the total target count after validation on the rollouts creation UI.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Remove unused RolloutUpdate method. Optimization of the RolloutHelper.
Comments for RolloutGroupsValidation and RSQLUtility with explanation.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Add notfication overview for remote events
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Refactor css for notification button
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Remove todo
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* - Style notfication button (css)
- Add i18n message keys
- Add switch slider for auto refresh event
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Insert Label in MenuItem for displaying occurred events
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
* - Style notfication button (css)
- Add i18n message keys
- Add switch slider for auto refresh event
- Insert Label in MenuItem for displaying occurred events
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Solve merge conflicts and add menu item counter
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* CSS refactor
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
* Adapt JUnit test for events, because constructor is changed
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Skip delete event
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* - Insert Id for notification menu
- Enable push mechanism for target and ds tag and add notfications
- Fix several typos
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Add update ui events for tags and add different id's for menue item
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Insert push for SoftwareModule
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
* Set button enablement
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Add Software module update push event
Add unit test software module push events
Adapt test for software push event
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Close window and set pop id
Update the target table to set the new icon
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* - several code improvements
- Correct license header
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
* Update vaadin version
Rename the base entity and redefine constructors
unread counter was not correct
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Closebox of notificationButton is invisible:
Insert height for HorizontalLayout of NotificationUnreadButton
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
* Add software modules to the new event types
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Introduce animation in unreadNotificationButton
Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
* Fix close on safari
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
* Add publish events direct to the tag entities.
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
* Cleaned up component scan
* More flexibility for hawkBit micro services
* Introduce spring boot starters
* Eclipse Jetty as hawkBit default
* Fixed links as prep for wiki removal
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
* Rollout Mgmt API accepts now extended Group definition. Filling Reollout Groups with Targets is now a scheduled task.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Fire RolloutGroupCreated event and fix db migration.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Fill groups now excludes targets in own group
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Starting of Rollouts as scheduled task
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Finished implementation of new Rollout starting proccess
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Reset last check on status change and fixed unused imports
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Code quality improvements
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>
* Reworked start of scheduled Actions. Improved code quality.
Signed-off-by: Dominik Herbst <dominik.herbst@bosch-si.com>