-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Retry to curl to codecov.io unfortunately #8263
Conversation
CODECOV_ENVS=$(CI=true bash <(curl -s https://codecov.io/env)) | ||
# Unfortunately, codecov.io fails sometimes: | ||
# curl: (7) Failed to connect to codecov.io port 443: Connection timed out | ||
CODECOV_ENVS=$(CI=true bash <(while ! curl -sS --retry 5 --retry-delay 2 --retry-connrefused https://codecov.io/env; do sleep 10; done)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once curl starts to provide --retry-flaky
, the while
won't be needed.... curl/curl#4558
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intended fail-over behavior confirmed: https://buildkite.com/solana-labs/solana/builds/18943#d058e016-9bc2-424c-a48f-e30e626a1b74/70-75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats! The upstream curl
finally added --retry-all-errors
. Still ubuntu haven't updated it even in the groovy
release channel, though. We just have to wait more 1.5 years for the next LTS (at least?).
https://curl.haxx.se/changes.html#7_71_0
https://daniel.haxx.se/blog/2020/06/24/curl-7-71-0-blobs-and-retries/
https://curl.haxx.se/docs/manpage.html#--retry-all-errors
CI=true bash <(curl -s https://codecov.io/bash) -X gcov -f target/cov/lcov.info | ||
# Unfortunately, codecov.io fails sometimes: | ||
# curl: (7) Failed to connect to codecov.io port 443: Connection timed out | ||
CI=true bash <(while ! curl -sS --retry 5 --retry-delay 2 --retry-connrefused https://codecov.io/bash; do sleep 10; done) -Z -X gcov -f target/cov/lcov.info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Z
is added... (emphasis mine):
-Z Exit with 1 if not successful. Default will Exit with 0
Codecov Report
@@ Coverage Diff @@
## master #8263 +/- ##
========================================
+ Coverage 80.6% 80.6% +<.1%
========================================
Files 253 253
Lines 55225 55225
========================================
+ Hits 44528 44529 +1
+ Misses 10697 10696 -1 |
@mvines I'm merging this as this is rather minor and want to fix early as much as possible; post merge reviews are welcome! :) |
@Mergifyio refresh |
Command |
automerge (cherry picked from commit bd25705)
problem
codecov's infrastracture has severe problem:
Ultimately, this causes coverage report upload to fail.
That's because the needed environment variables are not passed to the docker container correctly. This is caused by the silent failure of
curl
-ing the codecov-provided script.Usually, docker arguments are populated like this.
solution
Retry very hard.
Even
curl --retry
isn't enough...