codecov-node
codecov-node copied to clipboard
File structure upload stage doesn't fallback correctly if no version control is present
If codecov can't find version control, the code indicates that it's supposed to failover to using walk
to generate the file structure. Instead, I'm seeing this in the output:
==> Building file structure
fatal: not a git repository (or any of the parent directories): .git
/bin/sh: hg: not found
It seems like the try/catch statement is potentially failing to catch the error?
Dear @thomasrockhu I was going to create a similar issue because I think this seems to be a major limitation currently of the codecov. When we build cointainers we want to have them as slim as possible so its easier to build, publish and pull them when running CI tasks or production workloads, in other words adding .git
shouldn't be a requirement.
I was going to ask if there is any way to run codecov
uploader without having .git
in the project directory, there has to be a better documentation for this use case, especially for rather enterprise situations where git history + whats stored in .git
can be big.
I see that here there is -e
flag but it seems complex and few examples on it would be helpful: https://docs.codecov.com/docs/codecov-uploader#uploader-command-line-arguments
In other words, documentation needs revamp for codecov
uploader without .git
case(if decision is to keep -e flag), documentation needs better explanations and examples, and perhaps code/architecture level changes to make this functionality possible because I'm 100% it should be possible given codecov has access to the main related project repository to fetch git related metadata.