Skip to content

Commit 06f3e93

Browse files
committed
attempt to workaround minio and azureite storage availability problems via retries
1 parent add8925 commit 06f3e93

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

routers/api/actions/artifactsv4.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,15 @@ type Latest struct {
361361

362362
func (r *artifactV4Routes) readBlockList(runID, artifactID int64) (*BlockList, error) {
363363
blockListName := fmt.Sprintf("tmpv4%d/%d-%d-blocklist", runID, runID, artifactID)
364-
s, err := r.fs.Open(blockListName)
364+
// Workaround minio and azureite storage availability problems via retries
365+
var s storage.Object
366+
var err error
367+
for i := 0; i < 5; i++ {
368+
if i != 0 {
369+
time.Sleep(1000)
370+
}
371+
s, err = r.fs.Open(blockListName)
372+
}
365373
if err != nil {
366374
return nil, err
367375
}

0 commit comments

Comments
 (0)