Proposal for interim release process #671
Replies: 2 comments
-
Seems rational to me so far, though I share most of the questions. We currently have a bit of a central point from which to issue commands in the Makefile. I could see perhaps adding a new entry
This could be the starting point from which the process kicks off, manually if necessary, but it would be nice to retain the running automatically-updating PR if we can. |
Beta Was this translation helpful? Give feedback.
-
With |
Beta Was this translation helpful? Give feedback.
-
Interim Release Process Proposal
I've been thinking recently about the next release, and reviewing both the Knative release machinery, and the release-please module which we have been historically using via the
release-please-action
GitHub action in ci.yaml. The following is a strawman proposal for moving forward with an interim process that we can refine and improve over time. The goals with this initial proposal are tov0.20.0
prior to the upcoming December holidaysTL;DR
Use a combination of
release-please
and Knative tooling to get about 90% there.Current Workflow
So that everyone is clear about what we are doing today, I have briefly outlined what happens in our CI as code lands on
main
. The GitHub workflow that we have been using does the following.main
, in ci.yaml,release-please-action
runs.release-please-action
examines the commit message, and updates the CHANGELOG.md file based on the use of conventional commit messages.release-please-action
commits these updates to CHANGELOG.md in arelease-vX.Y.Z
branch, which mirrorsmain
release-please
action looks for a PR from the release branch tomain
main
, therelease-please-action
creates a draft release at https://github.com/knative-sandbox/kn-plugin-func/releasesvX.Y.Z
make cross-platform
There are two specific and tangible problems with this. First, the Google CLA bot does not like commits from a GitHub action. Second, the Knative machinery protects
release*
branches from force pushes by actors such as a GitHub action. In order to effectively releasefunc
we must address both of these issues. And for overall Knative alignment, we need to begin adopting some of the current Knative release processes as defined in https://github.com/knative/hack/blob/main/release.sh.Strawman Proposal
The ideas here are loosely formed and I welcome feedback.
Keeping CHANGELOG.md and version.txt up to date on a release branch
The
release-please-action
GitHub action is based on a Node.js CLI calledrelease-please
. This CLI can be used to manage the CHANGELOG.md and version.txt files on the release branch from a fork repository. Running the following CLI command in a local clone successfully creates/updates a release PR with appropriate changes to the CHANGELOG.md file. (This is how I created the 0.20.0 release PR #667)This satisfies 3) and 5) above - mostly. It would be better if we can work out a way to automate this - perhaps from a Boson mirror of the repository.
Creating a release
With some form of the above, we get the automated CHANGELOG and version.txt updates. But the actual release itself is not created. To do that we have a couple of options. If we want to stick with
release-please
it is possible to generate the release from the CLI as well with the following command. NOTE this command should be run after the release PR has landed onmain
.This will create a draft release at https://github.com/knative-sandbox/kn-plugin-func including the all of the updates to the changelog. Here is the most recent release that was created as a draft by
release-please
. It would be nice if this could be automated. Doing this would take care of 2) and 4) above, but we've still left out 1). We're still not doing anything with the Knative release tooling.The specific tooling I refer to is the
hack/release.sh
script here: https://github.com/knative/hack/blob/main/release.sh#L515-L516.To use this, we should create a
hack/release.sh
script with abuild_release()
function. You can see how thekn
client integrates with this here: https://github.com/knative/client/blob/main/hack/release.sh#L20-L28. It looks pretty straightforward, and I think we can do something similar rather than rely onrelease-please
to generate the release. Instead, we can just userelease-please
to create a release PR and keep it current with CHANGELOG/version.txt updates. When we want to cut a release, we land the release PR, tag the release and manually create the version branch.Summary
So roughly, here's my proposal... I think this should satisfy 1) 2) 3) 4) and 5).
release-please
to manage a release PR and CHANGELOG updates. But instead of doing this from a GitHub action on knative-sandbox/kn-plugin-func, do it either manually or as a periodic action in a fork repository.release-vX.Y.Z
tagvX.Y
branchhack/release.sh
somehowOutstanding questions for me...
hack/release.sh
get executed? Who does that? Is it automated?hack/release.sh
scrape the release PR changes and apply these to the release it creates?hack/release.sh
might actually create the tags and branches for us - does anyone have more complete documentation for this tooling than what I've found in the repo?Beta Was this translation helpful? Give feedback.
All reactions