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 Migration Guide #1248

Closed
bmulholland opened this issue Feb 1, 2024 · 21 comments
Closed

v4 Migration Guide #1248

bmulholland opened this issue Feb 1, 2024 · 21 comments

Comments

@bmulholland
Copy link

v4 has breaking changes, but it's not clear what I need to actually do to fix them. There should be easy instructions on how to migrate actions. Especially just the basic case...

I only use two arguments to the action, and it's not uploading coverage now. That's a pretty basic use case but it's not at all clear what I need to do to fix it.

@bmulholland
Copy link
Author

bmulholland commented Feb 1, 2024

Okay in the end the issue wasn't that I needed to change anything, but that Dependabot PRs didn't have access to CODECOV_TOKEN. Still, a migration guide would have let me get to the conclusion that it wasn't a param change or something faster.

@Bibo-Joshi
Copy link

Hi @bmulholland could you kindly explain what needs to be changed (some repo config, some GH actions yml file?) to make the dependabot PRs have access to the env var?

@thomasrockhu-codecov
Copy link
Contributor

@Bibo-Joshi, you will need to add the CODECOV_TOKEN to the Dependabot secrets in your PR.

The URL will be something like https://github.com/{{ org }}/{{ repo }}/settings/secrets/dependabot

(example)
image

@jonhoo
Copy link

jonhoo commented Feb 3, 2024

^ would be very useful to add/link to in https://github.com/codecov/codecov-action?tab=readme-ov-file#dependabot

wheeheee referenced this issue in JuliaDSP/DSP.jl Feb 4, 2024
…ov/codecov-action-4

Bump codecov/codecov-action from 3 to 4
@ldemailly
Copy link

I have CODECOV_TOKEN in the org level yet I get

Error: Codecov token not found. Please provide Codecov token with -t flag.

in the upload stage of my action https://github.com/fortio/fortio/actions/runs/7788613704/job/21238404141?pr=886#step:5:26

Not sure how to fix it tbh

@ldemailly
Copy link

nvm I needed fortio/fortio@8eef6d7

@@ -23,3 +23,5 @@ jobs:
        run: make coverage
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # pin@v3
+        with:
+         token: ${{ secrets.CODECOV_TOKEN }}

@ldemailly
Copy link

well I spoke too soon:

