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

Fix changelog for alpha1 #18451

Closed
Zelldon opened this issue May 13, 2024 · 11 comments
Closed

Fix changelog for alpha1 #18451

Zelldon opened this issue May 13, 2024 · 11 comments
Assignees
Labels
impact/high Marks issues relieving a recurring pain or fulfilling an immediate need kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. severity/high Marks a bug as having a noticeable impact on the user with no known workaround

Comments

@Zelldon
Copy link
Member

Zelldon commented May 13, 2024

See related thread

Problem:

The changelog contains right now old issues that were not part of the release.

Root cause:

We have merged tasklist (and operate) git history into our repo. Tasklist is a younger project and referencing younger issues (lower issues numbers) with having these commits in our history our ZCL (changelog tool) gets confused and produces a wrong changelog.

@Zelldon Zelldon self-assigned this May 13, 2024
@Zelldon Zelldon added kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. severity/high Marks a bug as having a noticeable impact on the user with no known workaround impact/high Marks issues relieving a recurring pain or fulfilling an immediate need labels May 13, 2024
@Zelldon
Copy link
Member Author

Zelldon commented May 13, 2024

Discussed during planning with @npepinpe and @felix-mueller

We will time-box this, and check whether it is easy to fix. If not we plan to write at least a note on the release notes, to mark the changelog as containing some old issues.

This issue will likely come back on 8.6.0, as this will be the next minor containing the Tasklist commits again in the changelog. BUT DevEx is currently working on a new way to visually represent our release notes in the docs, which makes our release notes maybe obsolete.

@Zelldon
Copy link
Member Author

Zelldon commented May 13, 2024

Taking a look at the zcl and where the magic is done https://github.com/zeebe-io/zeebe-changelog/blob/main/pkg/gitlog/gitlog.go

We can see that it is essential similar to: $ git log -c 8.5.0..8.6.0-alpha1 -- and doing some regex magic to filter out the right commits and issue numbers.

As we now merge always with the merge commit, which contains the PR description and issue reference we actually can easily also use git log --merges To show only merge commits.

Furthermore, as Tasklist before didn't used merge commits this will help us to exclude this from the history/changelog.

@npepinpe what do you think about this approach? This would help us for upcoming 8.6.0 release I think.

Now we have the case that we already have issues marked. That we want to undo. Maybe we just delete the label, recreate it and relabel the correct issues again?

@Zelldon
Copy link
Member Author

Zelldon commented May 13, 2024

Happy for input from @romansmirnov @houssain-barouni @cmur2 as well here (to the idea above)

@npepinpe
Copy link
Member

Considering this is only to handle previous changes, it should work fine. Meaning, if Tasklist decides to use merge commits now, it shouldn't break anyway since they will sequence their issues with ours, so there won't be any collisions. The only issue is breaking things if we drop merge commits, but I don't foresee this since we use the merge queues.

@Zelldon
Copy link
Member Author

Zelldon commented May 14, 2024

Update

I deleted the alpha1 label from the repo and recreated it.
Furthermore, I used the modified version of zcl to reassign the labels and regenerate the changelog.

Before

Around ~160 issues are referenced:

2024-05-14_05-28

In the changelog we see a lot of old issues

2024-05-14_05-29

oldchangelog.txt

After

2024-05-14_05-35

With the change only half of them were valid, and have been updated again.

2024-05-14_05-46

2024-05-14_05-56

newchangelog.txt

@Zelldon
Copy link
Member Author

Zelldon commented May 14, 2024

I created a new release of zcl https://github.com/zeebe-io/zeebe-changelog/releases/tag/v0.8.0

@Zelldon
Copy link
Member Author

Zelldon commented May 14, 2024

Ok looks like that Operate uses merge commits at the begin:

Author: Patrick Dehn <pedesen@users.noreply.github.com>
Date:   Tue Feb 25 09:30:46 2020 +0100

    Merge pull request #325 from camunda/OPE-887-flow-node-icon-names
    
    Align flow-node icon names

--
Author: Svetlana Dorokhova <svetlana.dorokhova@camunda.com>
Date:   Tue Feb 25 09:19:46 2020 +0100

    Merge pull request #318 from camunda/OPE-866-cloud-logging-nodeploy
    
    Implement JSON logging layout to be used in GCloud.
    
--
Author: Patrick Dehn <pedesen@users.noreply.github.com>
Date:   Mon Feb 24 16:40:23 2020 +0100

    Merge pull request #324 from camunda/OPE-883-select-all
    
    feat(List): add select all instances

This means this solution doesn't work well enough for 8.5.0 (it excludes already some but not all necessary old issues)

@Zelldon
Copy link
Member Author

Zelldon commented May 14, 2024

I might have found an solution based on the time of when the tag has been created

git -C "./" log 8.4.0..8.5.0 --merges --since="$(git log -1 --format=%ai 8.4.0)" 

Git magic. I just need to get this into the zcl tool now.

@Zelldon
Copy link
Member Author

Zelldon commented May 14, 2024

Update

Got it working with zcl and 8.5.0 as well.

We had around 880 issues marked with our 8.5.0 label.

2024-05-14_09-47

When the recent version 0.8.0 with using only merge commits, we came down to ~570 issues, but we were still referencing old issues.

2024-05-14_09-54

The problem was as described above that Operate used at the begin merge commits as well

I was able to use the start tag date as filter with the --since flag in order to exclude old commits this reduced it down to ~440 issues.

2024-05-14_10-51

Updated changelog

Before

oldchangelog.txt
2024-05-14_11-10

After

newchangelog.txt

2024-05-14_11-12

@Zelldon
Copy link
Member Author

Zelldon commented May 14, 2024

I created a PR to add this feature zeebe-io/zeebe-changelog#18

@Zelldon
Copy link
Member Author

Zelldon commented May 21, 2024

Changelogs have been cleaned up. We now have a persistent solution, release for ZCL as well. This should work for the upcoming release (8.6.0) as well.

With this I will close this issue.

@Zelldon Zelldon closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/high Marks issues relieving a recurring pain or fulfilling an immediate need kind/toil Categorizes an issue or PR as general maintenance, i.e. cleanup, refactoring, etc. severity/high Marks a bug as having a noticeable impact on the user with no known workaround
Projects
None yet
Development

No branches or pull requests

2 participants