[deployments] add total transferred data volume to deployment statistics

Description

In order to allow informing about the data volume consumption of a deployment, while supporting large device counts, the deployment statistics endpoint (`/api/management/v1/deployments/deployments/<deploymentId>/statistics`) should be extended to also include the amount of data that was used to deploy to the devices in the deployment.
In order to do this, the requested artifact per deployment device will have to be tracked - just like the deployment device status and based on this artifact, the total used volume can be aggregated as part of the statistics.
It might be useful to separate the information in the response object, but as long as the attribute for the aggregated data volume is unique that can be up to the implementation.

Affects versions

None

Environment

None

has to be finished together with

Checklist

Activity

Show:

Krzysztof JaśkiewiczFebruary 19, 2023 at 9:37 AM

Krzysztof JaśkiewiczFebruary 16, 2023 at 8:30 AM

Manuel ZedelJanuary 31, 2023 at 2:56 PM

yes  that would be very helpful!

just in case it's easier to put it there: in the UI we POST to /api/management/v1/deployments/deployments/statistics/list with a body of: {{{ deployment_ids: }}[listOfDeploymentIds] }

but having the stats alongside the deployment object would be even better (+ in some cases the UI has to rely on them as the cached deployment state has not yet updated) 

Krzysztof JaśkiewiczJanuary 30, 2023 at 7:51 PM

/api/management/v1/deployments/deployments/<deploymentId>/statistics endpoint doesn't look like easily extendable...

I guess we always ask for both, main deployment object (using /deployments/{id}) and statistics.

If that's the case, maybe we should include stats in the main deployment object?

 would that be helpful, or we use mentioned endpoints separately?

Krzysztof JaśkiewiczNovember 26, 2020 at 6:59 PM

If I understand correctly, this task is about tracking and presenting the total size of artifacts selected for all devices within a given deployment. The presentation part should be easy, but the tracking part looks more complex. We could do aggregation, but this is a heavy query and it looks like we'll need this data rather often, so it would be better to cache it in the deployment object (like we do with the deployment status).

Having all of this in mind the task looks like 8-13 SP. 

Fixed

Details

Assignee

Reporter

Story Points

Priority

Days in progress

9

Sprint

Backlog

yes

Zendesk Support

Checklist

Created September 29, 2020 at 2:24 PM
Updated February 19, 2023 at 9:37 AM
Resolved February 19, 2023 at 9:37 AM