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] Traceback with ValueError when Git repo is not checked out #1252

Closed
webknjaz opened this issue Feb 1, 2024 · 8 comments
Closed

[v4] Traceback with ValueError when Git repo is not checked out #1252

webknjaz opened this issue Feb 1, 2024 · 8 comments
Assignees

Comments

@webknjaz
Copy link
Contributor

webknjaz commented Feb 1, 2024

There's a project where coverage is collected from multiple jobs, stored as GHA artifacts, then combined into a single report in a separate job, that attempts uploading the result. In that job, Git checkout is unnecessary (and even undesired!) so it doesn't happen. The working directory contains an unpacked project source, from a tarball created earlier in the workflow. But the coverage.xml exists in the current working dir so there is no legitimate reason for codecov-cli to fail locating it, but that's exactly what happens.
Here's the trace:

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 232, in do_upload
  File "codecov_cli/services/upload/__init__.py", line 66, 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

Here's the job log: https://github.com/aio-libs/multidict/actions/runs/7746607723/job/21125581164#step:8:59.

@thomasrockhu-codecov
Copy link
Contributor

@webknjaz ahhh I think I know what's causing the problem. If you do run the actions/checkout@v4 step beforehand, does it go through?

@webknjaz
Copy link
Contributor Author

webknjaz commented Feb 1, 2024

@thomasrockhu-codecov it succeeds in another job that does that, yes. That's why I mentioned Git in the issue title.

@dfed
Copy link

dfed commented Feb 2, 2024

FWIW, I was able to fix this same failure on an ubuntu build by adding a Setup Python step to ensure that 3.10 was installed. I'm now failing because we're sending "service": null as part of the commit process.

Edit: now tracking the above as codecov/feedback#263

@thomasrockhu-codecov
Copy link
Contributor

Sounds right, thanks for confirming. I'll take a look and try to debug.

@thomasrockhu-codecov
Copy link
Contributor

@dfed do you mind opening a new issue for that? just want to make sure it doesn't get lost in this

@webknjaz
Copy link
Contributor Author

webknjaz commented Feb 2, 2024

@thomasrockhu-codecov upon closer look, the same errored out log from above has a warning that reveals a secret replacement of the default config filename: #1254.

@thomasrockhu-codecov
Copy link
Contributor

@webknjaz yup, this is a problem and I opened an issue here. A PR has been opened to fix this.

@thomasrockhu-codecov
Copy link
Contributor

@webknjaz @dfed please see the workaround here: codecov/feedback#263

I'm going to close this out in favor of codecov/feedback#263. The error message is not the same, but the root cause is the same

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

3 participants