Skip to content

Commit

Permalink
Merge #62027
Browse files Browse the repository at this point in the history
62027: roachtest: handle transient error when downloading bumptime r=ajwerner a=stevendanna

By default, `curl` will return with exit code zero even in cases where
the server returned HTTP 500 or other error codes. This can cause
confusing failures where we "successfully" download a file containing
an error message and then try to compile it.

This adds `--retry 3 --fail --show-error` to the curl command line so
that transient errors are retried automatically and so that they
result in a non-zero exit code if the retries don't work.

We have other invocations of curl that can probably use similar
arguments. 

Release note: None

Co-authored-by: Steven Danna <[email protected]>
  • Loading branch information
craig[bot] and stevendanna committed Mar 17, 2021
2 parents 7d2fcb5 + a7c925c commit 7894414
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd/roachtest/clock_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ func (oi *offsetInjector) deploy(ctx context.Context) error {
if err := oi.c.RunL(ctx, oi.c.l,
oi.c.All(),
"curl",
"--retry", "3",
"--fail",
"--show-error",
"-kO",
"https://raw.githubusercontent.com/cockroachdb/jepsen/master/cockroachdb/resources/bumptime.c",
); err != nil {
Expand Down

0 comments on commit 7894414

Please sign in to comment.