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

Quota for ActionStatus push to be checked only for intermediate statu… #1846

Merged

Conversation

vasilchev
Copy link
Contributor

…ses. Always allow terminate/final status

@hawkbit-bot
Copy link

Can one of the admins verify this patch?

@avgustinmm
Copy link
Contributor

I'm not sure if it is a good idea. This way device could bypass limit and create unlimited statuses.
Anyway, if the device has reached the limit, something shall be done to clean up the action statuses.
If we allow action to be closed - what next? We next update will start and device again will be unable to report ..

@vasilchev
Copy link
Contributor Author

vasilchev commented Sep 20, 2024

I'm not sure if it is a good idea. This way device could bypass limit and create unlimited statuses. Anyway, if the device has reached the limit, something shall be done to clean up the action statuses. If we allow action to be closed - what next? We next update will start and device again will be unable to report ..

There is an initial check whenever status comes if action is still active (meaning no final status yet reported)

Once reported final status - no further statuses intermediate/final could be reported.

Behavior of device is indeed unpredictable, but we should accept final status so that action can be reported as completed, otherwise we miss the final status and action is in pending state until manual close (even though action has completed, we just reject the final status)

@avgustinmm
Copy link
Contributor

I'm not sure if it is a good idea. This way device could bypass limit and create unlimited statuses. Anyway, if the device has reached the limit, something shall be done to clean up the action statuses. If we allow action to be closed - what next? We next update will start and device again will be unable to report ..

There is an initial check whenever status comes if action is still active (meaning no final status yet reported)

Once reported final status - no further statuses intermediate/final could be reported.

Behavior of device is indeed unpredictable, but we should accept final status so that action can be reported as completed, otherwise we miss the final status and action is in pending state until manual close (even though action has completed, we just reject the final status)

yes, but this won't percent new action and device could user only final statuses. And if it use intermediate - next action will be broken and hang again. So, this won't fix the problem - device has too many action statuses - they shall be clean up

@vasilchev
Copy link
Contributor Author

I'm not sure if it is a good idea. This way device could bypass limit and create unlimited statuses. Anyway, if the device has reached the limit, something shall be done to clean up the action statuses. If we allow action to be closed - what next? We next update will start and device again will be unable to report ..

There is an initial check whenever status comes if action is still active (meaning no final status yet reported)
Once reported final status - no further statuses intermediate/final could be reported.
Behavior of device is indeed unpredictable, but we should accept final status so that action can be reported as completed, otherwise we miss the final status and action is in pending state until manual close (even though action has completed, we just reject the final status)

yes, but this won't percent new action and device could user only final statuses. And if it use intermediate - next action will be broken and hang again. So, this won't fix the problem - device has too many action statuses - they shall be clean up

not sure if i get the concern.

action status quota is per Action (action id).
Currently device can update given Action with statuses up to 1000. if final status is sent after the 1000th quota limit Action hangs and cannot be finished in rollouts. You can always create new Action (with again 1000 status limit).

once final status is reported to an action - action is being closed and cannot be updated anymore with any (intermediate/final)

given Action -> Action statuses could not interfere with other Actions and their statuses

@avgustinmm
Copy link
Contributor

aha, if the quota is per action - then should be ok, if you add a check that the action statuses won't become more than quota + 1 or if it is carefully checked than in all flows someone has already checks the action is active (as you said).
Otherwise, again the device could create too many statuses (finished).
Note: even if you have checked that all flows check that action is finished - it's good to add quote + 1 check because in future new flows could be added or existing flows could be changed

@avgustinmm avgustinmm merged commit 1edc957 into eclipse-hawkbit:master Sep 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants