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

[DX Streamline] Use the mkreleaselog generated changelog when creating GitHub Releases #12162

Closed
galargh opened this issue Jun 27, 2024 · 3 comments · Fixed by #12096
Closed
Milestone

Comments

@galargh
Copy link
Contributor

galargh commented Jun 27, 2024

Problem to solve

When a GitHub Release of lotus is created, it contains an auto-generated changelog. Then, a release performer has to update the release description manually to reflect the mkrelease log outputs (and CHANGELOG.md) contents. This should be automated.

Why Important

There is no good reason to put the demand of running a script and copying its' outputs on a human. Computers are capable of doing that.

User/Customer

Lotus maintainers

Notes

Enabled by #12096

@laurentsenta
Copy link
Contributor

Note, example of running locally:

› ./scripts/mkreleaselog                                                        ☺
Computing old deps...
Computing new deps...
Generating Changelog for github.com/filecoin-project/lotus v1.27.1..438ecba9583fd404804966505a0695849cf28635
- github.com/filecoin-project/lotus:
  - chore: resolve release automation todos
  - docs: update the release issue template
  - fix: apply fixes from the testing branches
  - chore: fix go imports
  - docs: update README of the release tool
  - chore: update the release automation after initial testing
  - Merge remote-tracking branch 'origin/master' into ipdx/release-automation
  - fix: go fmt and go mod tidy
  - docs: update the release issue template
  - fix: docker workflow triggers
  - fix: when the release workflow is triggered automatically
  - fix: setting the prerelease checkbox in goreleaser
  - docs: update the RELEASE_ISSUE_TEMPLATE to reflect the automation addition
  - docs: document the usage and purpose of the release cmd
  - Merge remote-tracking branch 'origin/master' into ipdx/release-automation
  - feat: ci: automate the new release process
  - fix: events: sqlite db improvements (#12090) ([filecoin-project/lotus#12090](https://github.com/filecoin-project/lotus/pull/12090))
  - feat: itest: minor UnmanagedMiner refactor for reusability and simplicity
  - fix: ci: do not use deprecated --debug goreleaser flag (#12086) ([filecoin-project/lotus#12086](https://github.com/filecoin-project/lotus/pull/12086))
  - chore: bump version in master (#12074) ([filecoin-project/lotus#12074](https://github.com/filecoin-project/lotus/pull/12074))
  - docs: changelog: fix link syntax (#12085) ([filecoin-project/lotus#12085](https://github.com/filecoin-project/lotus/pull/12085))
  - chore: curio: remove forgotten parts of curio config (#12087) ([filecoin-project/lotus#12087](https://github.com/filecoin-project/lotus/pull/12087))
  - chore: deals: remove forgotten graphsync references (#12084) ([filecoin-project/lotus#12084](https://github.com/filecoin-project/lotus/pull/12084))
  - fix: ETH RPC API: ETH Call should use the parent state root of the subsequent tipset (#11905) ([filecoin-project/lotus#11905](https://github.com/filecoin-project/lotus/pull/11905))
- github.com/filecoin-project/go-state-types (v0.14.0-rc1 -> v0.14.0-rc2):
  - land all nv23 changes in master  (#277) ([filecoin-project/go-state-types#277](https://github.com/filecoin-project/go-state-types/pull/277))
  - update cpsv naming (#276) ([filecoin-project/go-state-types#276](https://github.com/filecoin-project/go-state-types/pull/276))
  - docs: update readme with Versioning/Release Process (#273) ([filecoin-project/go-state-types#273](https://github.com/filecoin-project/go-state-types/pull/273))
  - Update codename for NetworkVersion23 (#274) ([filecoin-project/go-state-types#274](https://github.com/filecoin-project/go-state-types/pull/274))

Contributors

| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| Peter Rabbitson | 6 | +488/-2603 | 40 |
| Rod Vagg | 17 | +1236/-738 | 38 |
| galargh | 16 | +609/-414 | 29 |
| Aarsh Shah | 4 | +508/-87 | 12 |
| Jennifer Wang | 1 | +120/-120 | 3 |
| Jiaying Wang | 2 | +161/-3 | 2 |
| Phi-rjan | 5 | +83/-43 | 24 |
| ZenGround0 | 1 | +69/-0 | 1 |
| Steve Loeppky | 1 | +42/-25 | 1 |
| Mikers | 1 | +63/-0 | 4 |
| aarshkshah1992 | 1 | +19/-4 | 1 |
| Piotr Galar | 3 | +3/-4 | 3 |
| fsgerse | 1 | +1/-2 | 1 |
| SuiYuan | 1 | +1/-1 | 1 |
| Hubert | 1 | +0/-1 | 1 |

Compared to changelog:
https://github.com/filecoin-project/lotus/blob/master/CHANGELOG.md#new-features-2

It looks like we have to

  • Group by git commit prefix (fix / chore / feat / etc)
  • Reformat the output grouped by repositories a bit

@rvagg
Copy link
Member

rvagg commented Jul 9, 2024

Also remove merge commits.

We could also completely re-do this; while consistency is nice, there are tools out there that can do a better job for us. I wrote https://github.com/nodejs/changelog-maker eons ago and it's still used today for Node.js releases (I still use it, and its friend https://github.com/nodejs/branch-diff, to do git wrangling); although it's tuned for linear commit histories and will probably have some trouble with the heavy merge action that happens in lotus. But there are others.

Or, we can accept a less human-curated output format and not worry too much about it - people will just scan these anyway.

Or, we could use the tooling for a first-pass and then make the human do some curation before finalisation: one of the final steps being to go into the auto-generated CHANGELOG and (a) confirm it and (b) tinker with it to make it pretty.

@laurentsenta
Copy link
Contributor

Agreed,

note that with #12069 contributors will start adding to changelogs with every PR; generated changelog lines might be duplicate / not relevant now that we have editorialized changes descriptions.

I would recommend "just" pulling the changes from submodules (like github.com/filecoin-project/go-state-types in the example), and the list of contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎉 Done
Development

Successfully merging a pull request may close this issue.

3 participants