eclipse / hawkbit

Eclipse hawkBit™
https://projects.eclipse.org/projects/iot.hawkbit
Eclipse Public License 2.0
445 stars 184 forks source link

Action is still in running state after it's denied #1667

Open UVV-gh opened 5 months ago

UVV-gh commented 5 months ago

Hey there, I'm using confirmationBase endpoint to decide whether a rollout is suitable for the device. When the client reports "denied", the action is still there and is offered on the next poll interval. What are my options here to stop it from being offered further? I see the possibility to cancel it, but that doesn't look like a proper workflow.

My expected behavior would be that action is automatically closed when it's denied. Would that be a breaking change then?

strailov commented 4 months ago

Hey @UVV-gh ! Thanks for your interest in hawkBit!

Yes, indeed - the bahaviour you observe was planned to be like this.

Rejecting the action will preserve the WAIT_FOR_CONFIRMATION state. The reason for that is to give the user a chance to accept it at some point in time, if needed. If you want to dispose of the action you could cancel it, which will change the state to cancelled and the action will be closed.

UVV-gh commented 4 months ago

... If you want to dispose of the action you could cancel it, which will change the state to cancelled and the action will be closed.

Thanks for the quick response. How can I cancel it from the device side? The cancellation API seems to expect a cancellation request from the server.

strailov commented 4 months ago

Which API are you using on the device side ? If it is DDI you can use the feedback channel for cancel actions which you can find in here https://eclipse.dev/hawkbit/apis/ddi_api/

UVV-gh commented 4 months ago

That's the one that I use, yes. Could you please clarify how you see the workflow. What I have right now is the following:

@strailov any advice?

UVV-gh commented 3 months ago

@strailov just checking if there's any more advices from your side.

strailov commented 3 months ago

Hey @UVV-gh Nope, I think your option is the feedback channel for cancel actions https://eclipse.dev/hawkbit/apis/ddi_api/

In other words - just report it cancelled from the device side after it was denied.

UVV-gh commented 3 months ago

But that was exactly my question. If the action is not cancelled, is there actually a feedback channel for it?

strailov commented 3 months ago

Ah okay. Then what is wrong with the Feedback channel for the DeploymentBase action ? Since it is still running just report it cancelled there ?

UVV-gh commented 3 months ago

According to your DDI API link above, that's not what neither DeploymentBase nor ConfirmationBase except as a response.