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

Automate releases with knope #127

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Automate releases with knope #127

merged 3 commits into from
Dec 4, 2024

Conversation

n8maninger
Copy link
Member

@n8maninger n8maninger commented Dec 3, 2024

This makes PRs slightly more annoying because they will need to have either a documented change set or conventional commits, but this will automate the release process and improve documentation. This is mostly the same setup as renterd and hostd with the addition of tagging the release when the preview PR closes.

To add a changeset to a PR:

  1. install Knope https://knope.tech/installation/
  2. Run knope document-change

@lukechampine
Copy link
Member

I have to install some new tool, and this is gonna stick a bunch of files in a .changesets directory in the repo?

How has the experience been with knope in renterd and hostd so far? I looked at those repos and it seems like every .changesets file is just a PR title with no further information. Have we used it to cut an actual release yet? As you can probably tell, I'm skeptical of stuff like this, but if it's been a clear win for us I'll change my tune.

@lukechampine
Copy link
Member

(I feel like there will be an AI tool soon that does all of this without needing any extra human legwork... if it doesn't already exist)

@n8maninger
Copy link
Member Author

n8maninger commented Dec 3, 2024

I have to install some new tool, and this is gonna stick a bunch of files in a .changesets directory in the repo?

How has the experience been with knope in renterd and hostd so far? I looked at those repos and it seems like every .changesets file is just a PR title with no further information. Have we used it to cut an actual release yet? As you can probably tell, I'm skeptical of stuff like this, but if it's been a clear win for us I'll change my tune.

I find the automation to be very useful. renterd currently uses GitHub's automatic change log tool, which is terrible for human readability. I manually write the hostd log for every release. core and coreutils have zero change documentation. Our versioning is, effectively, "tag whatever feels appropriate." I'm of the opinion that the slight inconvenience is worth the automation and standardization. Reinventing the wheel with a custom tool or trying to use AI tools that are mostly misses at this stage to avoid a .changeset folder when a decent workflow already exists is a waste, imo.

You don't have to install the tool. You can manually create the change set file. If it's a small change, you can use conventional commits: fix(chain): do stuff.

@n8maninger
Copy link
Member Author

n8maninger commented Dec 3, 2024

If there is another actively maintained and well documented tool that gets us human-readable documentation and automated versioning with less overhead, I'm happy to use it. This is just the workflow I am familiar with.

Copy link
Member

@ChrisSchinnerl ChrisSchinnerl left a comment

Choose a reason for hiding this comment

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

As Nate has already mentioned while we have set it up in our dev branch, we haven't had a proper release with knope yet. So the first changelog will require some manual intervention. But after that it should be smooth sailing.

Imo this is a great compromise since all you need to do is either use a conventional commit or add a file for it to be satisfied and in exchange we get useful changelogs.

knope.toml Outdated Show resolved Hide resolved
@ChrisSchinnerl ChrisSchinnerl merged commit 35640a5 into master Dec 4, 2024
10 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the nate/add-knope branch December 4, 2024 15:40
@lukechampine
Copy link
Member

Is this a knope changelog? SiaFoundation/desktop#98 or some other tool?

AFAICT, in practice these changelogs will just be a list of the PRs that were merged since the last release. Which, sure, is better than nothing. But you don't need a tool for that.

IMO, if you want release notes that are actually pleasant to read, you gotta do it the old-fashioned way: pull up the commit history, identify the most salient changes, and summarize them in a few sentences. I did that for siad for years, and I'll happily do it again.

@lukechampine
Copy link
Member

wait. You can just press a button in the GitHub UI to create the .changeset file? ok, that's much more tolerable lol

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 this pull request may close these issues.

3 participants