All requests stuck on processing

Hi, I’ve just started using codecov witch php (symfony) and github actions.

Description

All my requests are getting stuck on processing…

Commit SHAs

d85d16d, 597fef5, c436f1c …

Repository

Private repo
link to codecov pannel

CI/CD or Build URL

name: PHPUNIT tests

on:
  pull_request:
    branches: [dev, main]
  push:
    branches: [dev, main]

jobs:
  tests:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[ci skip]')"

    steps:
      - uses: actions/checkout@v2

      - name: Build and run docker images through docker-compose
        run: docker-compose --profile db up -d

      - name: Validate composer.json and composer.lock
        run: docker exec g4te_php composer validate

      - name: Install composer dependencies and init database through the init script
        run: docker exec g4te_php init.sh

      - name: Runs tests
        run: docker exec g4te_php php phpunit/run_tests.php

      - name: Upload coverage to Codecov
        run: docker exec g4te_php codecov -t ${{ secrets.CODECOV_TOKEN }}

Uploader

Currently using bash but tried before with github actions but it couldn’t retrieve the script …

Codecov Output

  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-1.0.4


==> git version 2.32.0 found
==> curl 7.77.0 (x86_64-alpine-linux-musl) libcurl/7.77.0 OpenSSL/1.1.1k zlib/1.2.11 brotli/1.0.9 nghttp2/1.43.0
Release-Date: 2021-05-26
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
x> No CI provider detected.
    Testing inside Docker? http://docs.codecov.io/docs/testing-with-docker
    Testing with Tox? https://docs.codecov.io/docs/python#section-testing-with-tox
    project root: .
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./clover.xml bytes=42272
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
        36.0K	/tmp/codecov.DIdPLb.gz
==> Uploading reports
    url: https://codecov.io
    query: branch=&commit=d85d16d1248441c371188d49f7f5c0cb2020fb2b&build=&build_url=&name=&tag=&slug=4gate-btc%2F4gate&service=&flags=&pr=&job=&cmd_args=t
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-1.0.4&branch=&commit=d85d16d1248441c371188d49f7f5c0cb2020fb2b&build=&build_url=&name=&tag=&slug=4gate-btc%2F4gate&service=&flags=&pr=&job=&cmd_args=t
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2021-07-14/9B3C8088538D4766F2000231F3DC28C8/d85d16d1248441c371188d49f7f5c0cb2020fb2b/475dfef3-983d-4f45-a125-882de173d980.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20210714%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210714T213906Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=5ca5b5635f800c01d269105628e9877b8ce0674b871bada2e78a2d58b5927e01
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 36158    0     0  100 36158      0   174k --:--:-- --:--:-- --:--:--  175k
    -> Reports have been successfully queued for processing at https://codecov.io/github/4gate-btc/4gate/commit/d85d16d1248441c371188d49f7f5c0cb2020fb2b

Expected Results

Please provide what you expect to have happened (e.g. a file that has missing coverage on a particular line).

Actual Results

Recieved on codecov panel but stuck on processing

Additional Information

None

@MikeDevresse it looks like the coverage report is not in a format we recognize. Can you share how you are generating these reports?

I’m generating those reports with phpunit and xdebug

@MikeDevresse, sorry I meant could you paste the commands you are using?

I run those 3 commands, first two are to run tests (for different configurations) and the last one is to merge the 2 generated clovers, the file that is generated is recognized by phpunit. I’m also pasting the merge script, I found it on stackoverflow.

php -dzend_extension=xdebug -dxdebug.mode=coverage bin/phpunit --coverage-clover phpunit/clover/clover_resources.xml --configuration phpunit/phpunit.xml.dist  --color=always

php -dzend_extension=xdebug -dxdebug.mode=coverage bin/phpunit --coverage-clover phpunit/clover/clover_api.xml --configuration phpunit/phpunit.api.xml  --color=always

php phpunit/clover_merge.php -o clover.xml -f phpunit/clover/clover_resources.xml -f phpunit/clover/clover_api.xml  --color=always
<?php
$options = getopt('f:o:');
if (!isset($options['f'])) {
    echo "Files have to be specified with -f\n";
    exit(1);
}
if (!isset($options['o'])) {
    echo "Output has to be specified with -o\n";
    exit(1);
}

$files = $options['f'];
if (!is_array($files)) {
    $files = array($files);
}
$output = $options['o'];

$buffer = '';
foreach ($files as $file) {
    if (!file_exists($file)) {
        echo "File '$file' doesn't exist\n";
        exit(2);
    }
    $report = simplexml_load_file($file);
    $buffer .= $report->project->asXML();
}

$fh = fopen($output, 'w');
if (!$fh) {
    echo "Cannot open '$output' for writing\n";
    exit(2);
}
fwrite($fh, sprintf('<?xml version="1.0" encoding="UTF-8"?><coverage>%s</coverage>', $buffer));
fclose($fh);

Is there an update for this ticket? I have faced the same issue with a private repository and codecov-ation@v1. But I’m developing with Apex, not PHP

No still no news, I think it could be great if on our codecov panel we can download the coverage file and maybe have a trace of why did it failed, that way we may be able to self fix those problems

1 Like

@MikeDevresse, not sure if it helps you but for me it started working when I use codecov-action@v2 and explicitly provide a files variable to that action.

Finally got it ! I’m now using GitHub - d0x2f/CloverMerge: Utility to merge two or more clover files into a single document. to merge my files, that’s all !

Another problem I got is that I’m using it on my PR workflow too, and when executing the action on PR it says that the commit is on branch dev instead of feature/…, any idea how can I fix that ?

Mhh using the GitHub action I have an error, will still use the script for now

Codecov warning: EACCES: permission denied, open 'codecov.sh'

@MikeDevresse you can override the branch (if you are using the Action it would be override_branch).

Are you able to share more of the output for the GitHub action, and I can see why it’s giving you that error. I don’t think hardcode codecov.sh anywhere.

I get this error when trying to use the github action, previously I managed to make it work by downloading the script and running the command in my github action. Here is the entire output:


with:
3
    token: ***
4
    file: ./clover.xml
5
    flags: tests, phpunit, symfony
6
Warning: Codecov warning: EACCES: permission denied, open 'codecov.sh'
7
/usr/bin/bash codecov.sh -n  -F tests, phpunit, symfony -Q github-action-v1.5.2 -f ./clover.xml -C 33f35365299fb9581b029ec2d99d0bff69d67f70
8
/usr/bin/bash: codecov.sh: No such file or directory
9
Warning: Codecov warning: The process '/usr/bin/bash' failed with exit code 127
10
Warning: Codecov warning: ENOENT: no such file or directory, unlink 'codecov.sh'

@MikeDevresse what happens if you try to use the v2 version of the uploader?

That’s it ! Working perfectly now thank you !

1 Like