jenkins-x-plugins/jx-promote

support auto-rebasing of promote PRs

Closed this issue · 2 comments

a promote PR can get merge conflicts (e.g. production if using a single cluster for staging + production)

it would be awesome to be able to auto-rebase any promotion PRs if they get rebase/merge conflicts

This would be great - I currently have renovate bot set up, which will also make PRs for me for updating my helmfiles with new versions from my helm repo, which will rebase things for me. The problem there is it's very slow to make that PR.

Another thought I had on this is that if the merge strategy was squash it wouldn't have to rebase as all the merge commits to get it up to date could just be squashed to the original update commit?

Another thought I had, based on using renovate, is that it has a few ways to rebase. One is a timer, a cron job that checks or something behind the scenes. The other is clicking a checkbox that says to rebase now.

A JX equivalent of that checkbox could just be a new pipeline with a trigger /jx rebase that runs the rebase command.

The renovate strategy in general decouples the release from the promotion in a way - there is no command that's needed to promote, it's just another dependency that's used that's out of date now.

Which makes my wheels spin about the fact that you could self host renovate too: https://github.com/renovatebot/renovate#self-hosting
https://github.com/renovatebot/renovate/blob/master/docs/usage/self-hosting.md#kubernetes

In that case promoting could just be creating a job from the renovate cron job.

we now use an environment git merge which will rebase and merge promote changes to the environment repository if a PR is pending and another commit is merged