Appending adjustments for files outside target directory

Description

(migrated to discussion boards as requested here: "Appending adjustments" takes a long time · Issue #355 · codecov/codecov-bash · GitHub)

I’m seeing a lot of time (~7 minutes) being spent in the “appending adjustments” step when using this with the Codecov GitHub Action. The codebase is quite small (less than 500 lines of Golang).

This time appears to be spent applying adjustments for Golang code outside my code directory (server).

Repository

CI/CD

Sample builds: https://github.com/batect/abacus/runs/1213805213?check_suite_focus=true#step:11:40 and https://github.com/batect/abacus/runs/1213735685?check_suite_focus=true#step:11:40 (compare the timestamps for line 40 with line 41).

Uploader

GitHub Actions

Codecov YAML

None - GitHub Actions workflow looks like this:

      - name: Upload coverage to codecov.io
        uses: codecov/codecov-action@v1.0.13
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          directory: server

Codecov Output

bash codecov.sh -s server -n  -F 

  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20200825-997b141


==> GitHub Actions detected.
    project root: .
--> token set from env
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + server
    -> Found 8 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + server/storage/coverage.txt bytes=1011
    + server/validation/coverage.txt bytes=3963
    + server/middleware/coverage.txt bytes=930
    + server/types/coverage.txt bytes=13
    + server/observability/coverage.txt bytes=1377
    + server/decoding/coverage.txt bytes=77
    + server/api/coverage.txt bytes=3217
    + server/cmd/coverage.txt bytes=2597
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=7ed09d6aea754073cdb2cebb5482c7f37a04eb17&build=241519170&build_url=http%3A%2F%2Fgithub.com%2Fbatect%2Fabacus%2Factions%2Fruns%2F241519170&name=&tag=&slug=batect%2Fabacus&service=github-actions&flags=&pr=&job=&cmd_args=s,n,F
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200825-997b141&token=secret&branch=master&commit=7ed09d6aea754073cdb2cebb5482c7f37a04eb17&build=241519170&build_url=http%3A%2F%2Fgithub.com%2Fbatect%2Fabacus%2Factions%2Fruns%2F241519170&name=&tag=&slug=batect%2Fabacus&service=github-actions&flags=&pr=&job=&cmd_args=s,n,F
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-09-06/C930F5ED6D60D00BF2F4C29AF508777E/7ed09d6aea754073cdb2cebb5482c7f37a04eb17/8ec42be0-c92f-4a2c-9d90-26f01f8f3302.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20200906%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20200906T091901Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=9103f0d8c253d5d098a0ee5a1e67c82b059cbb9b4ae542175fbc642630043eb3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 12.1M    0     0  100 12.1M      0  18.3M --:--:-- --:--:-- --:--:-- 18.3M
    -> View reports at https://codecov.io/github/batect/abacus/commit/7ed09d6aea754073cdb2cebb5482c7f37a04eb17

Thanks @charleskorn, I put in a fix here. I’ll ping back here when it’s merged and deployed.

Awesome, thanks @tom.

@charleskorn, this has been deployed, could you let me know if this fixes the long adjustment?

Yep, that’s way better, the whole Codecov step now takes about 10s. Thanks for your help!

1 Like