From 8583c1ac15c12d16ed7c3f435bd3856c4da07c10 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Tue, 19 Mar 2024 12:04:15 -0400 Subject: [PATCH] internal/relui: update major release x/tools generate sequence CL 567837 extracted the stdlib manifest from x/tools/internal/imports to x/tools/internal/stdlib. That is the new package that will need to be regenerated every 6 months after each major Go release. Update the relui task that automated that recurring work accordingly. For golang/go#46136. For golang/go#38706. Change-Id: I9705ac881a18a5e7b03188228eadfaccf816aaca Reviewed-on: https://go-review.googlesource.com/c/build/+/572777 Auto-Submit: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Alan Donovan --- internal/relui/buildrelease_test.go | 4 ++-- internal/relui/workflows.go | 6 +++--- internal/task/version.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/relui/buildrelease_test.go b/internal/relui/buildrelease_test.go index ce3e237ed4..ac54e5bac4 100644 --- a/internal/relui/buildrelease_test.go +++ b/internal/relui/buildrelease_test.go @@ -77,8 +77,8 @@ case "$1" in echo "tidied!" >> go.mod ;; "generate") - mkdir -p internal/imports - cd internal/imports && echo "package imports" >> zstdlib.go + mkdir -p internal/stdlib + cd internal/stdlib && echo "package stdlib" >> manifest.go ;; *) echo unexpected command $@ diff --git a/internal/relui/workflows.go b/internal/relui/workflows.go index 0c0956eb42..85f49a4399 100644 --- a/internal/relui/workflows.go +++ b/internal/relui/workflows.go @@ -485,9 +485,9 @@ func addSingleReleaseWorkflow( pushed := wf.Action3(wd, "Push issues", milestone.PushIssues, milestones, nextVersion, kindVal, wf.After(tagged)) published := wf.Task2(wd, "Publish to website", build.publishArtifacts, nextVersion, signedAndTestedArtifacts, wf.After(uploaded, availableOnProxy, pushed)) if kind == task.KindMajor { - goimportsCL := wf.Task2(wd, fmt.Sprintf("Mail goimports CL for 1.%d", major), version.CreateUpdateStdlibIndexCL, coordinators, nextVersion, wf.After(published)) - goimportsCommit := wf.Task2(wd, "Wait for goimports CL submission", version.AwaitCL, goimportsCL, wf.Const("")) - wf.Output(wd, "goimports CL submitted", goimportsCommit) + xToolsStdlibCL := wf.Task2(wd, fmt.Sprintf("Mail x/tools stdlib CL for 1.%d", major), version.CreateUpdateStdlibIndexCL, coordinators, nextVersion, wf.After(published)) + xToolsStdlibCommit := wf.Task2(wd, "Wait for x/tools stdlib CL submission", version.AwaitCL, xToolsStdlibCL, wf.Const("")) + wf.Output(wd, "x/tools stdlib CL submitted", xToolsStdlibCommit) } dockerBuild := wf.Task1(wd, "Start Google Docker build", build.runGoogleDockerBuild, nextVersion, wf.After(uploaded)) diff --git a/internal/task/version.go b/internal/task/version.go index 8ebba7c10d..a6c01ab1cb 100644 --- a/internal/task/version.go +++ b/internal/task/version.go @@ -216,7 +216,7 @@ func (t *VersionTasks) TagRelease(ctx *workflow.TaskContext, version, commit str } func (t *VersionTasks) CreateUpdateStdlibIndexCL(ctx *workflow.TaskContext, reviewers []string, version string) (string, error) { - build, err := t.CloudBuild.RunScript(ctx, "go generate ./internal/imports", "tools", []string{"internal/imports/zstdlib.go"}) + build, err := t.CloudBuild.RunScript(ctx, "go generate ./internal/stdlib", "tools", []string{"internal/stdlib/manifest.go"}) if err != nil { return "", err } @@ -228,7 +228,7 @@ func (t *VersionTasks) CreateUpdateStdlibIndexCL(ctx *workflow.TaskContext, revi changeInput := gerrit.ChangeInput{ Project: "tools", - Subject: fmt.Sprintf("internal/imports: update stdlib index for %s\n\nFor golang/go#38706.", strings.Replace(version, "go", "Go ", 1)), + Subject: fmt.Sprintf("internal/stdlib: update stdlib index for %s\n\nFor golang/go#38706.", strings.Replace(version, "go", "Go ", 1)), Branch: "master", } return t.Gerrit.CreateAutoSubmitChange(ctx, changeInput, reviewers, files)