-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PHPCS can show 0 exit code when running in parallel even if child process has fatal error #3645
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When a child process fails, e.g. with a FatalError, it might still return empty list of errors. Although, child process failure is definitely not a thing we want to ignore. Therefore, we check exit status of each child process and make sure parent process fails (and returns non-zero status code) as well.
A bit more details on what's the issue: When I run phpcs in single process mode, phpcs returns 255 status code and successfully fails my Jenkins build
But if I do the same in parallel, then I get
|
gsherwood
added a commit
that referenced
this pull request
Aug 13, 2022
Thanks for submitted a fix for this. I simplified the logic a bit by just reusing the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a child process fails, e.g. with a FatalError, it might still return empty list of errors. Although, child process failure is definitely not a thing we want to ignore.
Therefore, we check exit status of each child process and make sure parent process fails (and returns non-zero status code) as well.