XenitAB / gitops-promotion

A tool to do automatic promotion with a GitOps workflow.
MIT License
23 stars 0 forks source link

There is no good way to recover from bad IaC #181

Open bittrance opened 2 years ago

bittrance commented 2 years ago

status blocks a PR because reconciliation in the previous environment fails when the app container was gorp: you commit a fix to the app repo and the promote branch is replayed across the environments. This is a good workflow. However, if status blocks a PR because reconciliation in the previous environment failed when the YAML is gorp, there is no good way to recover. The status command looks at the sha encoded in the previous environment's (closed) PR description and that sha is never going to change. This means that after fixing the IaC, you still need to force-merge the promote PR (which potentially means waking up a GitHub admin at 03:30 in the night).

I think the natural solution to this problem is to have status check for reconciliation status on the commit from which the branch is currently branching, rather than the current strategy of checking reconciliation status of the commit from which it was originally branching. This would allow a developer to rebase the promote branch once the YAML is cleaned up.

simongottschlag commented 2 years ago

I think I agree. A flow chart would help to visualize the problem and fix.