Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about creating a patch release branch #512

Merged
merged 6 commits into from
Jul 31, 2024

Conversation

mallardduck
Copy link
Member

@mallardduck mallardduck commented Jul 24, 2024

The goal of adding this doc is so that this repo can have a documented process for this.
In theory with that process laid out for everyone to follow we can continue merging PRs to HEAD branches during r/r freeze with more confidence. And this could potentially allow us more time/flexibility to address the renovate PRs.

Warning

Before we execute on this practice across all our maintained branches we will first need to:

  1. Edit GHA workflows to allow tests/ci to run based on any release/* (or similar) branch regex,
  2. Sync all workflows to older branches via backport.

Eventually we can still adjust how we manage workflows in this repo if that's desired. Since we've been discussing some methods of keeping the workflows in sync across all branches more easily. (Automatic backports, orphan branch of canonical workflows, dedicated workflow repo etc)

@mallardduck mallardduck requested a review from a team as a code owner July 24, 2024 19:23

1. Start by checking out the tag being patched: ```git checkout tags/v5.0.0```
2. Now create a new patch branch from this spot: ```git checkout -b release/v5.0.1```
3. Push the new patch branch to the BRO repo.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear on step 3. We don't want to modify release/v5.0 , so we now have to make a release for it as well, right? But from branch release/v5.0.1 ? And the PR will normally be made from a fork, but approving it means basically transferring it from the fork to the rancher/BRO repo, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So step 3 may vary depending on your local git repo which is why I excluded it.

But this would literally be the action of git push - and i my specific local repo I would do: git push upstream (since that's the upstream that points to rancher/bro not mallardduck/bro).

After steps 1 and 2 - your local git is: a) already at local branch release/v5.0.1 and b) that branch matches the commit of release v5.0.0. Those two together give us the same end result as if we were to have created release/v5.0.1 right at the same time as releasing tag v5.0.0.

Copy link
Member Author

@mallardduck mallardduck Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add that as an example and put a note about making sure you know what your local git repo's remotes are named and to use yours?

Updated the docs to expand on this example and put a clear note about updating the example commands. 😄

Copy link
Collaborator

@ericpromislow ericpromislow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo and a process/clarification question

@jbiers
Copy link
Member

jbiers commented Jul 24, 2024

Just a quick overview to make sure I understand the process proposed here:

  • In a code freeze we of course do not want to merge new code into the release branch. E.g. release/v5.0.
  • But sometimes urgent patches are needed.
  • For that, we create a new branch from release/v5.0 as described in this new doc and merge the desired change into it.
  • A patch release is made from this new branch.
  • When code freeze is over, the change is also merged into the main (release/v5.0) release branch.

Is that correct? If not, maybe we can add some extra context into these docs for them to be useful to newcomers to the project who do not yet understand the process very well.

@mallardduck
Copy link
Member Author

Just a quick overview to make sure I understand the process proposed here:

  • In a code freeze we of course do not want to merge new code into the release branch. E.g. release/v5.0.
  • But sometimes urgent patches are needed.
  • For that, we create a new branch from release/v5.0 as described in this new doc and merge the desired change into it.
  • A patch release is made from this new branch.
  • When code freeze is over, the change is also merged into the main (release/v5.0) release branch.

Is that correct? If not, maybe we can add some extra context into these docs for them to be useful to newcomers to the project who do not yet understand the process very well.

It's actually kind of the opposite of this 😓 mostly.

The idea here being that we should keep working on release/5.0 even if r/r is in a freeze. So we will do that. My impression from recent discussion is that r/r is technically the only thing in freeze.

Repos like ours can follow that freeze, but don't need to strictly. It is however a lot easier to follow the freeze, since working during it needs a process like this in place. And this would roughly be that process to enable us to "branch back in time" and create a clean working slate equivalent to the version we need to patch.

jbiers
jbiers previously approved these changes Jul 25, 2024
@jbiers
Copy link
Member

jbiers commented Jul 25, 2024

LGTM

Copy link
Collaborator

@ericpromislow ericpromislow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple of small changes

@mallardduck mallardduck requested review from ericpromislow and removed request for ericpromislow July 29, 2024 14:20
Copy link
Collaborator

@ericpromislow ericpromislow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@mallardduck mallardduck merged commit d8fc301 into rancher:release/v5.0 Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants