Skip to content
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

ci: fix ava hang in CI when v8 coverage is set #7619

Merged
merged 1 commit into from
May 4, 2023

Conversation

mhofman
Copy link
Member

@mhofman mhofman commented May 4, 2023

Description

This should fix the flakes we've been experiencing in CI with ava workers timing out on exit.
I believe I tracked it down to Node's v8 coverage tooling. Others have reported similar issues.

I seem to have found a work around by forcing the ava worker to write out its coverage file before exiting.
Regardless I also implemented a disablement of the timeout error if the test runner detects that coverage is set, which will allow the tests to no longer flake in CI even if the workaround is not sufficient.

Security Considerations

None

Scaling Considerations

None

Documentation Considerations

None

Testing Considerations

First I managed to locally reproduce the timeout failure fairly consistently (50+%)
Then I added and verified the timeout error disablement kicked in correctly (through the added console logging)
Finally I added the workaround and did not manage to reproduce the timeout.

@mhofman mhofman added automerge:squash Automatically squash merge bypass:integration Prevent integration tests from running on PR labels May 4, 2023
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Awesome!

Congrats on getting the repro and solving it.

@mergify mergify bot merged commit eb9fb38 into master May 4, 2023
@mergify mergify bot deleted the mhofman/ava-coverage-hang-fix branch May 4, 2023 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge bypass:integration Prevent integration tests from running on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants