-
Notifications
You must be signed in to change notification settings - Fork 306
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-visibility] Work around jest's --forceExit
#4049
Conversation
Overall package sizeSelf size: 6.04 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
@@ -548,6 +567,10 @@ function configureTestEnvironment (readConfigsResult) { | |||
|
|||
isUserCodeCoverageEnabled = !!readConfigsResult.globalConfig.collectCoverage | |||
|
|||
if (readConfigsResult.globalConfig) { |
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.
typo: need to check forceExit
, not just global config
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4049 +/- ##
=======================================
Coverage 85.33% 85.33%
=======================================
Files 243 243
Lines 10568 10569 +1
Branches 33 33
=======================================
+ Hits 9018 9019 +1
Misses 1550 1550 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-02-14 11:35:57 Comparing candidate commit 6aa2000 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 260 metrics, 5 unstable metrics. scenario:plugin-graphql-with-depth-and-collapse-on-18
|
8ff3445
to
eeb082d
Compare
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, I'll let you decide on whether you want to deduplicate that code or not.
6aa2000
What does this PR do?
Jest's
--forceExit
option (https://jestjs.io/docs/cli#--forceexit) shuts down the process abruptly, without waiting for open handles to finish. This PR adds instrumentation to wait for the information flush before jest is able to shut down the process.Additionally, we'll add a
log.warn
ifforceExit
is passed, because it could still lead to data being missed.Motivation
Fix product for users passing
--forceExit
to theirjest
command. They're currently losing data.Plugin Checklist
Security
Datadog employees:
@DataDog/security-design-and-guidance
.Unsure? Have a question? Request a review!