Skip to content

Please create a coverage file, many PRs failed because of this. #19931

Closed

Description

@SeasonPanPan

Search before asking

  • I searched in the issues and found nothing similar.

Example failure

https://github.com/apache/pulsar/actions/runs/4507586495/jobs/7968960455?pr=19906

Exception stacktrace

  Codecov report uploader 0.4.0
[2023-03-26T14:20:49.486Z] ['info'] => Project root located at: /home/runner/work/pulsar/pulsar
[2023-03-26T14:20:49.490Z] ['info'] -> No token specified or token is empty
[2023-03-26T14:20:49.490Z] ['verbose'] Start of network processing...
[2023-03-26T14:20:49.491Z] ['verbose'] Searching for files in /home/runner/work/pulsar/pulsar
[2023-03-26T14:20:49.503Z] ['verbose'] coveragepy is not installed
[2023-03-26T14:20:49.503Z] ['info'] Searching for coverage files...
[2023-03-26T14:20:49.976Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-03-26T14:20:49.977Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
**[2023-03-26T14:20:49.977Z] ['error'] There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`**
[2023-03-26T14:20:49.978Z] ['verbose'] The error stack is: Error: No coverage files located, please try use `-f`, or change the project root with `-R`
    at main (/snapshot/repo/dist/src/index.js)
[2023-03-26T14:20:49.978Z] ['verbose'] End of uploader: 501 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

image

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. BewareMyPower commented on Mar 27, 2023

    @BewareMyPower
    Contributor

    My personal answer is to remove it.

  2. lhotari commented on Mar 27, 2023

    @lhotari
    Member

    My personal answer is to remove it.

    Let's discuss the resolution on the mailing list since there's better context. Moving the upload to a separate step is a better solution.

    When the flaky test build job fails, it won't block merging the PR, so this isn't really blocking progress.

  3. lhotari commented on Mar 27, 2023

    @lhotari
    Member

    Upstream issue - https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954

    @lhotari @BewareMyPower @yaalsn shall we remove/disable the codecov step for now?

    Removal isn't an acceptable solution. We can make it optional or disabled for PR builds if someone is having a hard time because of this.

  4. tisonkun commented on Mar 28, 2023

    @tisonkun
    Member

    It seems that we don't create the coverage file. It may be a workflow bug.

  5. yaalsn commented on Mar 28, 2023

    @yaalsn
    Contributor

    Could we use continue-on-error for the flaky test?

  6. tisonkun commented on Mar 28, 2023

    @tisonkun
    Member

    @yaalsn I guess the following steps in the current workflow is already run always:

    - name: Upload to Codecov
    if: ${{ needs.preconditions.outputs.collect_coverage == 'true' }}
    uses: ./.github/actions/upload-coverage
    with:
    flags: unittests
    - name: Publish Test Report
    uses: apache/pulsar-test-infra/action-junit-report@master
    if: ${{ always() }}
    with:
    report_paths: 'test-reports/TEST-*.xml'
    annotate_only: 'true'
    - name: Upload Surefire reports
    uses: actions/upload-artifact@v3
    if: ${{ !success() }}
    with:
    name: Unit-BROKER_FLAKY-surefire-reports
    path: surefire-reports
    retention-days: 7
    - name: Upload possible heap dump
    uses: actions/upload-artifact@v3
    if: ${{ always() }}
    with:
    name: Unit-BROKER_FLAKY-heapdump
    path: /tmp/*.hprof
    retention-days: 7
    if-no-files-found: ignore

  7. lhotari commented on Mar 28, 2023

    @lhotari
    Member

    It seems that we don't create the coverage file. It may be a workflow bug.

    @tisonkun that's right. there seems to be an issue in that.

  8. lhotari commented on Mar 28, 2023

    @lhotari
    Member

    @tisonkun I'm currently experimenting a solution which would be more reliable in dumping the Jacoco coverage data to files, WIP commit lhotari@5bd1b74 . I debugged the problem and the Jacoco execution files were empty. One possible reason for that is that another shutdown hook blocks the shutdown sequence. I've worked around that possible problem by using the JMX API for dumping the Jacoco exec data in a TestNG listener.

  9. lhotari commented on Mar 28, 2023

    @lhotari
    Member

    I created #19947 with a fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions