-
Notifications
You must be signed in to change notification settings - Fork 495
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
Simulate output for CI after the first parallel thread finishes #673
Simulate output for CI after the first parallel thread finishes #673
Conversation
… parallel thread finishes
Here is the output for the failing test I wrote for this issue. Note the lack of simulated output after
|
sounds good! :) ... possibly stupid/simple fix would be to just run |
Executing a simple shell script like that could be a good idea. I'm wondering if we can accomplish it from within the ruby code though. Looking at the code a bit more I think this is the point where it's killing the |
yes, looks like it should get killed after the process is done |
so after the .map finishes |
maybe cleanest to do make sure to check it's sane with 2+ parallel jobs where one stops early :) |
This may be a naive approach, but I simply deleted the If it is good then I'd like to clean up and improve the test for it just a bit before merging it in. |
I'd prefer to actually exit the indicator so it does not keep going forever if someone calls this from the ruby dsl and does not spill into test output |
…turn the test results
Good call. I feel like I'm getting closer here. Now the progress indicator is being exited after the parallel processes. How does this look? |
If you can confirm that my current implementation looks good then I'll go ahead and refactor it to this suggestion. I really appreciate your help with this. |
looks good! |
That refactor is ready now. If you like it then it should be good to go ahead and merge in. Please let me know if you have any suggestions or see any of my code that can be improved. I'll be happy to help. |
2.27.1 |
I just updated my gem locally and it's working great! Thank you for all your guidance on this. I really appreciate all you do in building and maintaining this gem. You have been great to work with. |
I'm having a problem when running parallel tests with the
--serialize-stdout
flag, where our CI times out due to receiving no stdout after the first parallel thread finishes, but before other threads are finished.The simulate_output_for_ci method (from issue #512) fixes this issue up to the point when the first parallel thread finishes by printing a dot (
.
) to stdout every 60 seconds, but does not continue printing output after the first parallel thread finishes. I am proposing the dots should continue being printed to stdout until all parallel threads are finished.An example of when this problem might occur. My CI times out after 5 minutes without output. I run
parallel_rspec -n 2 spec
and unfortunately get two very uneven groups of tests. The first group finishes in 6 minutes and does not time out because a dot is printed to stdout every 60 seconds up to that point. The second group takes 12 minutes total, but the CI times out 5 minutes after the first group finished due to no output in that time.Unfortunately, I don't know how to write the code to make this happen, but in TDD fashion I believe I have written a failing test to illustrate the problem (more specifically, I have modified an existing test). This test can be used to develop the solution. As soon as it is passing the feature will be complete.
I would be happy to help write the code for this feature if it helps, but I would need some assistance getting started.
Thank you for all you do on this project. I really appreciate your time.