Can't approve/reject a deploy to protected env after protection is removed
Summary
When you configure a protected environment you have to approve to deploy to it.
But once you have a deployment pending and you remove the protection you can no longer deploy the pending deployment.
Environments Page | Job Page |
---|---|
![]() |
![]() |
Steps to reproduce
- Create a project
- Setup protection for the environment
- Setup a
gitlab-ci
file to create a deployment (attached an example for it) - Run the pipeline
- Remove the protection for the environment
- See you can't deploy the job anymore.
What is the current bug behavior?
The approval
button disappears, but the job is stuck in a state where it is asking for approvals before being deployed.
What is the expected correct behavior?
The job would not be blocked when environment protection is lifted.
Possible fixes
Allow the job to be manually run when protection is lifted from an environment.
Related ticket https://gitlab.zendesk.com/agent/tickets/389412 (internal only)
Edited by Emily Bauman