Shopify / shipit-engine

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

Question: does shipit launch a deployment before or after merging to master ? #1246

Closed mgarstecki closed 2 years ago

mgarstecki commented 2 years ago

Hi,

I'm evaluating approaches to handle deploys at scale, and was wondering whether shipit runs its deployment steps before, or after merging to its target branch ?

The issue I'm pondering is how to avoid having code that failed to deploy properly present on the common branch. Deploying before merging seems a possibility, especially linked with a merge queue: the PR that fails to deploy can be sidelined before merging, allowing PRs to keep deploying while the problematic one is fixed.

casperisfine commented 2 years ago

whether shipit runs its deployment steps before, or after merging to its target branch ?

After merge.

how to avoid having code that failed to deploy properly present on the common branch.

IMHO if the deploy fail because of one of the merged code changes, it's a CI problem, not a CD problem. The deploy script should be tested enough that this doesn't (or super rarely) happens.

The tradeoff at play here is that if you deploy from branches, you either need some complex batching logic, or forego batching entirely, which past a certain size is just not possible.