Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] Unexpected IsADirectoryError when uploading coverage #1303

Closed
louwers opened this issue Feb 23, 2024 · 5 comments · Fixed by codecov/codecov-cli#430
Closed

[v4] Unexpected IsADirectoryError when uploading coverage #1303

louwers opened this issue Feb 23, 2024 · 5 comments · Fixed by codecov/codecov-cli#430
Assignees

Comments

@louwers
Copy link

louwers commented Feb 23, 2024

Ever since upgrading to v4 we are seeing this error, with coverage uploading failing.

Traceback (most recent call last):
  File "codecov_cli/main.py", line 81, in <module>
  File "codecov_cli/main.py", line 77, in run
  File "click/core.py", line 1157, in __call__
  File "click/core.py", line 1078, in main
  File "click/core.py", line 1688, in invoke
  File "click/core.py", line 1434, in invoke
  File "click/core.py", line 783, in invoke
  File "click/decorators.py", line 33, in new_func
  File "codecov_cli/commands/upload.py", line 243, in do_upload
  File "codecov_cli/services/upload/__init__.py", line 71, in do_upload_logic
  File "codecov_cli/services/upload/upload_collector.py", line 167, in generate_upload_data
  File "codecov_cli/services/upload/upload_collector.py", line 100, in _produce_file_fixes_for_network
  File "codecov_cli/services/upload/upload_collector.py", line 114, in _get_file_fixes
IsADirectoryError: [Errno 21] Is a directory: 'vendor/earcut.hpp'

This directory is a submodule that is not checked out. But it should not affect coverage uploading.

There is just one file to be uploaded, which it correctly identifies (I am using the files field with disable_search):

info - 2024-02-23 22:07:00,416 -- Found 1 coverage files to upload
info - 2024-02-23 22:07:00,416 -- > /home/runner/work/maplibre-native/maplibre-native/_coverage_report.dat
@louwers louwers changed the title [v4] IsADirectoryError [v4] Unexpected IsADirectoryError when uploading coverage Feb 23, 2024
@thomasrockhu-codecov
Copy link
Contributor

@louwers can you provide how you are running the Codecov Action?

@louwers
Copy link
Author

louwers commented Feb 27, 2024

@thomasrockhu-codecov

Here is the entire workflow:

name: upload-coverage

on:
  workflow_run:
    workflows: [linux-ci]
    types:
      - completed

jobs:
  upload-coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: ./.github/actions/download-workflow-run-artifact
        with:
          artifact-name: coverage-report
          expect-files: "_coverage_report.dat"

      - name: Upload coverage report
        if: '!cancelled()'
        uses: codecov/codecov-action@v4
        with:
          override_commit: ${{ github.event.workflow_run.head_sha }}
          override_pr: ${{ github.event.workflow_run.pull_requests[0].number }}
          token: ${{ secrets.CODECOV_TOKEN }}
          files: "_coverage_report.dat"
          disable_search: true
          fail_ci_if_error: true
          verbose: true

@thomasrockhu-codecov
Copy link
Contributor

@louwers I made a change to the underlying CLI, would you be able to run it again and see if that fixed it?

@louwers
Copy link
Author

louwers commented Apr 22, 2024

@louwers
Copy link
Author

louwers commented Apr 22, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants