Comment 9 for bug 1354401

Revision history for this message
Kate Pimenova (kpimenova) wrote : Re: [ui] Cannot stop deployment if is started with error

There is an backend bug:
The main problem is that backend starts task even when wrong changes are coming.

It is easy reproducible on fakeUI:
Deploy cluster - you'll see the cluster with disabled "Deploy changes" button. Then you can to try to put any changes to cluster using browser console, or just edit "Deploy changes" button using "inspect element" - remove the "disabled" class, then you can click on this button and start deployment with no changes on the cluster actually.
The result:
PUT http://0.0.0.0:8000/api/clusters/1/changes
400 Bad Request
Response: No changes to deploy
 - so there is an expected behavior.

But! For any case - backend starts an mysterious task.
It is easy visible in browser console:
[{"status": "running", "name": "deploy", "cluster": 1, "result": {}, "progress": 0, "message": null, "id": 27, "uuid": "a078732f-d376-4b7c-838b-41664a85a4b9"}]
UI also are viewing this task - so "progress bar" and "stop deployment" elements are showed for the cluster.

But - backend doesn't see it - So when we trying to stop this task: we'll se the " Nothing to stop - deployment is not running on environment '1'"