Trying to introduce flags triggers error on processing reports

Description

Adding flags to an existing working codecov installation triggers a processing reports error.

Commit SHAs

Repository

CI/CD or Build URL

Uploader

The individual workflows continue to the python and node uploaders as before, I only addded the -F arguments to add the respective flags.

Codecov Output

  _____          _  
 / ____|        | |  
| |     ___   __| | ___  ___ _____   __  
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /  
| |___| (_) | (_| |  __/ (_| (_) \ V /  
 \_____\___/ \__,_|\___|\___\___/ \_/  
                                v3.8.1
==> Detecting CI Provider
    GitHub Actions CI Detected
==> Configuration: 
    Endpoint: https://codecov.io
{
  commit: '39181d407eb274bec24d34335ab4d0ba9311b3eb',
  branch: 'flags',
  package: 'node-v3.8.1'
}
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
    $ find /home/runner/work/pontoon/pontoon -type f -name '*.gcno'  -exec gcov  {} +
    Failed to run gcov command.
==> Scanning for reports
    + /home/runner/work/pontoon/pontoon/frontend/coverage/lcov.info
    + /home/runner/work/pontoon/pontoon/frontend/coverage/clover.xml
==> Uploading reports
    Success!
    View report at: https://codecov.io/github/mozilla/pontoon/commit/0f533f02c9239eed33becff841fd8f014eaf50d9

Expected Results

Processed four reports

Actual Results

No reports shown on the PR

Additional Information

I locally verified the yml via

curl --data-binary @.codecov.yml https://codecov.io/validate
Valid!

{
  "comment": false,
  "flags": {
    "backend": {
      "paths": [
        "(?s:/pontoon/.*\\.py.*)\\Z"
      ],
      "carryforward": true
    },
    "frontend": {
      "paths": [
        "^/frontend/.*"
      ],
      "carryforward": true
    },
    "non-frontend-js": {
      "paths": [
        "(?s:/tests/.*\\.js.*)\\Z",
        "^/pontoon/static/js/.*"
      ],
      "carryforward": true
    }
  }
}

@Pike, I wonder if this has to do with the paths. Would you be able to remove them from the yaml and see if that works for you? We can see if it’s something there if you get a comment/report afterwards.

1 Like

Thanks, I commented out the paths, and that reports allright.

Would that work carrying test results forward w/out specifying the paths?

@Pike, I’m glad that worked out for you. I’d like to get to the bottom of this if you don’t mind. Would you be able to share a SHA if you add back in say the backend paths?

No problem, Code coverage done right. reproduces again.

@Pike sorry I’m either reading this wrong or I wasn’t clear, would it be possible to only add paths for one of the flags?

HI @tom , updated the PR for Code coverage done right..

It has paths just for the backend flag. Here’s what I see right now:
No obvious error as before, three coverage assets are up. But I don’t see the results for the python tests on Code coverage done right., some 15 minutes after the asset upload.

@Pike, I made a code suggestion here. I think it might be the starting backslash.

Seems the leading / was indeed the problem. @tom, do the results look like they should to you, too?

1 Like

@Pike, looks good to me! Let me know if you are running into anything else strange.

As a follow-up, would it make sense for the validator to catch issues like this?

@Pike, I lost a little context (our logs don’t go back to the original issue), but there are instances where having the ‘/’ is ok. I don’t think we can strictly validate against it.