==> Running command '/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/e0b68c6749509c5f83f984dd99a76a1c1a231044/dist/codecov do-upload -C 9b2decb579a5ed5caba1d3f066f84caf6ba72717
info - 2024-02-05 23:31:53,068 -- ci service found: github-actions
warning - 2024-02-05 23:31:53,079 -- xcrun is not installed or can't be found.
warning - 2024-02-05 23:31:53,081 -- No gcov data found.
warning - 2024-02-05 23:31:53,081 -- coverage.py is not installed or can't be found.
info - 2024-02-05 23:31:53,094 -- Found 1 coverage files to upload
info - 2024-02-05 23:31:53,094 -- > /home/runner/work/fortio/fortio/coverage.txt
info - 2024-02-05 23:31:53,[34](https://github.com/fortio/fortio/actions/runs/7792239057/job/21249853540?pr=886#step:5:35)3 -- Your upload is now processing. When finished, results will be available at: https://app.codecov.io/github/fortio/fortio/commit/9b2decb579a5ed5caba1d3f066f84caf6ba72717
info - 2024-02-05 23:31:53,6[37](https://github.com/fortio/fortio/actions/runs/7792239057/job/21249853540?pr=886#step:5:38) -- Process Upload complete

unusable report

Screenshot 2024-02-05 at 3 56 45 PM

but then that gives

@thomasrockhu-codecov
Copy link
Contributor

@ldemailly can you open a separate issue with this and a link if possible? Can help try to debug what happened on that upload

@mwestphal
Copy link

Same here, fails with:

 warning - 2024-02-10 10:20:19,045 -- /__w/f3d/f3d/source/library/CMakeFiles/libf3d.dir/src/init.cxx.gcno
warning - 2024-02-10 10:20:19,045 -- /__w/f3d/f3d/source/library/CMakeFiles/libf3d.dir/src/options.cxx.gcno
warning - 2024-02-10 10:20:19,045 -- /__w/f3d/f3d/source/library/CMakeFiles/libf3d.dir/src/interactor_impl.cxx.gcno
warning - 2024-02-10 10:20:19,901 -- coverage.py is not installed or can't be found.
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 152, in generate_upload_data
  File "codecov_cli/services/upload/network_finder.py", line 17, in find_files
  File "codecov_cli/helpers/versioning_systems.py", line 111, in list_relevant_files
ValueError: Can't determine root folder
[7475] Failed to execute script 'main' due to unhandled exception!
Warning: Codecov: 
                      Failed to properly upload report: The process '/__w/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1

I've added a token.

@pritamrungta
Copy link

pritamrungta commented Feb 16, 2024

same here. I get the following error after updating to v4 in GitHub actions (redacted):

Run codecov/codecov-action@v4
  with:
    token: ***
    flags: backend
    files: ./backend/coverage.xml
  env:
    working-directory: ./backend
    pythonLocation: /opt/hostedtoolcache/Python/[3](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:3).12.1/x6[4](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:4)
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x[6](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:6)4/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.[12](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:12).1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
    AWS_DEFAULT_REGION: us-east-2
    AWS_REGION: us-east-2
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA256SUM
==> Running version latest
==> Running version v0.4.7
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key ***: public key "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" imported
gpg: Total number processed: 1
gpg:               imported: 1

gpg: Signature made Fri Feb 16 00:53:28 2024 UTC
gpg:                using RSA key ***
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: ***

==> Uploader SHASUM verified (***[19](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:20)0a803543b2b  codecov)
info - [20](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:21)24-02-16 10:53:05,591 -- ci service found: github-actions
warning - 2024-02-16 10:53:05,594 -- No config file could be found. Ignoring config.
info - 2024-02-16 10:53:05,836 -- Process Commit creating complete
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report
info - 2024-02-16 10:53:06,552 -- ci service found: github-actions
warning - 2024-02-16 10:53:06,555 -- No config file could be found. Ignoring config.
info - 2024-02-16 10:53:06,657 -- Process Report creating complete
info - 2024-02-16 10:53:06,657 -- Finished creating report successfully --- {"response": "{\"external_id\":\"7114633a-af8f-40dd-9b0e-0ec748e2ce9d\",\"created_at\":\"2024-02-16T10:53:06.6355[21](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:22)Z\",\"commit_sha\":\"***\",\"code\":null}"}
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload -f ./backend/coverage.xml -F backend
info - 20[24](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:25)-02-16 10:53:07,371 -- ci service found: github-actions
warning - 2024-02-16 10:53:07,374 -- No config file could be found. Ignoring config.
warning - 2024-02-16 10:53:07,382 -- xcrun is not installed or can't be found.
warning - 2024-02-16 10:53:07,534 -- No gcov data found.
warning - 2024-02-16 10:53:07,534 -- coverage.py is not installed or can't be found.
info - 2024-02-16 10:53:07,724 -- Found 1 coverage files to upload
info - 2024-02-16 10:53:07,724 -- > /home/runner/work/redbrick-app/redbrick-app/backend/coverage.xml
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
FileNotFoundError: [Errno 2] No such file or directory: 'frontend/src/[path]/[file]'
[8[29](https://github.com/[owner]/[repo]/actions/runs/[run]/job/[job]#step:11:30)9] Failed to execute script 'main' due to unhandled exception!
Warning: Codecov: 
                      Failed to properly upload report: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1

If it's worth noticing, I see the error FileNotFoundError: [Errno 2] No such file or directory: 'frontend/... while the codecov is actually running for backend

@thomasrockhu-codecov
Copy link
Contributor

@mwestphal @pritamrungta would you be able to provide more information here? A link to CI would be great, but if not, maybe the Codecov step in your CI? Want to try to get this figured out

@pritamrungta
Copy link

pritamrungta commented Feb 27, 2024

Hi @thomasrockhu-codecov
Mine is a private repo, so I'm not sure if the CI link would be helpful.
However, I've included the entire codecov step (command+output) in my message above. Let me know if there's any critical information that's missing which you're specifically looking out for.

Another note in continuation to the last message: When running codecov for frontend subdirectory (flags), it passes without any errors/warnings. So, this is always happening only for backend.

@thomasrockhu-codecov
Copy link
Contributor

@pritamrungta what happens if you run it with

with:
  directory: backend  # or ../backend, however you need to get the directory from the current working dir

@pritamrungta
Copy link

Previous step:

- uses: codecov/codecov-action@v4
  with:
    token: ${{ secrets.codecov-token }}
    flags: backend
    files: ${{env.working-directory}}/coverage.xml

Updated step:

- uses: codecov/codecov-action@v4
  with:
    token: ${{ secrets.codecov-token }}
    flags: backend
    directory: ${{env.working-directory}}
    files: ${{env.working-directory}}/coverage.xml

And I still get the following error:

Run codecov/codecov-action@v4
  with:
    token: ***
    flags: backend
    directory: ./backend
    files: ./backend/coverage.xml
  env:
    working-directory: ./backend
    pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
    AWS_DEFAULT_REGION: ***
    AWS_REGION: ***
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA256SUM
==> Running version latest
==> Running version v0.4.7
==> Running git config --global --add safe.directory /home/runner/work/[repo]/[repo]
/usr/bin/git config --global --add safe.directory /home/runner/work/[repo]/[repo]
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key ***: public key "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" imported
gpg: Total number processed: 1
gpg:               imported: 1

gpg: Signature made Fri Feb 16 00:53:28 2024 UTC
gpg:                using RSA key ***
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <security@codecov.io>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: ***

==> Uploader SHASUM verified (05b8306070b7f242adb37232c5cdb62431ba89958d4c08243e5190a803543b2b  codecov)
info - 2024-02-27 17:54:56,254 -- ci service found: github-actions
warning - 2024-02-27 17:54:56,257 -- No config file could be found. Ignoring config.
info - 2024-02-27 17:54:56,383 -- Process Commit creating complete
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report --git-service github
info - 2024-02-27 17:54:57,094 -- ci service found: github-actions
warning - 2024-02-27 17:54:57,097 -- No config file could be found. Ignoring config.
info - 2024-02-27 17:54:57,266 -- Process Report creating complete
info - 2024-02-27 17:54:57,267 -- Finished creating report successfully --- {"response": "{\"external_id\":\"1f52140d-7c56-4a56-b150-78f0ffddbd01\",\"created_at\":\"2024-02-27T17:54:57.226809Z\",\"commit_sha\":\"***\",\"code\":null}"}
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload -f ./backend/coverage.xml -F backend --git-service github -s ./backend
info - 2024-02-27 17:54:57,977 -- ci service found: github-actions
warning - 2024-02-27 17:54:57,980 -- No config file could be found. Ignoring config.
warning - 2024-02-27 17:54:57,982 -- xcrun is not installed or can't be found.
warning - 2024-02-27 17:54:58,134 -- No gcov data found.
warning - 2024-02-27 17:54:58,134 -- coverage.py is not installed or can't be found.
warning - 2024-02-27 17:54:58,225 -- Some files were not found --- {"not_found_files": ["backend/coverage.xml"]}
info - 2024-02-27 17:54:58,309 -- Found 1 coverage files to upload
info - 2024-02-27 17:54:58,309 -- > backend/coverage.xml
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
FileNotFoundError: [Errno 2] No such file or directory: 'frontend/src/[path]/[file].[ext]'
[8482] Failed to execute script 'main' due to unhandled exception!
Warning: Codecov:
                      Failed to properly upload report: The process '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov' failed with exit code 1

If it helps, this is the successful attempt using codecov/codecov-action@v3 (Previous step):

Run codecov/codecov-action@v3
  with:
    token: ***
    flags: backend
    files: ./backend/coverage.xml
  env:
    working-directory: ./backend
    pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
    AWS_DEFAULT_REGION: ***
    AWS_REGION: ***
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id ***
==> Uploader SHASUM verified (a66af85a0b56b2179d568067cf951e5b40c440b7cbffc305b6b08bcf9eb17dd8  codecov)
==> Running version latest
==> Running version v0.7.2
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.6 -f ./backend/coverage.xml -F backend
[2024-02-27T09:54:09.196Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.7.2
[2024-02-27T09:54:09.204Z] ['info'] => Project root located at: /home/runner/work/[repo]/[repo]
[2024-02-27T09:54:09.205Z] ['info'] ->  Token found by environment variables
[2024-02-27T09:54:09.217Z] ['info'] Searching for coverage files...
[2024-02-27T09:54:09.354Z] ['info'] => Found 1 possible coverage files:
  ./backend/coverage.xml
[2024-02-27T09:54:09.354Z] ['info'] Processing ./backend/coverage.xml...
[2024-02-27T09:54:09.370Z] ['info'] Detected GitHub Actions as the CI provider.
[2024-02-27T09:54:09.470Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.7.2&token=*******&branch=master&build=8062733540&build_url=https%3A%2F%2Fgithub.com%2F[owner]%2F[repo]%2Factions%2Fruns%2F8062733540&commit=[sha]&job=[job]&pr=&service=github-actions&slug=[owner]%2F[repo]&name=&tag=&flags=backend&parent=
[2024-02-27T09:54:10.112Z] ['info'] https://app.codecov.io/github/[owner]/[repo]/commit/[sha]
https://storage.googleapis.com/codecov/v4/raw/2024-02-27/55A3687C340065C44CC387762E637446/[sha]/4fc3cfd3-0483-4998-afc0-252cd28c1524.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=***&X-Amz-Date=20240227T095410Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=***
[2024-02-27T09:54:10.112Z] ['info'] Uploading...
[2024-02-27T09:54:10.260Z] ['info'] {"status":"processing","resultURL":"https://app.codecov.io/github/[owner]/[repo]/commit/[sha]"}

@kgiusti
Copy link

kgiusti commented Feb 28, 2024

FWIW, I'm also having a problem migrating from v3 to v4:

'''
debug - 2024-02-28 15:31:14,044 -- Collecting relevant files
Traceback (most recent call last):
File "codecov_cli/main.py", line 81, in
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 152, in generate_upload_data
File "codecov_cli/services/upload/network_finder.py", line 17, in find_files
File "codecov_cli/helpers/versioning_systems.py", line 111, in list_relevant_files
ValueError: Can't determine root folder
[3910] Failed to execute script 'main' due to unhandled exception
'''

The full log is here:

https://github.com/skupperproject/skupper-router/actions/runs/8082844873/job/22084570489?pr=1428#step:36:305

Here is my changes to our workflow file:

https://github.com/skupperproject/skupper-router/pull/1428/files#diff-d0777657fa3fd81d23aaf7273e58aee453b04e67882517900c56daeef9b3e4c1

I removed the root_dir: setting since - according to the docs it shouldn't be necessary for git-based repo. In any case when I had "root_dir: ." it failed with the same traceback.

thanks

@SimenB
Copy link

SimenB commented Feb 29, 2024

I'm getting a 500 error - not sure how to debug it? jest-community/eslint-plugin-jest#1494

@tvdijen
Copy link

tvdijen commented Feb 29, 2024

@chouetz
Copy link

chouetz commented Mar 14, 2024

Hi 👋🏽
For people facing the

File "codecov_cli/helpers/versioning_systems.py", line 111, in list_relevant_files
ValueError: Can't determine root folder

@kgiusti @mwestphal @tvdijen
it should not fail if you set the root_dir option. There are many directory options (root_dir, directory, working_dir), and IIUC root_dir is mandatory when your git repo is not the working dir. The README or the error message might need to be clarified.
At least in my situation I had the exact same traceback and I set the 3 variables to the same value and I don't raise an exception anymore.
I'm not sure if one of these directory inputs should be passed here or if there should be some defaulting logic here.
Hoping it could help

@tvdijen
Copy link

tvdijen commented Mar 14, 2024

@chouetz I don't have a git repo available at all at this stage. I've generated coverage files several steps before and I'm basically only trying to upload the build-directory.. This used to work fine in v3

another-rex pushed a commit to google/osv-scanner that referenced this issue Mar 19, 2024
It seems that v4 is having some teething problems - coverage is no
longer being uploaded due to the lack of a token, and it seems like at
least some people are getting 500s even when they do provide a token
(codecov/codecov-action#1248).

Let's start by downgrading to a known working version, and go from
there.

Relates to #784

Before: 

<img width="1009" alt="image"
src="https://github.com/google/osv-scanner/assets/3151613/24e6556f-0c94-4c4a-9269-cd59188f303f">

After:

<img width="1334" alt="image"
src="https://github.com/google/osv-scanner/assets/3151613/3e5bd689-0daf-410e-814c-62facf3ef50c">
@mwestphal
Copy link

I managed to fix the root_dir issue by setting the working-directory: input instead:

        working-directory: ${{github.workspace}}/source
        token: ${{inputs.codecov_token}}
        fail_ci_if_error: true
        files: ${{github.workspace}}/source/coverage.info
        verbose: true
        use_oidc: false
        disable_search: true

@thomasrockhu-codecov
Copy link
Contributor

Hi all, thanks for bearing with us as we rolled out v4. I realize that we should have done a better job of creating resources for our users to migrate, but there were some edge cases that we were unaware of.

This thread has a few too many issues and is hard for us to track and manage. If you are experiencing issues with v4, please open a new issue so that we can tackle appropriately.

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

No branches or pull requests