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

Windows task fails but doesn't appear in red and the task continues executing commands #765

Closed
vinferrer opened this issue Jan 18, 2021 · 9 comments
Labels

Comments

@vinferrer
Copy link

Question

Hi , I was checking my jobs and I realized that even if there are errors in my windows jobs, the cirrus-CI webpage shows them as done correctly. For example this one: https://cirrus-ci.com/task/6202306100199424
Is there a way to correct this behavior? it would be annoying to have to check manually everytime if windows jobs are working properly

@fkorotkov
Copy link
Contributor

That's weird. This is how Cirrus Agent generates a PS script to execute https://github.com/cirruslabs/cirrus-ci-agent/blob/master/internal/executor/cmd_windows.go#L63-L78 and it deliberately sets ErrorActionPreference. Does your Makefile make any changes that can chnage how Powershell reports exit code?

@vinferrer
Copy link
Author

not at all: https://github.com/vinferrer/phys2bids/blob/master/Makefile . If you notice the work should stop before the makefile in the populate_enviroment_cache script

@vinferrer
Copy link
Author

Maybe is not detecting the error from pip? that's the first command that should trigger failure

@vinferrer
Copy link
Author

Could you comment when you have more info about this? I am gonna need to keep track of windows jobs for the moment

@fkorotkov
Copy link
Contributor

I'm actually trying to investigate it. It does look like an issue with EXEs and Powershell as I found in this Stackoverflow issue. I don't see any Powershell specific things that you do so could you please try to remove SHELL: powershell environment variable?

@vinferrer
Copy link
Author

Let me try, I am gonna open a new branch for this

@vinferrer
Copy link
Author

vinferrer commented Jan 19, 2021

I just open a new branch and delete the SHELL:powershell from some of the tests, now those tests are failing, but from completely different reasons than before. Right now the job is not detecting pip:
failing job: https://cirrus-ci.com/task/6232965623578624
cirrus ci yml: https://github.com/vinferrer/phys2bids/blob/c00253263653c92e96909d850ef0818a0fdcbb43/.cirrus.yml#L47

Seems like the problem is powershell, but I builded my scripts on powershell config :(

@vinferrer
Copy link
Author

I managed to fix my tests without using powershell. If you want we can close this issue

@fkorotkov
Copy link
Contributor

@vinferrer glad it worked. Sorry I wasn't that helpful. 😪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants