Skip to content

Commit 71f77f3

Browse files
authored
Fix flaky AWS CI pipeline (#253)
1 parent ffc20bd commit 71f77f3

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

internal/hammer/loadtest/workers.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,26 +347,30 @@ func (v *MMDVerifier) Run(ctx context.Context) {
347347
Hash: checkpoint.Hash,
348348
}, v.tracker.TileFetcher)
349349
if err != nil {
350-
panic(fmt.Sprintf("Failed to create proof builder: %v", err))
350+
v.errChan <- fmt.Errorf("failed to create proof builder: %v", err)
351+
continue
351352
}
352353
}
353354

354-
// Panic if the following logic hits any error.
355355
ip, err := proofBuilder.InclusionProof(ctx, leafMMD.index)
356356
if err != nil {
357-
panic(fmt.Sprintf("Failed to create inclusion proof: %v", err))
357+
v.errChan <- fmt.Errorf("failed to create inclusion proof: %v", err)
358+
continue
358359
}
359360
certs, err := x509.ParseCertificates(leafMMD.leaf)
360361
if err != nil {
361-
panic(fmt.Sprintf("Failed to parse certificates: %v", err))
362+
v.errChan <- fmt.Errorf("failed to parse certificates: %v", err)
363+
continue
362364
}
363365
entry, err := entryFromChain(certs, false, leafMMD.timestamp)
364366
if err != nil {
365-
panic(fmt.Sprintf("Failed to create entry from chain: %v", err))
367+
v.errChan <- fmt.Errorf("failed to create entry from chain: %v", err)
368+
continue
366369
}
367370
leafHash := entry.MerkleLeafHash(leafMMD.index)
368371
if err := proof.VerifyInclusion(hasher.DefaultHasher, leafMMD.index, checkpoint.Size, leafHash, ip, checkpoint.Hash); err != nil {
369-
panic(fmt.Sprintf("Failed to verify inclusion proof: %v", err))
372+
v.errChan <- fmt.Errorf("failed to verify inclusion proof: %v", err)
373+
continue
370374
}
371375

372376
leafMMD = nil

0 commit comments

Comments
 (0)