internal/relui: remove approval step from dry-run
This removes the approval step from dry-run releases. There's no need to
approve test failures in this scenario, and we should just fail the
workflow.
For golang/go#54476
Change-Id: I468a0bda42b4d5b6a57d7da79c448d76383c648f
Reviewed-on: https://go-review.googlesource.com/c/build/+/436155
Run-TryBot: Jenny Rakoczy <jenny@golang.org>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/internal/relui/workflows.go b/internal/relui/workflows.go
index fe5659c..fb92e88 100644
--- a/internal/relui/workflows.go
+++ b/internal/relui/workflows.go
@@ -463,7 +463,7 @@
// addBuildTasks registers tasks to build, test, and sign the release onto wd.
// It returns the output from the last task, a slice of signed and tested artifacts.
-func (tasks *BuildReleaseTasks) addBuildTasks(wd *wf.Definition, major int, version wf.Value[string], source wf.Value[artifact], skipSigning bool) wf.Value[[]artifact] {
+func (tasks *BuildReleaseTasks) addBuildTasks(wd *wf.Definition, major int, version wf.Value[string], source wf.Value[artifact], dryRun bool) wf.Value[[]artifact] {
targets := releasetargets.TargetsForGo1Point(major)
skipTests := wf.Param(wd, wf.ParamDef[[]string]{Name: "Targets to skip testing (or 'all') (optional)", ParamType: wf.SliceShort})
// Artifact file paths.
@@ -503,13 +503,13 @@
result := wf.Task3(wd, "Run advisory TryBot "+bc.Name, tasks.runAdvisoryTryBot, wf.Const(bc), skipTests, source)
advisoryResults = append(advisoryResults, result)
}
- tryBotsApproved := wf.Action1(wd, "Approve any TryBot failures", tasks.checkAdvisoryTrybots, wf.Slice(advisoryResults...))
- if skipSigning {
+ if dryRun {
builtAndTested := wf.Task1(wd, "Wait for artifacts and tests", func(ctx *wf.TaskContext, artifacts []artifact) ([]artifact, error) {
return artifacts, nil
- }, wf.Slice(artifacts...), wf.After(tryBotsApproved), wf.After(testsPassed...))
+ }, wf.Slice(artifacts...), wf.After(wf.Slice(advisoryResults...)), wf.After(testsPassed...))
return builtAndTested
}
+ tryBotsApproved := wf.Action1(wd, "Approve any TryBot failures", tasks.checkAdvisoryTrybots, wf.Slice(advisoryResults...))
stagedArtifacts := wf.Task2(wd, "Stage artifacts for signing", tasks.copyToStaging, version, wf.Slice(artifacts...))
signedArtifacts := wf.Task3(wd, "Wait for signed artifacts", tasks.awaitSigned, version, wf.Const(darwinTargets), stagedArtifacts)
signedAndTested := wf.Task1(wd, "Wait for signing and tests", func(ctx *wf.TaskContext, artifacts []artifact) ([]artifact, error) {