503 Service Unavailable errors when uploading reports

Description

We have been getting 503 Service Unavailable errors for the past week when using the GitHub Codecov Action. It happens about 1/100 times.

CI/CD URL

Codecov Output

Run codecov/codecov-action@v2
  with:
    token: e4fdf847-f541-4ab1-9d50-3d27e5913906
    flags: ubuntu_clang_inflate_allow_invalid_dist
    name: Ubuntu Clang Inflate Allow Invalid Dist
    directory: .
    verbose: true
    fail_ci_if_error: true
  env:
    CODECOV_TOKEN: 
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (5b934a2a400d39b73e1db36d8bc285fad42ba4ab6846305c0e10e934afb3d19c  codecov)
==> Running version latest
==> Running version v0.1.20
/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n Ubuntu Clang Inflate Allow Invalid Dist -Q github-action-2.1.0 -Z -F ubuntu_clang_inflate_allow_invalid_dist -C 04c6ecf26d5841a821fe1fc9adb7ced12bc9ade6 -s . -v
[2022-03-27T16:22:05.914Z] ['verbose'] Start of uploader: 1648398125914...
[2022-03-27T16:22:05.916Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.1.20
[2022-03-27T16:22:05.922Z] ['info'] => Project root located at: /home/runner/work/zlib-ng/zlib-ng
[2022-03-27T16:22:05.925Z] ['info'] ->  Token found by environment variables
[2022-03-27T16:22:05.926Z] ['verbose'] Start of network processing...
[2022-03-27T16:22:05.926Z] ['verbose'] Searching for files in /home/runner/work/zlib-ng/zlib-ng
[2022-03-27T16:22:05.930Z] ['info'] Searching for coverage files...
[2022-03-27T16:22:06.016Z] ['info'] Warning: Some files located via search were excluded from upload.
[2022-03-27T16:22:06.017Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2022-03-27T16:22:06.017Z] ['verbose'] Preparing to clean the following coverage paths: .codecov.yaml,coverage.xml
[2022-03-27T16:22:06.017Z] ['info'] => Found 2 possible coverage files:
  .codecov.yaml
  coverage.xml
[2022-03-27T16:22:06.018Z] ['verbose'] End of network processing
[2022-03-27T16:22:06.018Z] ['info'] Processing .codecov.yaml...
[2022-03-27T16:22:06.020Z] ['info'] Processing coverage.xml...
[2022-03-27T16:22:06.035Z] ['info'] Using manual override from args.
[2022-03-27T16:22:06.035Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-03-27T16:22:06.035Z] ['verbose'] -> Using the following env variables:
[2022-03-27T16:22:06.036Z] ['verbose']      GITHUB_ACTION: __codecov_codecov-action
[2022-03-27T16:22:06.036Z] ['verbose']      GITHUB_HEAD_REF: improvements/misc-build-stuff
[2022-03-27T16:22:06.036Z] ['verbose']      GITHUB_REF: refs/pull/1209/merge
[2022-03-27T16:22:06.036Z] ['verbose']      GITHUB_REPOSITORY: zlib-ng/zlib-ng
[2022-03-27T16:22:06.036Z] ['verbose']      GITHUB_RUN_ID: 2048302439
[2022-03-27T16:22:06.037Z] ['verbose']      GITHUB_SERVER_URL: https://github.com
[2022-03-27T16:22:06.037Z] ['verbose']      GITHUB_SHA: 8dc7ba4904b5212bb90bdd7a083af88010ac5250
[2022-03-27T16:22:06.037Z] ['verbose']      GITHUB_WORKFLOW: CI CMake
[2022-03-27T16:22:06.038Z] ['verbose'] Using the following upload parameters:
[2022-03-27T16:22:06.038Z] ['verbose'] branch
[2022-03-27T16:22:06.038Z] ['verbose'] build
[2022-03-27T16:22:06.038Z] ['verbose'] buildURL
[2022-03-27T16:22:06.038Z] ['verbose'] commit
[2022-03-27T16:22:06.038Z] ['verbose'] job
[2022-03-27T16:22:06.039Z] ['verbose'] pr
[2022-03-27T16:22:06.039Z] ['verbose'] service
[2022-03-27T16:22:06.039Z] ['verbose'] slug
[2022-03-27T16:22:06.039Z] ['verbose'] name
[2022-03-27T16:22:06.039Z] ['verbose'] tag
[2022-03-27T16:22:06.039Z] ['verbose'] flags
[2022-03-27T16:22:06.039Z] ['verbose'] parent
[2022-03-27T16:22:06.041Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.20&token=*******&branch=improvements%2Fmisc-build-stuff&build=2048302439&build_url=https%3A%2F%2Fgithub.com%2Fzlib-ng%2Fzlib-ng%2Factions%2Fruns%2F2048302439&commit=04c6ecf26d5841a821fe1fc9adb7ced12bc9ade6&job=CI+CMake&pr=1209&service=github-actions&slug=zlib-ng%2Fzlib-ng&name=Ubuntu+Clang+Inflate+Allow+Invalid+Dist&tag=&flags=ubuntu_clang_inflate_allow_invalid_dist&parent=
[2022-03-27T16:22:06.041Z] ['verbose'] Passed token was 36 characters long
[2022-03-27T16:22:06.041Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.20&branch=improvements%2Fmisc-build-stuff&build=2048302439&build_url=https%3A%2F%2Fgithub.com%2Fzlib-ng%2Fzlib-ng%2Factions%2Fruns%2F2048302439&commit=04c6ecf26d5841a821fe1fc9adb7ced12bc9ade6&job=CI+CMake&pr=1209&service=github-actions&slug=zlib-ng%2Fzlib-ng&name=Ubuntu+Clang+Inflate+Allow+Invalid+Dist&tag=&flags=ubuntu_clang_inflate_allow_invalid_dist&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2022-03-27T16:22:07.131Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 503 - Service Unavailable - upstream connect error or disconnect/reset before headers. reset reason: connection failure
[2022-03-27T16:22:07.132Z] ['verbose'] The error stack is: Error: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 503 - Service Unavailable - upstream connect error or disconnect/reset before headers. reset reason: connection failure
    at main (/snapshot/repo/dist/src/index.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-03-27T16:22:07.132Z] ['verbose'] End of uploader: 1218 milliseconds

Expected Results

We expect the reports to be uploaded every time or at least for it to retry multiple times instead of failing the CI.

Actual Results

The CI fails.

@nmoinvaz GitHub was having some issues here. Does this seem to correlate with the time and errors? Are you still getting the issue?