equinor / flotilla

Flotilla is the main point of access for operators to interact with multiple robots in a facility.
Eclipse Public License 2.0
16 stars 35 forks source link

Fix removing a mission from queue that has started #1665

Closed mrica-equinor closed 2 months ago

mrica-equinor commented 2 months ago

Closes #1548

mrica-equinor commented 2 months ago

If this solution works then we can merge it, but I was just wondering if you know why this fixes the issue?

Basically what is happening is that due to timing when this code runs the mission status has been updated from pending to ongoing. What happens currently is that the mission will remain ongoing and the user needs to click on it again to remove it by stopping it.

Why isn't the mission actually removed? I honestly don't know. I expected the behaviour to be removing the mission completely but it doesn't. Could be that it can't remove something with an entity with state that is unchanged.

Either way this fixes the bug, and the backend no longer crashes but I agree we could look into it more to fully understand what is happening. I was hoping I could have a discussion on this before merging it.