-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
bin/magento must return non zero on exceptions #3189
bin/magento must return non zero on exceptions #3189
Conversation
@vancoz I've added more things that are related to incorrect exit codes, these are open for discussion |
I'll fix the failing tests probably later today |
@vancoz Could we discuss here if the changes I've done are good for you. Maybe it can be taken further and instead of returning non-zero from the execute methods we could just throw exceptions instead. |
Sorry for the delay, I got it sorted out now. |
Hi @BlackIkeEagle, thank you for contribution, and sorry for delay. |
@BlackIkeEagle Did you see the latest feedback from @vancoz about "Can you please use constants for exit codes"? Are you going to be able to work on that small change? Thanks for working on this fix, as it solved PR #3060 that myself and others have wanted to see fix. |
@erikhansen Sorry I have seen the comment by @vancoz but I did not yet get to it to update this PR. |
@BlackIkeEagle It looks like the latest CI tests failed. I saw other tests that were failing for the same reason, so it looks like it was an issue with code from develop. Also, your branch now has conflicts with develop. Can you merge develop into your branch and fix any merge conflicts? Hopefully that will result in successful CI tests. |
@erikhansen Ok I'll rebase again :) |
pff is there any way for magento to use something more stable than travis please there are almost every time issues with stuff that is rebooting and whatever |
@vancoz It looks like the Travis CI build randomly failed. Can you restart the tests? |
@@ -32,4 +32,5 @@ try { | |||
echo "\n\n"; | |||
$e = $e->getPrevious(); | |||
} | |||
exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use constant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for spotting that, I completely missed it
Fingers crossed travis does not reboot anything now :) |
please help me here: integration 1 php 5.5
integration 1 php 5.6
integration 2 php 7
integration integrity php 7
static: I don't think the issue is caused by my changes so fixing it here would be out-of-scope unless you guys say 'just fix it here :)' |
I'm really tired of this stupid failures with travis |
Restarted the build. |
@Vinai thanks, but again there is such an issue: The system is going down for power off NOW! |
@BlackIkeEagle Does it help at all to know others (like myself) are pretty sick of it too? :) Seems to have all started when Travis started shifting their infrastructure over to GCE, and unfortunately the only option we've got is to restart the failed builds. |
@davidalger I did not at all assume I was alone with my annoyance. So we can conclude if we cumulate all 'failed' builds that is basically succeeds :) |
@BlackIkeEagle there are some static failures specific to your changes. Please see: https://travis-ci.org/magento/magento2/jobs/125264905#L622 |
@mazhalai yeah sorry I already noticed but did not yet have the time to update the PR |
@mazhalai I checked again, and if you want less dependencies the code must be refactored. Its not like the new 'dependency' will make it more messy. |
@mazhalai do you want me to add PHPMD ignores or something like that |
We do now allow any new suppress warning, I believe there is a task/story in backlog to remove all existing ones. Yes this will need to be refactored. |
Internal issue id: MAGETWO-52458, reported as well by @LeeSaferite |
Signed-off-by: BlackEagle <[email protected]>
Signed-off-by: BlackEagle <[email protected]>
Code must not contain multiple empty lines in a row; found 3 empty lines Signed-off-by: BlackEagle <[email protected]>
Signed-off-by: BlackEagle <[email protected]>
…- unhelpful error message #3189 - removing dependency on cache manager
…- unhelpful error message #3189 - adding check in case all caches are already disabled.
…- unhelpful error message #3189 - fix unknown variable merge error and path in docblock
…- unhelpful error message #3189 - fixes for QA issues.
…- unhelpful error message #3189 - Using OM to create TImeZoneProvider.
…- unhelpful error message #3189 - fixes for QA issues.
…- unhelpful error message #3189 - fixes for QA issues.
…- unhelpful error message #3189 - Code update to fix QA issues
…- unhelpful error message #3189 - fixes for QA issues.
…- unhelpful error message #3189 - fixing test.
…- unhelpful error message #3189 - fixing upgrade
…- unhelpful error message #3189 - CR comment
…- unhelpful error message #3189 - merging mainline
…- unhelpful error message #3189 - updating tests
…- unhelpful error message #3189 - updating job set cache
…- unhelpful error message #3189 - updating test
…- unhelpful error message #3189 - static test failures
…- unhelpful error message #3189 - static test failures
@BlackIkeEagle this PR has been merged. It was combined with other logging related issues, hence PR was not automatically closed. Thank you very much for your contribution! |
@mazhalai superb, thanks |
When you use bin/magento in a deployment flow it must return a non zero
exitcode when there was an error or an exception. Now the exceptions
caught and as a result the exitcode is 0. In a script we assume exit
code 0 to be all clear everything went fine.
So we must fix this here.
Signed-off-by: BlackEagle [email protected]