Could not resolve host

Description

Getting all kinds of errors related to “could not resolve host”.

==> Uploading reports
    url: https://codecov.io
    query: branch=codecov&commit=d05b5bcb1fd5a25d2497e3f4b4bd7fd491ab4600&build=&build_url=&name=&tag=&slug=************.dkr.ecr.*********.amazonaws.com%2F&service=docker&flags=&pr=&job=&cmd_args=f
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200707-353aa93&token=secret&branch=codecov&commit=d05b5bcb1fd5a25d2497e3f4b4bd7fd491ab4600&build=&build_url=&name=&tag=&slug=************.dkr.ecr.*********.amazonaws.com%2F&service=docker&flags=&pr=&job=&cmd_args=f
->  Uploading to
<!DOCTYPE html>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: <!DOCTYPE html>
    X> Failed to upload
    -> Sleeping for 30s and trying again...
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200707-353aa93&token=secret&branch=codecov&commit=d05b5bcb1fd5a25d2497e3f4b4bd7fd491ab4600&build=&build_url=&name=&tag=&slug=************.dkr.ecr.*********.amazonaws.com%2F&service=docker&flags=&pr=&job=&cmd_args=f
->  Uploading to
<!DOCTYPE html>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: <!DOCTYPE html>
    X> Failed to upload
    -> Sleeping for 30s and trying again...
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200707-353aa93&token=secret&branch=codecov&commit=d05b5bcb1fd5a25d2497e3f4b4bd7fd491ab4600&build=&build_url=&name=&tag=&slug=************.dkr.ecr.*********.amazonaws.com%2F&service=docker&flags=&pr=&job=&cmd_args=f
->  Uploading to
<!DOCTYPE html>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: <!DOCTYPE html>
    X> Failed to upload
    -> Sleeping for 30s and trying again...
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200707-353aa93&token=secret&branch=codecov&commit=d05b5bcb1fd5a25d2497e3f4b4bd7fd491ab4600&build=&build_url=&name=&tag=&slug=************.dkr.ecr.*********.amazonaws.com%2F&service=docker&flags=&pr=&job=&cmd_args=f
->  Uploading to
<!DOCTYPE html>
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: <!DOCTYPE html>
    X> Failed to upload
    -> Sleeping for 30s and trying again...
==> Uploading to Codecov
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100 62580  100    66  100 62514    313   290k --:--:-- --:--:-- --:--:--  290k
    HTTP 400
slug must match pattern ^[\w\-\.\~\/]+\/[\w\-\.]{1,255}$

Repository

private

CI/CD

circleci

Uploader

Bash uploader

Commit SHAs

Please include the commit SHA(s)

Codecov YAML

Please include the codecov.yml as code

Codecov Output

Please provide the full output of running the uploader on your CI/CD

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@toymachiner62, are you passing in a slug? It is failing validation of the regex ^[\w\-\.\~\/]+\/[\w\-\.]{1,255}$

No not explicitly. I’m not even sure how to set a slug using the bash uploader.

Here’s the command i’m using

bash <(curl -s https://codecov.io/bash) -f $f;

Hi @toymachiner62, are you running inside a Docker container? If so, I think you will need to run the env script described here in order to properly set the slug.

It’s a circleci build so I believe it’s running in a docker container.

commands:
  format-coverage:
    description: "Upload Coverage"
    steps:
      - run:
          name: Upload Coverage
          command: |
            ls ./packages/*/coverage/lcov.info || exit 0
            for f in ./packages/*/coverage/lcov.info; do
                  bash <(curl -s https://codecov.io/bash) -f $f;
            done;
          when: always
...
jobs:
  test:
    resource_class: xlarge
    parallelism: 12
    docker:
      - image: circleci/node:12.16.2-stretch
    steps:
      - attach_workspace:
          at: .
      - run:
          command: |
              yarn test --coverage --ci --detectOpenHandles --reporters=default --reporters=jest-junit --maxWorkers=8 --testTimeout=10000
      - format-coverage

I’m not entirely sure how to use the suggestion https://docs.codecov.io/docs/testing-with-docker#codecov-inside-docker in this particular case.

Is there a way to just manually set that slug to the repo name or something?

Looking at the source code for the bash uploader, i’m able to set it in my codecov.yml file. That seemed to solve my issue.

1 Like