From fb6ffcd561d7fd5d940420b02d248c22d3fe419b Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 20 Jun 2024 15:43:13 -0600 Subject: [PATCH 1/5] Enhance the pre-req GA steps Signed-off-by: Florent Poinsard --- go/releaser/blog_post.go | 23 +++++++++++++++++++---- go/releaser/prerequisite/summary.go | 11 ++++++----- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/go/releaser/blog_post.go b/go/releaser/blog_post.go index bd6eaf3..e026726 100644 --- a/go/releaser/blog_post.go +++ b/go/releaser/blog_post.go @@ -19,16 +19,31 @@ package releaser func DraftBlogPost() []string { return []string{ "The release announcement blog post must be finished before the release day.", - "A highlight of the major changes must be included in the blog post, along with a link to the release notes.", + "You may take example on previous release announcement blog post.", "", - "A Pull Request on the website repository of Vitess has to be created so we can easily publish the blog during the release day.", + "The blog post should at least have the following:", + "\t- Highlight of the major changes.", + "\t- A link to the release notes.", + "", + "During the pre-release, we will create a Pull Request on the website repository with the draft.", } } func RequestCrossPostBlogPost() []string { return []string{ - "You must coordinate with the different organizations (CNCF and PlanetScale) for cross-posting the blog post.", + "You must coordinate with the different organizations (CNCF and PlanetScale) to cross-post the blog post.", "Send out an email to both parties to request a cross-post a couple weeks before the GA release.", + "", + "CNCF:", + "\tThe title of the blog post Google Docs usually contains 'DRAFT', and we usually let CNCF know that until the title does not say 'FINAL',", + "\tthe blog post cannot be posted. We usually ask them to publish the cross-post on the same day as the release, morning time PST.", + "", + "PlanetScale:", + "\t Send a request to a Vitess maintainers working at PlanetScale to let them handle the cross-post request internally.", + "\t PlanetScale usually publish the cross-post the same days as the release, morning time PST.", + "", + "Important:", + "\tIf for whatever reason the GA release is delayed, all parties must be informed ASAP so they don't release the blog post before the release.", } } @@ -42,4 +57,4 @@ func MergeBlogPostPR() []string { return []string{ "Merge the blog post Pull Request you have created during the pre-release.", } -} \ No newline at end of file +} diff --git a/go/releaser/prerequisite/summary.go b/go/releaser/prerequisite/summary.go index 8f5b820..c351de5 100644 --- a/go/releaser/prerequisite/summary.go +++ b/go/releaser/prerequisite/summary.go @@ -24,14 +24,15 @@ import ( func CheckSummary(state *releaser.State) []string { return []string{ - "If the release does not contain significant changes (i.e. a small patch release) then this step can be skipped", + "It is common for small releases (i.e. patch releases) to not have a summary file, in this case this step can be marked as done and ignored.", "", - "We must verify that the summary file makes sense: no grammar/english mistake, the content is well organized, that the links are not broken.", + "We must verify that the summary file makes sense: no grammar or english mistake, that the content is well organized and that the links are not broken.", "We must treat this file as if it was a blog post, this is one of the main entrypoints for people wanting to learn more about the release.", "", - "Over the release cycle, people add their bits to this file, but no one looks at the file as a whole, this is the time to do it.", + "Over the release cycle people add their bits to this file, but no one looks at the file as a whole, this is the time to do it!", "", - fmt.Sprintf("The summary file is located in: ./changelog/%s.0/%s/summary.md.", state.VitessRelease.MajorRelease, releaser.RemoveRCFromReleaseTitle(state.VitessRelease.Release)), - "The summary file for a release candidate is the same as the one for the GA release.", + fmt.Sprintf("The summary file is located in: './changelog/%s.0/%s/summary.md'.", state.VitessRelease.MajorRelease, releaser.RemoveRCFromReleaseTitle(state.VitessRelease.Release)), + "", + "Note: the summary file for a release candidate is the same as the one for the GA release.", } } From 94d2ba3eea386be61cf0f0290fac88143eebba96 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 20 Jun 2024 15:52:05 -0600 Subject: [PATCH 2/5] Mention that commits are created by this tool Signed-off-by: Florent Poinsard --- go/releaser/git/git.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/go/releaser/git/git.go b/go/releaser/git/git.go index 6ac4354..1a4b928 100644 --- a/go/releaser/git/git.go +++ b/go/releaser/git/git.go @@ -66,7 +66,18 @@ func Push(remote, branch string) { func CommitAll(msg string) (empty bool) { utils.Exec("git", "add", "--all") - out, err := utils.ExecWithError("git", "commit", "-n", "-s", "-m", msg) + out, err := utils.ExecWithError( + "git", + "commit", + "-n", + "-s", + "-m", + msg, + "-m", + "This commit was made automatically by the vitess-releaser tool.", + "-m", + "See https://github.com/vitessio/vitess-releaser", + ) if err != nil { if strings.Contains(out, "nothing to commit, working tree clean") { return true From c95d5ed9438cb1edd176446a575b8719122092df Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 20 Jun 2024 15:55:20 -0600 Subject: [PATCH 3/5] Better create blog post text Signed-off-by: Florent Poinsard --- go/releaser/blog_post.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/releaser/blog_post.go b/go/releaser/blog_post.go index e026726..13bb9f8 100644 --- a/go/releaser/blog_post.go +++ b/go/releaser/blog_post.go @@ -50,6 +50,8 @@ func RequestCrossPostBlogPost() []string { func CreateBlogPostPR() []string { return []string{ "Open a Pull Request on the website repository that contains the new blog post.", + "", + "Doing this now is important, it allows other maintainers to review the PR before the release.", } } From e6e9325bbc6035d367c3befc4fed500206dc8c96 Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 20 Jun 2024 16:33:20 -0600 Subject: [PATCH 4/5] Fix state machine when reading release PR link Signed-off-by: Florent Poinsard --- go/releaser/issue.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go/releaser/issue.go b/go/releaser/issue.go index db971e4..88f8fb9 100644 --- a/go/releaser/issue.go +++ b/go/releaser/issue.go @@ -232,8 +232,7 @@ const ( ### Pre-Release _(~1-3 days before)_ -- [{{fmtStatus .CreateReleasePR.Done}}] Create Release PR. -(We do this earlier to catch any issues in the tool and let CI run.) +- [{{fmtStatus .CreateReleasePR.Done}}] Create Release PR. (We do this earlier to catch any issues in the tool and let CI run.) {{- if .CreateReleasePR.URL }} - {{ .CreateReleasePR.URL }} {{- end }} From 94e9e1efcc3ca215eb7a492df6ebf5a05d01092b Mon Sep 17 00:00:00 2001 From: Florent Poinsard Date: Thu, 20 Jun 2024 16:56:56 -0600 Subject: [PATCH 5/5] Fix typo in java.go Signed-off-by: Florent Poinsard --- go/releaser/release/java.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go/releaser/release/java.go b/go/releaser/release/java.go index 718a8b3..25aab1d 100644 --- a/go/releaser/release/java.go +++ b/go/releaser/release/java.go @@ -42,8 +42,7 @@ func JavaRelease(state *releaser.State) (*logging.ProgressLogging, func() string if strings.Contains(state.VitessRelease.Repo, "vitessio/vitess") { pl.NewStepf("Do the Java release") - cmd := exec.Command("/bin/sh", "-c", "eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info); export GPG_TTY=$(tty); export GPG_AGENT_INFO; export MAVEN_OPTS=\"--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED\"; mvn clean deploy -P release -DskipTests;", - ) + cmd := exec.Command("/bin/sh", "-c", "eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info); export GPG_TTY=$(tty); export GPG_AGENT_INFO; export MAVEN_OPTS=\"--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED\"; mvn clean deploy -P release -DskipTests;") pwd, err := os.Getwd() if err != nil { utils.LogPanic(err, "failed to get current working directory")