-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] CHANGELOG is incorrect across branches (main vs. 2.x) #4936
Comments
@kotwanikunal LMK if you want to/can take this? I think whatever we are doing isn't working :( |
Let me take a look at this. |
@dblock Just to clarify on the expected behavior, does this mean that if I commit a change to main that I intend to backport to 2.x, then the commit on main should not modify the CHANGELOG file and only the backport should modify the CHANGELOG file? And the only time I would modify the CHANGELOG file on main would be when I don't intend to backport it (because it will remain unreleased until the first 3.x release)? |
I had a look at this. I think backporting is creating the biggest issue with achieving this independency. Sample PRs with the above change: |
Well, that's a good question. From the end user POV I think that's exactly right, if the feature shipped in 2.4.0 then there's no reason to call it out in 3.0.0. The only way I see to make it happen right now would be to do passes on the 3.0 CHANGELOG and dedup. This isn't great. |
@kotwanikunal In your example I think we have the opposite problem: the backport to 2.x is where we want the changelog because that's the version in which it's going to ship. And on main we don't want it because it will ship in 2.x. I think we made a mistake and this approach is not working :( |
So an update on the approach that I was suggesting -
I was able to use the POC to achieve the overall backport with changelog without any additional user input. It's done all by the workflow. Original PR: kotwanikunal#69 |
@kotwanikunal In your example above, the end state is that main has the changelog entry in "unreleased" and the backport branch has the entry in "2.x". Is that right? I think what we want is that the backport branch has the entry, and main has no entry (assuming the backport version gets released). |
We can potentially tweak the plugin to achieve that. It will raise a PR simultaneously to remove the entry from the original changelog. |
I think I like it @kotwanikunal as a next step because at least it fixes known problems. So let's do it. We should label changelog backport PRs to skip CI. In parallel maybe we should explore automatically generated changelogs on every merged PR from PR titles and enforcing some format thereof suggested by @seraphjiang, but if the solution you propose works well, then we're all set. |
Describe the bug
The CHANGELOG on main contains a 2.x section, which makes no sense because all changes on main are 3.0. So the only section that this CHANGELOG should have is unreleased (3.x). The CHANGELOG on 2.x contains a 2.x section, which is also incorrect. On 2.x it should be all changes that went onto 2.x.
Expected behavior
CHANGELOG on main = all changes in 3.0
CHANGELOG on 2.x = all changes on 2.x
I believe we have made a mess by not paying attention. Most changes on 2.x are backports, and each changelog line should be the change that has been backported, not the change on main. The auto-backport workflow likely needs to exclude CHANGELOG in the backport and add a backport line, amend the commit with the PR number and push.
The text was updated successfully, but these errors were encountered: