New uploader doesn't find the repository without token; stalls under Windows

Description

I have tried to migrate our Appveyor-based CI of a public project on GitHub to the new uploaders. Under Ubuntu and MacOS, the uploader seems to fail to find the repository and suggests a token, even though the repository is public.
I reran the CIs after reading in Public repositories can no longer upload coverage with error "Unable to locate build via Azure API." - #16 by samdoran that a similar issue had been fixed, but this issue persists. A recent build log is here:
AppVeyor

Our Windows tests, on the other hand, have started to stall in the uploading stage:
https://ci.appveyor.com/project/mih/datalad-osf/builds/41143105/job/gbsdug0jie4bmqdx

Commit SHAs

Repository

CI/CD or Build URL

Example for Ubuntu: AppVeyor

Example for Windows: AppVeyor

Uploader

I’m using the new uploader, downloading from https://uploader.codecov.io/latest/windows/codecov.exe, https://uploader.codecov.io/latest/macos/codecov, and https://uploader.codecov.io/latest/linux/codecov, respectively, following the documentation in Codecov Uploader.

Codecov Output

Ubuntu/MacOS show

     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.1.6
[2021-10-18T09:05:48.306Z] ['info'] => Project root located at: /home/appveyor/projects/datalad-osf
[2021-10-18T09:05:48.307Z] ['info'] -> No token specified or token is empty
[2021-10-18T09:05:48.311Z] ['info'] Searching for coverage files...
[2021-10-18T09:05:48.330Z] ['info'] => Found 1 possible coverage files:
  coverage.xml
[2021-10-18T09:05:48.331Z] ['info'] Processing /home/appveyor/projects/datalad-osf/coverage.xml...
[2021-10-18T09:05:48.334Z] ['info'] Detected Appveyor CI as the CI provider.
[2021-10-18T09:05:48.335Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.6&token=*******&branch=master&build=11q3crp9fx3dor23&build_url=https%3A%2F%2Fci.appveyor.com%2Fproject%2Fdatalad%2Fdatalad-osf%2Fbuilds%2F41180471%2Fjob%2F11q3crp9fx3dor23&commit=c9fc6c96e33416c81fee59b1ae515545918495a3&job=mih%252Fdatalad-osf%252F1.0.63&pr=153&service=appveyor&slug=datalad%2Fdatalad-osf&name=&tag=&flags=&parent=
[2021-10-18T09:05:49.119Z] ['error'] Error POSTing to https://codecov.io: 404 {'detail': ErrorDetail(string='Unable to locate build via Appveyor API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
[2021-10-18T09:05:49.120Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: Not Found

Windows stalls at

python -m coverage xml
powershell Invoke-WebRequest -Uri ' https://uploader.codecov.io/latest/windows/codecov.exe' -OutFile codecov.exe
.\codecov.exe

Expected Results

smooth upload without the need to supply a token; no stalling.

Actual Results

Failure to upload the coverage report on all three systems, for different reasons. Its particularly difficult to find out what is going on on Windows, as there is no output whatsoever.

Additional Information

Any help is greatly appreciated. Many thanks in advance!

@adswa looks like this is an issue with the uploader. We have a fix out here. I’ll get this merged and released shortly.

1 Like

@adswa I released 0.1.7, can you try to see if you still have the same issues?

Thanks much @tom!
I can confirm that it now works for macOS and Ubuntu:

python -m coverage xml
curl -Os $CODECOV_BINARY
chmod +x codecov
./codecov
[2021-10-20T13:23:01.614Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/
  Codecov report uploader 0.1.7
[2021-10-20T13:23:01.621Z] ['info'] => Project root located at: /home/appveyor/projects/datalad-osf
[2021-10-20T13:23:01.622Z] ['info'] -> No token specified or token is empty
[2021-10-20T13:23:01.626Z] ['info'] Searching for coverage files...
[2021-10-20T13:23:01.648Z] ['info'] => Found 1 possible coverage files:
  coverage.xml
[2021-10-20T13:23:01.648Z] ['info'] Processing /home/appveyor/projects/datalad-osf/coverage.xml...
[2021-10-20T13:23:01.651Z] ['info'] Detected Appveyor CI as the CI provider.
[2021-10-20T13:23:01.652Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.7&token=*******&branch=master&build=di4cyfp0mou2ecd6&build_url=https%3A%2F%2Fci.appveyor.com%2Fproject%2Fdatalad%2Fdatalad-osf%2Fbuilds%2F41216645%2Fjob%2Fdi4cyfp0mou2ecd6&commit=47eff1f9ee2e9675ab22c8d3dff04b9cba3bd9b5&job=mih%2Fdatalad-osf%2F1.0.69&pr=153&service=appveyor&slug=datalad%2Fdatalad-osf&name=&tag=&flags=&parent=
[2021-10-20T13:23:02.649Z] ['info'] Uploading...
[2021-10-20T13:23:02.841Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/datalad/datalad-osf/commit/7e2bd353e0c64d2c8620b4dffe2321bd6c549195"}

I still have trouble with Windows, though. It stalls at

python -m coverage xml
powershell Invoke-WebRequest -Uri ' https://uploader.codecov.io/latest/windows/codecov.exe' -OutFile codecov.exe
.\codecov.exe -f "coverage.xml"

Any idea what I might be doing wrong? Thanks again!

@adswa are you able to break up the 3 commands into individual steps? I’d love to know which of the 3 steps is causing issues first. Are you getting no output at all?

are you able to break up the 3 commands into individual steps?

AFAIK, they are individual steps, and its just the last one that hangs. Here is the latest run, which has been stuck in this stage for 25ish minutes now. The build will be cancelled after 60 minutes have passed.

The .appveyor.yml configuration reads

  - cmd: powershell Invoke-WebRequest -Uri ' https://uploader.codecov.io/latest/windows/codecov.exe' -OutFile codecov.exe
  - cmd: .\codecov.exe -f "coverage.xml"

The download takes about 3 minutes, but seems to succeed.
Please let me know if there is something I can do to break it up further.
And is there maybe any parameter for more verbose output I could pass?

Got it, could you run ./codecov.exe -f "coverage.xml" -v?

ha, thanks for pointing this out, I’ve missed this flag in the parameter overview.
I’ve started a build, but at 12 minutes in it still isn’t very talkative:

python -m coverage xml
powershell Invoke-WebRequest -Uri ' https://uploader.codecov.io/latest/windows/codecov.exe' -OutFile codecov.exe
.\codecov.exe -f "coverage.xml" -v

Sadly, there isn’t any more output than before. Here is a build log: AppVeyor

Hi @adswa sorry, I’m still trying to debug the issue. I have an idea that the Invoke-WebRequest is not actually pulling down the entire file and it is getting corrupted.

@adswa I made a small PR to the branch that I think fixes the issue. Not sure why Invoke-WebRequest is forcing a size limitation on download, but curl works just fine.

1 Like

Thanks so much, this fixed it indeed!

1 Like