This RFC is less about the exact code and more about the process. It is about how we make sure PRs are cherry picked into stable branches. In recent times we’ve relied on @tbrisker to take care of this. This does not scale and we don’t want to depend on a single person for something quite crucial. Here is my initial proposal to make it a process.
The problem I’m trying to solve is that for every fix merged, we should consider if it needs to be a cherry pick. There are 2 ways to drive this.
Github
We can have a Github driven system that uses labels. We would apply Needs cherrypick
on any PR that should be considered for a cherry pick. Then it should regularly be handled. That can be to either remove the label in case it shouldn’t be picked. If it should be picked, the PRs to branches should be opened and the label be removed.
There could be automation to apply this label automatically. For example, our bot can automatically add the label when a PR is merged and has the type Bug in Redmine. The reasoning would be that we don’t cherry pick features or refactors unless there’s a good reason. In that case it can still be added manually.
This does have a risk that we miss updates. For example, sometimes a Redmine issue has multiple commits. If one commit is missed, the fix may be incomplete. That brings me at the other point
Redmine
Katello has been using a Redmine based cherry pick flow. While I don’t know the exact details, there’s instructions.
I would propose to use the Redmine releases. To mark something for a cherry pick, the correct Fixed in version should be set. This allows the tools to correctly track it.
There should be a regular moment when the cherry pick PRs should be opened. It would then become a regular PR review, just to the stable branch instead of develop.
Here automation could run and create PRs. We can decide to bundle up all commits into one PR or one PR per Redmine issue. I’m leaning to the latter since it makes it easier to accept or reject each pick but it does increase the chance of conflicts. Conflicts is also something that should be dealt with.
Questions
- Do people think this this makes sense?
- Do we want one, the other, both or none?
- What am I forgetting?