Shopify / shipit-engine

Deployment coordination
https://shopify.engineering/introducing-shipit
MIT License
1.42k stars 144 forks source link

Add a `safeties_enforced` param to rollback and deploy API endpoints which prevents `ignored_safeties` from being set #1289

Closed kwboyd-shopify closed 1 year ago

kwboyd-shopify commented 1 year ago

This adds a safeties_enforced parameter to the rollbacks and deploys API endpoints. If you pass this in, even if you also pass force=true, ignored_safeties will be set to false. This is for systems that may use Shipit's API and require some of the powers that force enables, but have their own safeties requirements that may differ from Shipit's.

Note: there is an existing bug in which rolling back using force when there is an active task running does not lead to the rollback being marked as ignored_safeties: true. Right now, if you force a rollback, the rollback will only be marked as ignored_safeties: true if there was not a task already in process. This pull request does not fix that bug.