-
Notifications
You must be signed in to change notification settings - Fork 26
Add explanation on how to backport and make patch releases #1074
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
base: master
Are you sure you want to change the base?
Conversation
carbolymer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. But I think this could be made a bit more concise, without sacrificing the readability of course.
My point is, that this RELEASING.md is quite long already and I've seen people from outside of our team trying to release cardano-api/cardano-cli being discouraged by the amount of words here.
| After identifying the affected versions, we must decide which digit to bump. As with any release, for bug fixes, this is typically the 3rd digit. It may occasionally be the 4th digit if the change is strictly backwards compatible and very minor. | ||
| Using this information, we determine the new version numbers for the patches we will create. | ||
| For example, if we choose to bump the 3rd digit and the affected versions include: | ||
| ``` | ||
| 10.14.1.0, 10.14.0.0, 10.13.0.0, 10.12.2.0, 10.12.1.0, and 10.12.0.0 | ||
| ``` | ||
| We would need to make the following releases (patching the latest version of each series): | ||
| ``` | ||
| 10.14.2.0 (fixes 10.14.1.0) | ||
| 10.13.1.0 (fixes 10.13.0.0) | ||
| 10.12.3.0 (fixes 10.12.2.0) | ||
| ``` | ||
| By doing this, dependencies specifying a version range like `^>= 10.13` will automatically pick up the patched version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit lengthy, and it rephrases what's in lines 22-26 is described already. I think it would be better to improve the PVP excerpt in lines 22-26 if needed instead.
| ## Backporting | ||
| If a bug affecting a release is discovered long after that release has been made (and potentially after several subsequent releases), it may be necessary to create a patch that fixes each of the affected legacy versions. In this section, we describe how this is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduction feels a bit obvious. Personally I'd skip this, but you can leave it if you want.
| The reason we use a PR for the backport is to ensure the changelog gathering script works correctly in later steps. (Alternatively, commits can be added directly to the release branch, but this requires manually writing the changelog entries later.) | ||
| Finally, we merge the PR. This process can be repeated if multiple bugs need to be patched; ideally, create one PR per bug fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Finally, we merge the PR. This process can be repeated if multiple bugs need to be patched; ideally, create one PR per bug fix. | |
| Finally, we merge the backport PR. This process can be repeated if multiple bugs need to be patched; ideally, create one PR per bug fix. |
| ``` | ||
| We add the generated entry to the `CHANGELOG.md`, bump the version number in the `.cabal` file, and create a release PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| We add the generated entry to the `CHANGELOG.md`, bump the version number in the `.cabal` file, and create a release PR. | |
| We add the generated entry to the `CHANGELOG.md`, bump the version number in the `.cabal` file, and create a release PR targeting `master`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would turn the steps from your changes into numbered list. At least for me it's easier to follow steps in a form of a numbered list rather than text.
| ### 4. Publication to CHaP (Cardano Haskell Packages) | ||
| As usual, we use `add-from-github.sh` to create a CHaP entry for each of our new releases. We open a PR in the CHaP repository, and once the build passes and is approved, we merge it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"As usual" might be not clear enough for people not familiar with the release process. Could you add a reference to the exact point above with the command?
| Then, we use `tag.sh` to create a release tag in the repo of the package we are fixing. | ||
| There is one key difference from a standard release workflow: normally, we merge the release PR into `master`. However, for backported patches, we typically do **not** merge the release PR into `master`. Attempting to do so can cause issues: | ||
| - We can't because some of the CI checks don't pass (there may be new requirements that were not satisfied by the old version, or they just broke because the context changed). | ||
| - Even if we can, we may have really complicated conflicts, because the branch we are patching may be really different from the current `master`. | ||
| - Even if we achieve this, through force merging and agressive conflict resolution, we are trying to merge the same patch over and over in `master`, so it does not make a lot of sense. | ||
| Despite all of that, it is possible to do this, and it is a valid option. However, we suggest just closing the release PR and opening a new PR, directly from `master`, that simply updates the change-log for all the release PRs we haven't merged. This can be do just once for all the releases, after all the patches have been release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rewrite the recommendations with more strong wording. I see this file as a process we have to follow, and not could choose to follow.
Using imperatives would make this a tad shorter.
| Then, we use `tag.sh` to create a release tag in the repo of the package we are fixing. | ||
| There is one key difference from a standard release workflow: normally, we merge the release PR into `master`. However, for backported patches, we typically do **not** merge the release PR into `master`. Attempting to do so can cause issues: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| There is one key difference from a standard release workflow: normally, we merge the release PR into `master`. However, for backported patches, we typically do **not** merge the release PR into `master`. Attempting to do so can cause issues: | |
| There is one key difference from a standard release workflow: normally, we merge the release PR into `master`. However, for backported patches, we typically do **not** merge the release PR into `master` (assuming the backported fix is already there). Attempting to do so can cause issues: |
or something along those lines
Changelog
Context
We just backported two bug fixes, see #1070. This PR documents the process in case something similar needs to be done again.
How to trust this PR
I guess just reading it and seeing if it makes sense.
Checklist