codacy / codacy-coverage-reporter

Multi-language coverage reporter for Codacy
https://www.codacy.com
Other
134 stars 94 forks source link

[CY-3680] Frequent SSL_ERROR_SYSCALL in curl during report upload in get.sh #294

Closed dimas-b closed 3 years ago

dimas-b commented 3 years ago

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

ubuntu:bionic inside docker on Google Cloud Build

JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)

Not relevant the error in in a shell script

Library Dependencies

Not relevant

Expected Behavior

The script from https://coverage.codacy.com/get.sh is invoked several times to process local coverage reports, then once more to do the final upload.

Actual Behavior

During execution of the get.sh script the following error occurs:

curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.bintray.com:443 

Consequently the script is not able to figure out the reporter version and fails as:

Downloading the codacy reporter codacy-coverage-reporter-linux... ()
/home/ubuntu/.cache/codacy/coverage-reporter//codacy-coverage-reporter: line 1: The: command not found

Please note that there's no reporter version inside the parentheses in the log fragment above.

Previous invocations were able to determine the version.

A more complete log fragment is available in https://github.com/stargate/stargate/issues/652

Reproducible Test Case

Happens regularly during Stargate CI.

github-actions[bot] commented 3 years ago

Internal ticket created : CY-3680

lolgab commented 3 years ago

@dimas-b It seems that bintray is rate limiting the api calls. Anyway, we're going to change the place where we store our binaries very soon because of this. As a temporary workaround you can launch the script setting the version manually:

export CODACY_REPORTER_VERSION=11.9.2

Moreover, make sure you cache the ~/.cache/codacy directory to avoid re-downloading the binary every time.

You can customise the cache folder by exporting the CODACY_REPORTER_TMP_FOLDER environment variable.

dimas-b commented 3 years ago

Thanks @lolgab ! We already made a change to pre-determine the reporter version. We are still hitting the "get latest" API, but at most once per test job (see the referenced Stargate issue and PR if you're interested in the specific change). I hope this is good enough to avoid rate limiting.

lolgab commented 3 years ago

We moved our coverage reporter binaries and latest api to our internal bucket, so it should not suffer of this problem anymore. Opened a PR to stargate here: https://github.com/stargate/stargate/pull/708 Closing this issue.