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

Codecov upload failed with reason: connect ENETUNREACH #881

Closed
Wayonb opened this issue Sep 9, 2022 · 2 comments · Fixed by #887
Closed

Codecov upload failed with reason: connect ENETUNREACH #881

Wayonb opened this issue Sep 9, 2022 · 2 comments · Fixed by #887
Assignees
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest Hacktoberfest approved help wanted Extra attention is needed

Comments

@Wayonb
Copy link

Wayonb commented Sep 9, 2022

Describe the bug
Still seeing the issue #742 with latest codecov uploader. I couldnt reopen the issue so I created a new one.
The problem is reproducible when running the uploader tool in our docker images. They are not configure for IPv6 but it seem like the tool is failing to resolve an IPv6 address.
Is there away to force the tool to only use IPv4?

To Reproduce
Steps to reproduce the behavior:

  1. create a code coverage file
  2. mount it into docker volume
    docker run -it --rm -v :/coverage ubuntu:latest bash -c "cd /coverage; codecov --verbose -t f3316886-fc51-4ab5-9c40-a83f32dcf9d0 --nonZero --rootDir . --flags client-catapult -X gcov"

Expected behavior
Not able to upload code coverage info in an ubuntu docker container with the latest tool. With v0.1.20 of the uploader works without an issue.

Additional context

09:38:39  + curl -Os https://uploader.codecov.io/latest/linux/codecov
09:38:40  + chmod +x codecov
09:38:40  + ./codecov --required --root . --flags client-catapult -X gcov --file client_coverage.info
09:38:40  [2022-09-08T13:38:40.501Z] ['info'] 
09:38:40       _____          _
09:38:40      / ____|        | |
09:38:40     | |     ___   __| | ___  ___ _____   __
09:38:40     | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
09:38:40     | |___| (_) | (_| |  __/ (_| (_) \ V /
09:38:40      \_____\___/ \__,_|\___|\___\___/ \_/
09:38:40  
09:38:40    Codecov report uploader 0.3.1
09:38:40  [2022-09-08T13:38:40.507Z] ['info'] => Project root located at: /home/ubuntu/jenkins/workspace/symbol/server-pipelines/catapult-client-build-catapult-project
09:38:40  [2022-09-08T13:38:40.508Z] ['info'] ->  Token found by environment variables
09:38:40  [2022-09-08T13:38:40.733Z] ['info'] Searching for coverage files...
09:38:41  [2022-09-08T13:38:41.009Z] ['info'] Warning: Some files passed via the -f flag would normally be excluded from search.
09:38:41  [2022-09-08T13:38:41.009Z] ['info'] If Codecov encounters issues processing your reports, please review https://docs.codecov.com/docs/supported-report-formats
09:38:41  [2022-09-08T13:38:41.009Z] ['info'] => Found 1 possible coverage files:
09:38:41    catapult-src/client_coverage.info
09:38:41  [2022-09-08T13:38:41.009Z] ['info'] Processing /home/ubuntu/jenkins/workspace/symbol/server-pipelines/catapult-client-build-catapult-project/catapult-src/client_coverage.info...
09:38:41  [2022-09-08T13:38:41.128Z] ['info'] Detected Jenkins CI as the CI provider.
09:38:41  [2022-09-08T13:38:41.136Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.3.1&token=*******&branch=origin%2Fdev&build=3186&build_url=https%3A%2F%2F54.157.239.136%2Fjob%2Fsymbol%2Fjob%2Fserver-pipelines%2Fjob%2Fcatapult-client-build-catapult-project%2F3186%2F&commit=5b381885149d3a7a8d12d15716cb02b2f7143a7c&job=&pr=&service=jenkins&slug=&name=&tag=&flags=client-catapult&parent=
09:38:41  [2022-09-08T13:38:41.653Z] ['info'] https://codecov.io/github/Wayonb/monorepo/commit/5b381885149d3a7a8d12d15716cb02b2f7143a7c
09:38:41  https://storage.googleapis.com/codecov/v4/raw/2022-09-08/2231DFF0284206728389CDD40B33FE1F/5b381885149d3a7a8d12d15716cb02b2f7143a7c/66d0931f-a7e8-464c-b8b7-94a8714b9431.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20220908%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220908T133841Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=7b4991f37737521a5dc92d6cac4baf453bade38e68b9b77c579a6aef348faa49
09:38:41  [2022-09-08T13:38:41.653Z] ['info'] Uploading...
09:38:42  [2022-09-08T13:38:42.689Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: connect ENETUNREACH 2607:f8b0:4004:837::2010:443

.

@drazisil-codecov
Copy link
Contributor

I will research if https://www.npmjs.com/package/undici (the network client we use) supports a way to force IPv4.

@drazisil-codecov drazisil-codecov added the bug Something isn't working label Sep 13, 2022
@drazisil-codecov
Copy link
Contributor

It appers to be an issue where the DNS server is returning a IPv6 result first. nodejs/node#40537

This can be changed by calling https://nodejs.org/docs/latest-v18.x/api/dns.html#dnssetdefaultresultorderorder before we make the network calls here

const response = await request(requestHeaders.url.origin, requestHeaders.options)
and here
const response = await request(requestHeaders.url.origin, requestHeaders.options)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest Hacktoberfest approved help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants