Ignore does not ignore folders

Description

My file has an ignore part but these files show on codecov.

ignore:
  - "contrib"  # ignore folders and all its contents
  - "rmutil"  # ignore folders and all its contents
  - "tests"  # ignore folders and all its contents

Running the validating tool returned

  "ignore": [
    "^contrib.*", 
    "^rmutil.*", 
    "^tests.*"
  ], 

Repository

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on…]

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]

Flakiness? [Does this happen all the time or only sometimes?]

Versions

Please include the browser and OS and what versions you’re running.

Additional Information

Looking at the dashboard, it seems this behavior may have changed in October 2019 as a big drop can be seen.

1 Like

Hi @ashtul

I suspect something else in the codecov.yml is causing the file to fail.

Can you share a recent commit SHA so I can check our logs for errors parsing?

@drazisil I am having the same issue as @ashtul. Our repo is private so I cannot share it here, but I have tried lot and lots of different ways to ignore the paths that I’m interested in ignoring, and none worked.

I have tried passing multiple directory paths, a single directory path, and a file extension glob (test/**/*.sol). I have double-checked that the CI run is executed correctly, and it is.

This is all what we have in our Codecov config file (codecov.yml at the root of the repo):

ignore:
  - "test"

I have validated the config with your validation API, and I have ensured that our Codecov token stored as a secret is correct - we know that the upload step works because the coverage does get uploaded to your web service.

These are the CI logs:

Click to expand CI logs
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.3.2
[2023-02-06T19:20:38.981Z] ['info'] => Project root located at: /home/runner/work/v2-core/v2-core
[2023-02-06T19:20:38.983Z] ['info'] ->  Token found by environment variables
[2023-02-06T19:20:38.991Z] ['info'] Searching for coverage files...
[2023-02-06T19:20:39.105Z] ['info'] => Found 1 possible coverage files:
  ./lcov.info
[2023-02-06T19:20:39.106Z] ['info'] Processing ./lcov.info...
[2023-02-06T19:20:39.110Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-02-06T19:20:39.112Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token=*******&branch=main&build=4106987010&build_url=https%3A%2F%2Fgithub.com%2Fsablierhq%2Fv2-core%2Factions%2Fruns%2F4106987010&commit=1968f5a9f6d20dde57b1119258d6bfb3039b489c&job=CI&pr=&service=github-actions&slug=sablierhq%2Fv2-core&name=&tag=&flags=&parent=
[2023-02-06T19:20:39.911Z] ['info'] https://app.codecov.io/github/sablierhq/v2-core/commit/1968f5a9f6d20dde57b1119258d6bfb3039b489c
https://storage.googleapis.com/codecov/v4/raw/2023-02-06/CEDBAF0DF18F5DA3EB5C704AAB9743F2/1968f5a9f6d20dde57b1119258d6bfb3039b489c/097d4b6d-5346-41d5-920d-f6014b7a0ec2.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20230206%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20230206T192039Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=e55efdb2a9f532fea03732c5d3b8ebc0cda00a6b4bcab694110efcaf44f6a502
[2023-02-06T19:20:39.912Z] ['info'] Uploading...
[2023-02-06T19:20:40.153Z] ['info'] {"status":"success","resultURL":"https://app.codecov.io/github/sablierhq/v2-core/commit/1968f5a9f6d20dde57b1119258d6bfb3039b489c"}

The test directory still shows up on Codecov …

While our YAML config doesn’t appear in the “Settings” tab:

@PaulRBerg please open a new topic for this.

There is currently a bug with test/**/*.sol type globs. It looks like your issue is that you haven’t set up the Codecov GitHub app integration.

1 Like

Thanks, @tom! Enabling the Codecov app in our GitHub organization fixed this - I can now see the Codecov YAML config picked up and displayed on the Codecov website, and the directories ignored.

However, I don’t see why this has to be a requirement for the Codecov GitHub Action to pick up the config. It might be worth it to mention this in the README - I opened a PR here.

Speaking of test/**/*.sol globs - is it that currently only directory paths can be ignored?

@PaulRBerg the GitHub app is necessary because that’s how Codecov is able to communicate with GitHub after uploads (in order to set statuses, read files like codecov.yml, etc).

I misspoke, the glob issue is actually a slightly different format, yours should be fine. Are you seeing an issue there?

@PaulRBerg also, please open a separate topic for this, as it is not relevant/up-to-date to this one.

Makes sense, thanks!

No! I am using the directory paths as globs and they are working fine.

I would have gladly opened the topic but your previous comments cleared this issue up, there’s nothing else to discuss.

1 Like