Permission denied while uploading coverage

Description

While uploading coverage results in CircleCI, several “persmission denied” occur which makes the uploading very long.

Commit SHAs

02a29faca441b0220abe7328aa6238cbc0a8a78f

Repository

CI/CD or Build URL

Please provide which CI/CD you are using or a link to the build where coverage is being uploaded.

Uploader

Bash uploader

Codecov Output

  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20201116-eea08d9


==> Circle CI detected.
    project root: .
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
find: ‘./proc/tty/driver’: Permission denied
==> Searching for coverage reports in:
    + .
    -> Found 3 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./usr/share/mime/multipart/report.xml bytes=3492
    + ./opt/conda/bin/coverage-3.7 bytes=394
    + ./coverage.xml bytes=144923
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
find: ‘./proc/tty/driver’: Permission denied
find: ‘./proc/tty/driver’: Permission denied
find: ‘./proc/tty/driver’: Permission denied

    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=migration_to_cq_master&commit=02a29faca441b0220abe7328aa6238cbc0a8a78f&build=1896&build_url=&name=&tag=&slug=ukaea%2Fparamak&service=circleci&flags=&pr=507&job=0&cmd_args=
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20201116-eea08d9&token=secret&branch=migration_to_cq_master&commit=02a29faca441b0220abe7328aa6238cbc0a8a78f&build=1896&build_url=&name=&tag=&slug=ukaea%2Fparamak&service=circleci&flags=&pr=507&job=0&cmd_args=
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-11-19/6369E9A8E2C745189608BF623FDC4CFC/02a29faca441b0220abe7328aa6238cbc0a8a78f/332e5db8-e262-448b-812b-a2bab1369d98.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20201119%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20201119T191243Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=74cc4ac353ba974ba0e37f36d398021494a681e9c1c932a1616bdf24779a61fc
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.8M    0     0  100 11.8M      0  34.3M --:--:-- --:--:-- --:--:-- 34.3M
    -> View reports at https://codecov.io/github/ukaea/paramak/commit/02a29faca441b0220abe7328aa6238cbc0a8a78f
CircleCI received exit code 0

Expected Results

The upload used to take 1s and no permission denied occured

Actual Results

The upload now takes like 3min due to several permission denied errors

@RemDelaporteMathurin, what happens if you try to run with -X fix as an argument to the bash uploader?

@tom that’s what I attempted here but still permission denied occured.

#!/bin/bash -eo pipefail
bash <(curl -s https://codecov.io/bash) -X fix

  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20201116-eea08d9


==> Circle CI detected.
    project root: .
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
find: ‘./proc/tty/driver’: Permission denied
==> Searching for coverage reports in:
    + .
    -> Found 3 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./usr/share/mime/multipart/report.xml bytes=3492
    + ./opt/conda/bin/coverage-3.7 bytes=394
    + ./coverage.xml bytes=144923
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=migration_to_cq_master&commit=6f5695ddc6db9d2ddbf360a02c097b3ecbdeb540&build=1926&build_url=&name=&tag=&slug=ukaea%2Fparamak&service=circleci&flags=&pr=507&job=0&cmd_args=X
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20201116-eea08d9&token=secret&branch=migration_to_cq_master&commit=6f5695ddc6db9d2ddbf360a02c097b3ecbdeb540&build=1926&build_url=&name=&tag=&slug=ukaea%2Fparamak&service=circleci&flags=&pr=507&job=0&cmd_args=X
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-11-20/6369E9A8E2C745189608BF623FDC4CFC/6f5695ddc6db9d2ddbf360a02c097b3ecbdeb540/bd9ff6c6-1b7a-4581-a439-82a9a957b8d5.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20201120%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20201120T111006Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=d060a57593715eca36325813cbd25ca0892dbe8e3c1c66df4eb46cb246df9dfd
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12.4M    0     0  100 12.4M      0  26.5M --:--:-- --:--:-- --:--:-- 26.5M
    -> View reports at https://codecov.io/github/ukaea/paramak/commit/6f5695ddc6db9d2ddbf360a02c097b3ecbdeb540
CircleCI received exit code 0

@RemDelaporteMathurin, would you be able to run this in -v verbose mode?