feedback icon indicating copy to clipboard operation
feedback copied to clipboard

[Regession] [CLI Uploader] [Windows] --file option not working as in legacy uploader

Open nikosatwork opened this issue 1 year ago • 5 comments

Describe the bug --file path/to/reports/**/*.xml in legacy uploader is enough to resolve the globing and pickup all xml files under subfolders of path/to/reports In Cli this doesn't work and fails to find the files. Workaround there is --dir path/to/reports --file *.xml

Environment (please complete the following information):

  • Browser: All
  • System: All

CLI version 0.7.5

To Reproduce Steps to reproduce the behavior:

  1. Place some coverage xml reports in folders under path/to/reports
  2. Run Cli upload-process passing --file path/to/reports/**/*.xml
  3. Upload fails because it can't find the xml files

Expected behavior Work as in legacy uploader

nikosatwork avatar Oct 18 '24 22:10 nikosatwork

@nikosatwork how are you uploading? Using the CLI directly? The Orb? The Action?

Can you post a link to your CI run or at least the relevant Codecov snippet?

thomasrockhu-codecov avatar Oct 19 '24 23:10 thomasrockhu-codecov

Hi @thomasrockhu-codecov - we use CLI directly, in our own CI. I am still testing it, and I think I did not experience any issues with --file, so something else might have gone wrong that time.

So unless there isn't anything similar reported for the uploader, I would say it can close. Thank you.

nikosatwork avatar Oct 23 '24 11:10 nikosatwork

huh, that is strange. I'm not seeing any other mentions of this kind of issue. I'll close for now, but as always, feel free to reopen and tag me

thomasrockhu-codecov avatar Oct 24 '24 00:10 thomasrockhu-codecov

@thomasrockhu-codecov I am afraid we'll need to reopen, as I managed to get more info.

So this is a problem with the Windows version only.

  • When passing just --file path/to/reports/*.xml it fails with:
ExitCode: 2
Usage: codecov.exe upload-process [OPTIONS]
Try 'codecov.exe upload-process -h' for help.
Error: Got unexpected extra arguments 
  • When passing it like --file *.xml --dir path/to/reports it is fine & finds the reports, etc

nikosatwork avatar Oct 24 '24 10:10 nikosatwork

As we are migrating from legacy to cli, and did not want to have to change the various jobs using it, we created a patch in our CI which converts path/to/reports/*.xml into --file *.xml --dir path/to/reports, only on Windows

But ideally Cli should work as Legacy did

nikosatwork avatar Oct 25 '24 10:10 nikosatwork