Environments should not show as stopped if on_stop fails
The current behaviour of Operations -> Environments is that environments are marked as 'stopped' as soon as the Stop button is clicked.
If, for any reason, the on_stop job fails, the environment and its underlying resources remain fully or partially available.
This can cause interference with future deployments to the same environment. It can also cause unnecessary cost, i.e. if the deployment creates cloud resources.
I propose that an environment should only transition to the Stopped tab once the on_stop job has completed successfully.
Implementation plan
Edited by Alishan Ladhani