You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/relui: join announcement mail and tweet tasks in one workflow
Now that both workflows and their tasks are ready, we can combine them
into one workflow. Keep the old separate ones a bit longer, until we
get some experience using the new ones.
This removes the need to manually copy the AnnouncementURL output from
the the mail workflow into the tweet workflow, since a unified workflow
can do that automatically for us.
Fixesgolang/go#47406.
Change-Id: Ie929e5ee2927e74547c1ef4cccc370874420559c
Reviewed-on: https://go-review.googlesource.com/c/build/+/413534
Reviewed-by: Alex Rakoczy <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Run-TryBot: Dmitri Shuralyov <[email protected]>
// Proceeding would risk sending a duplicate email, so error out instead.
138
138
returnSentMail{}, fmt.Errorf("stopping early due to error checking for an existing Google Groups thread: %v", err)
139
139
} elseifthreadURL!="" {
140
-
// TODO(go.dev/issue/47406): Once this task is a part of a larger workflow (which may need
141
-
// to tolerate resuming, restarting, and so on), the case of the matching subject already
142
-
// being there should become considered as "success, keep going" rather than "error, stop".
143
-
returnSentMail{}, fmt.Errorf("a Google Groups thread with matching subject %q already exists at %q, stopping", m.Subject, threadURL)
140
+
// This should never happen since this task runs once per release.
141
+
// It can happen under unusual circumstances, for example if the task crashes after
142
+
// mailing but before completion, or if parts of the release workflow are restarted,
143
+
// or if a human mails the announcement email manually out of band.
144
+
//
145
+
// So if we see that the email exists, consider it as "task completed successfully"
146
+
// and pretend we were the ones that sent it, so the high level workflow can keep going.
147
+
iflog:=ctx.Logger; log!=nil {
148
+
log.Printf("a Google Groups thread with matching subject %q already exists at %q, so we'll consider that as it being sent successfully", m.Subject, threadURL)
149
+
}
150
+
returnSentMail{m.Subject}, nil
144
151
}
145
152
146
153
// Send the announcement email to the destination mailing lists.
0 commit comments