-
Notifications
You must be signed in to change notification settings - Fork 212
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
fix: exec command with failFast should fail immediately #665
Conversation
Note to maintainers: only the last commit is related, others are showing because I didn't fork specifically for this fix, and instead merged this into my fork. |
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 your contribution, the change makes.
Could you add a test, so that we can avoid regression in the future?
@spydon I have:
|
Tests are flaky I guess because all 3 are being run at the same time, and some times "a" fails first, and "b", "c" are cancelled. Otherwise, some other fails. I need to find a way to add delay before "exit 1" so it becomes more predictable.
|
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.
Lgtm
Description
The expected behavior of failFast option is to fail the whole exec command as soon as a single fail occurs, and it works as expected if concurrency=1. But if concurrency > 1, it diverges from the expected behavior and instead keeps running until all pooled jobs have finished executing.
This PR fixes this divergence, and the exec command will fail immediately on a single fail irrespective of concurrency value.
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore