solo-io / go-utils

golang utilities
Apache License 2.0
111 stars 19 forks source link

Add NOTE type to changelog #430

Closed ryantking closed 3 years ago

ryantking commented 3 years ago

During the review of https://github.com/solo-io/gloo-mesh/pull/1188, @kdorosh pointed out that one thing we lose by generating the changeling directly from the changelog directory versus the GitHub API is the ability to add on-the-fly edits to the release body, which will be added to the changeling next time the docs are generated. The solution discussed was adding a NOTE type to the changeling so instead of editing the GitHub release, an additional YAML file can be added to the version folder with a note type entry that will then get added to the changelog once committed.

One consideration is how to handle drift between the changeling and the GitHub release bodies. Two possible solutions are:

  1. Accept the fact that on the occasion that notes must be added retroactively, the release body should also be manually updated.
  2. Update the changelog bot to sniff out these retroactive changes and update the release bodies.

I'm particularly partial to solution 2, specifically using https://github.com/go-git/go-git to find changes in the last commit to any changelog files then update the release bodies for all affected ones.

CC: @joekelley @kdorosh @ilackarms

kdorosh commented 3 years ago

Accept the fact that on the occasion that notes must be added retroactively, the release body should also be manually updated.

Another concern here is that if you are maintaining several release branches / versions at once, this can become cumbersome. Particularly because in terms of releases and GitHub there is only one source of truth / set of live releases and changelogs -- so why make several sources of truth for changelog generation that can drift (one for each branch)?

Is the desire to move source of truth to local changelog directory solely for solving the race condition? If so, I'd rather explore other avenues to solve for that.

ryantking commented 3 years ago

Closing this for now, can revisit if deemed necessary