Skip to content

test: Stream logs from lerna when running tests #548

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
merged 1 commit into from
Jan 13, 2021

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Jan 13, 2021

When lerna runs all the tests in parallel, sometimes the log output between different packages is overlapping, producing a very hard to dechipher log ("Is this line is still from package A or is it package B run output that got in the middle?"). Enabling stream option seems to produce a more readable result where every line is prepended by the package name that runs the script. This helped me a lot to debug the "stuck process" issue in #533 and I thought that it would be nice to have this enabled by default for our test scripts that are run by lerna.

For an example of overlapping logs here's a part of the log of this PR ci run:

image

There are 5 packages logs overlapped together

Gives a better picture of what's going on and which tests are failing
@gribnoysup
Copy link
Collaborator Author

The patch actually succeeded after a re-run, but seems like evergreen is not able to update the status

@addaleax
Copy link
Collaborator

The patch actually succeeded after a re-run, but seems like evergreen is not able to update the status

I think that's just because there's still one win32 task running. :) (But feel free to merge it already if you like.)

@gribnoysup
Copy link
Collaborator Author

gribnoysup commented Jan 13, 2021

Oh, you're right, I think I might've looked at a different run when I wrote that! Hmm, something seems off about this one task being stuck with this change introduced, I'll wait a little before merging to make sure I'm not breaking the ci again 😅

Copy link
Contributor

@aherlihy aherlihy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been having some trouble with that test being flaky in other PRs, so I would guess it's not anything in this PR

@gribnoysup
Copy link
Collaborator Author

Ah, good to know, thanks! Well, merging then 👍

@gribnoysup gribnoysup merged commit de35b16 into master Jan 13, 2021
@gribnoysup gribnoysup deleted the stream-logs-when-testing branch January 13, 2021 14:07
@addaleax
Copy link
Collaborator

Is it possible that this is causing the test timeouts on Windows (there are a few in https://evergreen.mongodb.com/waterfall/mongosh)?

@gribnoysup
Copy link
Collaborator Author

I'm not sure why this would be the cause, but yeah, tests in this branch timed-out a few times and it seems this wasn't just a flaky test after all. I'll revert the patch

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

Successfully merging this pull request may close these issues.

3 participants