wayfair-incubator/telefonistka

Auto-merge for promotions

Ben10k opened this issue · 0 comments

Problem Statement

We use Telefonistka only for ArgoCD.
And we have adopted the suggested approach of keeping the configuration in a separate workspace directory that hosts all of the charts, but does not actually deploy to any cluster.
After a change is made under the workspace directory, it gets promoted to multiple dev environments, each of them having a different subset of the charts (the subset is configured using Telefonistka's component config with allow and block lists).

The main problem here is that we want to release the changes to all dev clusters as soon as possible, and we can do that with Telefonistka, but after each change, a new PR is raised that we have to approve and merge, and we make about 20-60 changes each day.

Proposed Solution

Have a new optional boolean property in Repo Configuration promotionPaths[0].conditions.automerge, with default value false.
When the value is unset or set to false the behaviour of telefonistka does not change.
When the value is set to true, automatically merge the PR by using the same credentials.

Documentation needs to be updated to describe this option and to add additional steps to installation about allowing telefonistka's GitHub App to merge.

Alternatives Considered

  1. Manually merge PRs - a lot of manual work, also PRs tend to be not reviewed thoroughly and merged without a proper review.
  2. Enable telefonistka to commit directly to the main branch. Is possible to implement, but would be more difficult, as telefonistka is already able to raise a PR, and it provides more details in PRs description, and that information might get lost if committing straight to the main branch.

Additional Context

renovatebot/renovate supports auto-merge, and it has been taken as inspiration. More details can be found here:
https://docs.renovatebot.com/configuration-options/#automerge
https://docs.renovatebot.com/key-concepts/automerge/