You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
Noticed something interesting recently fixing another CI error: my AppVeyor results were no longer being uploaded anymore (for who knows how long). I am greatly suspicious of this code:
toc=str((try_to_run('cd %s && git ls-files'%root) or
try_to_run('git ls-files') or
try_to_run('cd %s && hg locate'%root) or
try_to_run('hg locate') or'').strip())
Failed build
Full build log here, specifically this part is curious because this used to work as expected with codecov on this repo:
==> Collecting reports
XX> Searching for reports disabled
Targeting specific files
- Ignored: [Errno 2] No such file or directory: '.\\coverage.xml'
Error: No coverage report found
I don't think you can just do cd <somewhere> && other_stuff || different_stuff on windows in general. So what I believe happens is the cd is successful, but the rest fails and then codecov never goes back.
In general, it's worth mentioning that this repo has a lot of patterns like this that should probably be a little more careful. Another small example that could cause problems:
branch=try_to_run('git rev-parse --abbrev-ref HEAD || hg branch')
I think that the python script was probably just adapted from the bash script and maybe that's why all of these are in here? Unfortunately, there's a large number of them...but this is why there are generally so many problems on AppVeyor.
For the cd (suspected) problem, you may want to introduce a simple context manager so that you can do
withcd(some_path):
execute_stuff()
where the context manager will go back to where it came from (lots of examples online, here's a good starting place).
Or an even easier solution that would be much faster is specifically when you get a -f <some_path> you can check
# suppose it was called thisfile_path=args["-f"] # just an example...ifnotos.path.isabs(file_path):
file_path=os.path.abspath(file_path)
or similar. Basically, make everything absolute before you start "cd'ing" around 🙃
Happy to help implement changes with more input on what you want here.
The text was updated successfully, but these errors were encountered:
svenevs
changed the title
Please add an option to skip these checks
Please add an option to skip "cd" to different directories, or convert relative to absolute paths
Dec 22, 2018
Noticed something interesting recently fixing another CI error: my AppVeyor results were no longer being uploaded anymore (for who knows how long). I am greatly suspicious of this code:
codecov-python/codecov/__init__.py
Lines 562 to 565 in 0743daa
Failed build
Full build log here, specifically this part is curious because this used to work as expected with
codecov
on this repo:Solution: must use absolute path now
My Guess
I don't think you can just do
cd <somewhere> && other_stuff || different_stuff
on windows in general. So what I believe happens is thecd
is successful, but the rest fails and thencodecov
never goes back.In general, it's worth mentioning that this repo has a lot of patterns like this that should probably be a little more careful. Another small example that could cause problems:
codecov-python/codecov/__init__.py
Line 493 in 0743daa
I think that the python script was probably just adapted from the bash script and maybe that's why all of these are in here? Unfortunately, there's a large number of them...but this is why there are generally so many problems on AppVeyor.
For the
cd
(suspected) problem, you may want to introduce a simple context manager so that you can dowhere the context manager will go back to where it came from (lots of examples online, here's a good starting place).
Or an even easier solution that would be much faster is specifically when you get a
-f <some_path>
you can checkor similar. Basically, make everything absolute before you start "cd'ing" around 🙃
Happy to help implement changes with more input on what you want here.
The text was updated successfully, but these errors were encountered: