-
Notifications
You must be signed in to change notification settings - Fork 109
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
Batch coverage data sent to combineCoverage to prevent timeouts #877
Batch coverage data sent to combineCoverage to prevent timeouts #877
Conversation
…keys as the batching mechanism. This is to prevent very large objects being sent across processes all at once. Objects of sufficient size have been causing timeouts during this transition.
|
@cacieprins The batching is currently hardcoded at every 500 keys, but this could be configurable, though that would require a lot more changes and is probably outside proper scope. Let me know what you think. |
@aantes-st Thank you for your contribution! I have some questions before tackling the configurability decision:
Thank you! |
@cacieprins the 500 mark is arbitrarily chosen - there's no significance behind it. The performance issue seems to be in the transfer between |
@aantes-st That makes sense! I think it would be best to make this configurable, however. Since the configuration value needs to be available in the browser, it can be attached to the How does that sound to you? |
@cacieprins sounds good! I'll get those changes committed shortly. |
…nvironment variable
…BatchSize' is set and valid
@cacieprins see the latest commits. If those look good, I will update the README file with information about using the new variable-based configuration. |
Looks good to me! |
@cacieprins Added README info about the environment variable and it's use. Should be all set! |
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.
Sorry for the premature approval, @aantes-st --
Can you add a test case to the test-apps
dir that includes this environment variable? This test case should be constructed such that the batch logic is executed. Completely viable to set the env to a very low value to ensure that things are batched.
The tests in this project assert that coverage is 100% of the files that should be analyzed for coverage.
Once the test app is added, it needs to be included in the circle yml, both in the jobs matrix - https://github.com/cypress-io/code-coverage/blob/master/.circleci/config.yml#L146 and the requires list - https://github.com/cypress-io/code-coverage/blob/master/.circleci/config.yml#L172
Thank you!
…nvironment variable
@cacieprins I've added the test-app. I am not sure if/how the outcome is asserted (the |
🎉 This PR is included in version 3.13.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Some users, including myself, have experienced task timeouts when large coverage reports are sent to the Node process. This change
sendCoverageBatchSize
sendCoverageBatchSize
only if the environment variable is set and validThis may address issue #455
Testing
In the existing full-report scenario, I was experiencing timeouts even when setting
taskTimeout
to 10+ minutes. With these changes, the coverage report is successfully constructed in seconds.