@@ -423,8 +423,9 @@ func addSingleReleaseWorkflow(
423
423
tagged := wf .Action2 (wd , "Tag version" , version .TagRelease , nextVersion , tagCommit , wf .After (okayToTagAndPublish ))
424
424
uploaded := wf .Action1 (wd , "Upload artifacts to CDN" , build .uploadArtifacts , signedAndTestedArtifacts , wf .After (tagged ))
425
425
uploadedMods := wf .Action2 (wd , "Upload modules to CDN" , build .uploadModules , nextVersion , modules , wf .After (tagged ))
426
+ availableOnProxy := wf .Action2 (wd , "Wait for modules on proxy.golang.org" , build .awaitProxy , nextVersion , modules , wf .After (uploadedMods ))
426
427
pushed := wf .Action3 (wd , "Push issues" , milestone .PushIssues , milestones , nextVersion , kindVal , wf .After (tagged ))
427
- versionPublished = wf .Task2 (wd , "Publish to website" , build .publishArtifacts , nextVersion , signedAndTestedArtifacts , wf .After (uploaded , uploadedMods , pushed ))
428
+ versionPublished = wf .Task2 (wd , "Publish to website" , build .publishArtifacts , nextVersion , signedAndTestedArtifacts , wf .After (uploaded , availableOnProxy , pushed ))
428
429
if kind == task .KindMajor {
429
430
goimportsCL := wf .Task2 (wd , fmt .Sprintf ("Mail goimports CL for 1.%d" , major ), version .CreateUpdateStdlibIndexCL , coordinators , versionPublished )
430
431
goimportsCommit := wf .Task2 (wd , "Wait for goimports CL submission" , version .AwaitCL , goimportsCL , wf .Const ("" ))
@@ -559,6 +560,7 @@ type BuildReleaseTasks struct {
559
560
GCSClient * storage.Client
560
561
ScratchURL , ServingURL string // ScratchURL is a gs:// or file:// URL, no trailing slash. E.g., "gs://golang-release-staging/relui-scratch".
561
562
DownloadURL string
563
+ ProxyPrefix string // ProxyPrefix is the prefix at which module files are published, e.g. https://proxy.golang.org/golang.org/toolchain/@v
562
564
PublishFile func (* task.WebsiteFile ) error
563
565
CreateBuildlet func (context.Context , string ) (buildlet.RemoteClient , error )
564
566
SignService sign.Service
@@ -1237,7 +1239,7 @@ func (tasks *BuildReleaseTasks) uploadModules(ctx *wf.TaskContext, version strin
1237
1239
}
1238
1240
want := map [string ]bool {} // URLs we're waiting on becoming available.
1239
1241
for _ , mod := range modules {
1240
- base := fmt . Sprintf ( "v0.0.1-%v.%v-%v" , version , mod .Target . GOOS , mod . Target . GOARCH )
1242
+ base := task . ToolchainModuleVersion ( mod .Target , version )
1241
1243
if err := uploadFile (scratchFS , servingFS , mod .ZipScratch , fmt .Sprintf (base + ".zip" )); err != nil {
1242
1244
return err
1243
1245
}
@@ -1255,6 +1257,16 @@ func (tasks *BuildReleaseTasks) uploadModules(ctx *wf.TaskContext, version strin
1255
1257
return err
1256
1258
}
1257
1259
1260
+ func (tasks * BuildReleaseTasks ) awaitProxy (ctx * wf.TaskContext , version string , modules []moduleArtifact ) error {
1261
+ want := map [string ]bool {}
1262
+ for _ , mod := range modules {
1263
+ url := fmt .Sprintf ("%v/%v.info" , tasks .ProxyPrefix , task .ToolchainModuleVersion (mod .Target , version ))
1264
+ want [url ] = true
1265
+ }
1266
+ _ , err := task .AwaitCondition (ctx , 30 * time .Second , checkFiles (ctx , want ))
1267
+ return err
1268
+ }
1269
+
1258
1270
func checkFiles (ctx context.Context , want map [string ]bool ) func () (int , bool , error ) {
1259
1271
found := map [string ]bool {}
1260
1272
return func () (int , bool , error ) {
0 commit comments