Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 upgrade - can't get coverage to show up - unusable report error #1284

Open
ldemailly opened this issue Feb 9, 2024 · 13 comments
Open

v4 upgrade - can't get coverage to show up - unusable report error #1284

ldemailly opened this issue Feb 9, 2024 · 13 comments

Comments

@ldemailly
Copy link

Also note that failure "passes" the build which... avoids that this is blocking but also defeats the point of checking coverage

Newest error:

==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA2[5](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:6)[6](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:7)SUM
==> Running version latest
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED[7](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:8)79[8](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:9)6[9](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:10): public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: Signature made Fri Feb  2 14:15:33 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
==> Uploader SHASUM verified ([10](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:11)3bfefcc56f76473179e600b96eb8150b0f349ad94836b0f63f03ffac469ad7  codecov)
==> Running version v0.4.6
==> Running command '/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov create-commit -C 88cbb9365d06f05d152266366aff6846ed9c98d9
info - 2024-02-09 19:26:34,407 -- ci service found: github-actions
info - 2024-02-09 19:26:34,637 -- Process Commit creating complete
==> Running command '/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov create-report -C 88cbb9365d06f05d152266366aff6846ed9c98d9
info - 2024-02-09 19:26:35,358 -- ci service found: github-actions
info - 2024-02-09 19:27:35,5[14](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:15) -- Process Report creating complete
error - 2024-02-09 19:27:35,514 -- Report creating failed: 
error - 2024-02-09 19:27:35,514 -- <html><head>
error - 2024-02-09 19:27:35,514 -- <meta http-equiv="content-type" content="text/html;charset=utf-8">
error - 2024-02-09 19:27:35,514 -- <title>502 Server Error</title>
error - 2024-02-09 19:27:35,514 -- </head>
error - 2024-02-09 19:27:35,514 -- <body text=#000000 bgcolor=#ffffff>
error - 2024-02-09 19:27:35,514 -- <h1>Error: Server Error</h1>
error - 2024-02-09 19:27:35,514 -- <h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
error - 2024-02-09 19:27:35,514 -- <h2></h2>
error - 2024-02-09 19:27:35,514 -- </body></html>
==> Running command '/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov do-upload -C 88cbb9365d06f05d[15](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:16)2266366aff6846ed9c98d9
info - 2024-02-09 [19](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:20):27:36,228 -- ci service found: github-actions
warning - [20](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:21)24-02-09 19:27:36,[23](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:24)8 -- xcrun is not installed or can't be found.
warning - 20[24](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:25)-02-09 19:27:36,241 -- No gcov data found.
warning - 2024-02-09 19:27:36,241 -- coverage.py is not installed or can't be found.
info - 2024-02-09 19:27:36,[25](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:26)3 -- Found 1 coverage files to upload
info - 2024-02-09 19:[27](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:28):[36](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:37),254 -- > /home/runner/work/fortio/fortio/coverage.txt
info - 2024-02-09 19:27:36,[48](https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886#step:5:49)6 -- Process Upload complete
error - 2024-02-09 19:27:36,486 -- Upload failed: ["Report not found"]

https://github.com/fortio/fortio/actions/runs/7848651386/job/21420245264?pr=886

and earlier:

==> Running command '/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov do-upload -C 9b2decb579a5ed5caba1d3f066f84caf6ba72717
info - 2024-02-05 23:31:53,068 -- ci service found: github-actions
warning - 2024-02-05 23:31:53,079 -- xcrun is not installed or can't be found.
warning - 2024-02-05 23:31:53,081 -- No gcov data found.
warning - 2024-02-05 23:31:53,081 -- coverage.py is not installed or can't be found.
info - 2024-02-05 23:31:53,094 -- Found 1 coverage files to upload
info - 2024-02-05 23:31:53,094 -- > /home/runner/work/fortio/fortio/coverage.txt
info - 2024-02-05 23:31:53,[34](https://github.com/fortio/fortio/actions/runs/7792239057/job/21249853540?pr=886#step:5:35)3 -- Your upload is now processing. When finished, results will be available at: https://app.codecov.io/github/fortio/fortio/commit/9b2decb579a5ed5caba1d3f066f84caf6ba72717
info - 2024-02-05 23:31:53,6[37](https://github.com/fortio/fortio/actions/runs/7792239057/job/21249853540?pr=886#step:5:38) -- Process Upload complete

unusable report

Screenshot 2024-02-05 at 3 56 45 PM

but then that gives

Originally posted by @ldemailly in #1248 (comment)

@ldemailly ldemailly changed the title v4 upgrade - can't get coverage to show up v4 upgrade - can't get coverage to show up - unusable report error Feb 9, 2024
@ldemailly
Copy link
Author

@ldemailly
Copy link
Author

Thoughts?

@rohan-at-sentry
Copy link

@ldemailly taking a look

@ldemailly
Copy link
Author

ping? https://app.codecov.io/gh/fortio/fortio/commits dropped to 0% as a result

@ldemailly
Copy link
Author

ldemailly commented Mar 6, 2024

Another one despite using 4.0.2 of the action:

https://app.codecov.io/github/fortio/fortio/commit/a3a4496ae4f8dfc42ba9577d49f44537f00a30aa

seems the issue is a mix of plain text and compressed coverage in the report:

[...] , 386, 387, 394, 398, 399, 400, 401, 406, 407, 410, 411, 414, 415, 419, 420, 422, 423, 424, 425, 430, 436, 437, 438, 440, 444, 454, 455, 460, 462, 463, 464, 468, 471, 476, 479, 485, 488, 489, 494, 497]}, "version/version.go": {"eof": null, "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 21, 23, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 42, 43, 44, 45, 48, 49, 50, 51, 54]}}}, "network_files": [".circleci/config.yml", ".circleci/coverage.sh", ".github/dependabot.yml", ".github/workflows/codecov.yml", ".github/workflows/codeql-analysis.yml", ".github/workflows/main.yml", ".github/workflows/manual-build.yml", ".github/workflows/test.yml", ".gitignore", ".golangci.yml", ".testdata/payloadTest1.txt", "CONTRIBUTING.md", "Dockerfile", "Dockerfile.build", "Dockerfile.echosrv", "Dockerfile.fcurl", "LICENSE", "Makefile", "README.md", "SECURITY.md", "Webtest.sh", "bincommon/commonflags.go", "cert-gen", "cli/fortio_main.go", "cli_test.go", "cli_test.txtar", "codecov.yml", "debian/changelog", "debian/compat", "debian/control", "debian/copyright", "debian/rules", "debian/source/format", "debian/source/lintian-overrides", "dflag/README.md", "dflag/dflag.go", "docs/fortio-logo-color.png", "docs/fortio-logo.gvdesign", "docs/fortio-logo.svg", "docs/fortio.1", "echosrv/echo.go", "fcurl/fcurl.go", "fgrpc/grpcrunner.go", "fgrpc/grpcrunner_test.go", "fgrpc/ping.pb.go", "fgrpc/ping.proto", "fgrpc/pingsrv.go", "fgrpc/pingsrv_test.go", "fhttp/http_client.go", "fhttp/http_forwarder.go", "fhttp/http_forwarder_test.go", "fhttp/http_loglevel_test.go", "fhttp/http_server.go", "fhttp/http_test.go", "fhttp/http_utils.go", "fhttp/httprunner.go", "fhttp/httprunner_test.go", "fhttp/https_server_test.go", "fnet/network.go", "fnet/network_norace_test.go", "fnet/network_stdin_test.go", "fnet/network_test.go", "go.mod", "go.sum", "histogram/main.go", "jrpc/jrpcClient.go", "jrpc/jrpcServer.go", "jrpc/jrpc_test.go", "log/logger.go", "main.go", "metrics/Makefile", "metrics/metrics.go", "metrics/prometheus.yml", "periodic/periodic.go", "periodic/periodic_loglevel_test.go", "periodic/periodic_test.go", "rapi/data.go", "rapi/restHandler.go", "rapi/restHandler_test.go", "release/.gitignore", "release/Dockerfile.in", "release/Makefile.dist", "release/README.md", "release/bumpRelease.sh", "release/ffpm.sh", "release/release.sh", "release/updateFlags.sh", "stats/stats.go", "stats/stats_test.go", "tcprunner/tcprunner.go", "tcprunner/tcprunner_test.go", "udprunner/udprunner.go", "udprunner/udprunner_test.go", "ui/static/css/fortio.css", "ui/static/img/favicon.ico", "ui/static/img/fortio-logo-gradient-no-bg.svg", "ui/static/img/fortio-logo-white-bg.svg", "ui/static/img/fortio-logo-white-on-gradient.svg", "ui/static/img/fortio-logo.svg", "ui/static/img/logo.svg", "ui/static/js/Chart.min.js", "ui/static/js/fortio_chart.js", "ui/templates/browse.html", "ui/templates/header.html", "ui/templates/main.html", "ui/templates/sync.html", "ui/uihandler.go", "version/version.go"], "coverage_files": [{"filename": "/home/runner/work/fortio/fortio/coverage.txt", "format": "base64+compressed", "data": "eJylnc22LDeOnef1FPcBYmUF/8maeuK5H8BLltRl2VWS1i1V9+sbe4N5TpxMMhOQBx1H1Su+i0gGgz8gsPGXf/72089/+/bDH7/985cf//Ifv33/45ffbr99//tf9T//+s8ffvn19vff/hbjLaQj5lv8Fr6dr25st9COdMqN8Vv+y5d//v/7fzyb/Y+/f//9x7/i8v3fv/7683c8Qo63Mo6cby3LM4QzWzkQR67yA4Qr1YoBOHK/ZWmaaIXGLR3lvHU8YrE+YQm3fpR0S2IpdyskL+0o5ZZOtob1CUkcpd1G55s0Urj/KIONYYVqkCes6Rbqt+R4QhJHLWyOVZ9cQhW25JV1gey2er+FMxxD2j5/K99CjtYfR+QY+pTd+pgDj4nLicd0WANyjE5r4TzN9rr0LPmFt1DkHdjtKSJkvqEnp2o1GE78wnA2vPXo+YnKHCEE+ZHpWzVzIcJiSLeCHh0cz0pGUH2JLpK/ [...]

@ldemailly
Copy link
Author

@ldemailly
Copy link
Author

ldemailly commented Mar 6, 2024

ps: wanted to downgrade to v3 meanwhile but getting

[2024-03-06T12:12:34.707Z] ['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: 404 - {'detail': ErrorDetail(string='Could not find a repository associated with upload token ***', code='not_found')}

my CODECOV_TOKEN works with v4 (well however much v4 works)

ldemailly added a commit to fortio/fortio that referenced this issue Mar 6, 2024
* switch to go 1.21.8 and prep for 1.63.4

* revert codecov action to v3 until codecov/codecov-action#1284 is fixed
@ldemailly
Copy link
Author

@rohan-at-sentry I hope everything is ok with you - any update?

@rohan-at-sentry
Copy link

@ldemailly my apologies - This dropped of my radar!

@thomasrockhu @drazisil-codecov can you help out here?

@thomasrockhu
Copy link
Contributor

@thomasrockhu-codecov

@thomasrockhu-codecov
Copy link
Contributor

thomasrockhu-codecov commented Mar 22, 2024

@ldemailly, apologies, I'm not quite understanding the issue right now. Is it that when you bump to v4 that you are getting an unusable report error?

We have since made some changes to the underlying CLI, would you be able to try it again?

@ldemailly
Copy link
Author

I changed how I gather coverage, I used to do it package by package this way:

#!/usr/bin/env bash

set -e
echo "" > coverage.txt
rm -f profile.out

for d in $(go list ./... | grep -v vendor); do
    echo "### Working on package coverage $d"
    go test -coverprofile=profile.out -covermode=atomic $d
    if [ -f profile.out ]; then
        cat profile.out >> coverage.txt
        rm profile.out
    fi
done

and maybe that was creating the mix up above, or you fixed something because now it works with my simpler/more direct coverage

This being said... I'd rather not have to change a dozen repos to add

        token: ${{ secrets.CODECOV_TOKEN }}

why is that now (in v4) needed for public repos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants