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] Can't determine root folder #1258

Closed
bmulholland opened this issue Feb 2, 2024 · 18 comments
Closed

[v4] Can't determine root folder #1258

bmulholland opened this issue Feb 2, 2024 · 18 comments
Assignees

Comments

@bmulholland
Copy link

I upgraded to v4 action and now get "Can't determine root folder." I can't figure out how to fix it.

This is for e2e tests, where we check out the code under test to a subdirectory, "frontend". This worked fine, without any options on v3. How do I fix it for v4?

Line that is thrown is here: https://github.com/codecov/codecov-cli/blob/main/codecov_cli/helpers/versioning_systems.py#L109

As far as I can tell, this doesn't use any passed in CLI option? So there's no way to configure it for the subdir.

@bmulholland
Copy link
Author

A migration guide would be really helpful here...

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Feb 2, 2024
@webknjaz
Copy link
Contributor

webknjaz commented Feb 3, 2024

@bmulholland might be related to #1252?

@bmulholland
Copy link
Author

Only in the sense that It’s the same error, and may have the same fix. For that issue, you can workaround it by checking the files out using git. For mine, it IS checked out, just in a subdirectory.

@thomasrockhu-codecov
Copy link
Contributor

codecov/feedback#263

@thomasrockhu-codecov
Copy link
Contributor

I'm going to close this out as a dupe of codecov/feedback#263. The error messages are different, but the root is the same.

@thomasrockhu-codecov
Copy link
Contributor

@bmulholland @webknjaz

@Bo98
Copy link
Contributor

Bo98 commented Feb 6, 2024

codecov/feedback#263 describes a permissions issue with containers while this issue happens outside of containers too and I think(?) describes root_dir not working, which is relevant if the git repo isn't in GITHUB_WORKSPACE.

It seems the behaviour has changed so v3-like root_dir is now working-directory. I'm not entirely sure what v4 root_dir does, but it seems different than documented and might be worth renaming.

Changing to working-directory is OK for me. However there's a problem with working-directory: it does not work with the create-commit and create-report stages - only the upload stage: https://github.com/codecov/codecov-action/blob/v4.0.1/src/buildExec.ts. It needs to be passed in all stages because all of them issue git commands.

@bmulholland
Copy link
Author

@thomasrockhu-codecov sorry, why do you think it's related? We don't run in a container, and I didn't say anything about one?

@bmulholland
Copy link
Author

That issue also mentions git-service but that feels wrong. I'll try working-directory...

@bmulholland
Copy link
Author

Okay it's working-directory AND the git thing, I think.

Instead of using the workaround I'll wait until that's actually fixed. Where can I subscribe to know when it's ready?

@thomasrockhu-codecov
Copy link
Contributor

@bmulholland I've seen you a bit everywhere, and I'm not sure what your status is. Can you confirm if you're stilling running into a problem, and what specifically the issue is?

@bmulholland
Copy link
Author

@thomasrockhu-codecov yes, I'm still running into a problem. My situation is really simple: we checkout the code to a subdirectory on github actions, and that's enough to not work on the upgrade.

Firstly, the coverage upload is failing but returning success. Secondly, there's no documentation on how to upgrade. Thirdly, I needed to set working-directory to the subdirectory. Fourth, even when I do that, the upload fails, saying things like Commit creating failed: ["Service not found: none"] and ci service found: github-actions and Upload failed: ["Commit SHA not found"]

@bmulholland
Copy link
Author

bmulholland commented Feb 12, 2024

Note that @mwestphal is also having this problem: #1248 (comment)

FYI, the upshot so far is: to fix the "Can't determine root folder," you need to set the working-directory argument. However, this then runs into a secondary issue, codecov/feedback#263, which has a workaround but no real fix. The claim is that the workaround shouldn't be necessary when using actions/checkout but that's not my experience.

@mwestphal
Copy link

Thanks Ill try that.

@Bo98
Copy link
Contributor

Bo98 commented Feb 12, 2024

f62c5ee isn't in a release tag yet so you'll need to point to that commit manually to test out working-directory properly

@bmulholland
Copy link
Author

Well, okay then, can we re-open this until it's available? Or how can we otherwise get notified when it's out?

@felixfontein
Copy link

FYI, the upshot so far is: to fix the "Can't determine root folder," you need to set the working-directory argument.

Yeah, this is the hint that actually makes sense. We were using directory before, which worked fine with v3.

felixfontein added a commit to ansible-community/antsibull-docs that referenced this issue Feb 15, 2024
felixfontein added a commit to ansible-community/antsibull-build that referenced this issue Feb 15, 2024
felixfontein added a commit to ansible-community/antsibull-changelog that referenced this issue Feb 15, 2024
felixfontein added a commit to ansible-community/antsibull-docs-parser that referenced this issue Feb 15, 2024
tykling added a commit to tykling/dns_exporter that referenced this issue Feb 18, 2024
tykling added a commit to tykling/dns_exporter that referenced this issue Feb 18, 2024
@thomasrockhu-codecov
Copy link
Contributor

working-directory is now in 4.1.0

felixfontein added a commit to ansible-community/antsibull-changelog that referenced this issue Mar 17, 2024
felixfontein added a commit to ansible-community/antsibull-changelog that referenced this issue Mar 17, 2024
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Need working-directory instead of directory.

Ref: codecov/codecov-action#1258 (comment)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit to ansible-community/antsibull-build that referenced this issue Mar 17, 2024
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Need working-directory instead of directory.

Ref: codecov/codecov-action#1258 (comment)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit to ansible-community/antsibull-docs that referenced this issue Mar 17, 2024
felixfontein added a commit to ansible-community/antsibull-docs-parser that referenced this issue Mar 17, 2024
felixfontein added a commit to ansible-community/antsibull-core that referenced this issue Mar 17, 2024
felixfontein added a commit to ansible-community/antsibull-docs-parser that referenced this issue Mar 17, 2024
felixfontein added a commit to ansible-community/antsibull-docs-parser that referenced this issue Mar 17, 2024
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Need working-directory instead of directory.

Ref: codecov/codecov-action#1258 (comment)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit to ansible-community/antsibull-docs that referenced this issue Mar 17, 2024
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Need working-directory instead of directory.

Ref: codecov/codecov-action#1258 (comment)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit to ansible-community/antsibull-core that referenced this issue Mar 17, 2024
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Need working-directory instead of directory.

Ref: codecov/codecov-action#1258 (comment)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
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

6 participants