Resolve "Environments should not show as stopped if on_stop fails"
What does this MR do and why?
Environments are now updated to stopping state from available when stopped, then only updated to stopped status once the on_stop job has completed successfully.
UX changes to reflect this will be a follow-up MR
How to set up and validate locally
deploy:
script: echo "Deploy"
environment:
name: development
on_stop: teardown
teardown:
script: exit 1
environment:
name: development
action: stop
when: manual
- Enable the feature flag
Feature.enable(:env_stopped_on_stop_success) - Setup a
.gitlab-ci.ymlfile with anon_stopstep that will fail - Run the pipeline
- Click
stopfor the environment (i.e. development) - Note how the environment is not stopped
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #332301 (closed)
Edited by Allen Cook