-
Notifications
You must be signed in to change notification settings - Fork 399
DEBUG-3700 Do not initialize components from crash tracking on fork handler #4619
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
Conversation
|
Thank you for updating Change log entry section 👏 Visited at: 2025-05-12 18:59:02 UTC |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4619 +/- ##
==========================================
- Coverage 97.77% 97.76% -0.02%
==========================================
Files 1418 1418
Lines 86587 86586 -1
Branches 4396 4396
==========================================
- Hits 84662 84647 -15
- Misses 1925 1939 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Datadog ReportBranch report: ✅ 0 Failed, 21441 Passed, 1383 Skipped, 3m 55.76s Total Time |
BenchmarksBenchmark execution time: 2025-05-14 14:44:09 Comparing candidate commit 847ceb2 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 30 metrics, 2 unstable metrics. scenario:profiling - Allocations (profiling enabled)
|
|
I'm curious what drove this change (I checked the JIRA ticket and didn't have any details about this). In particular, the |
ad849bc to
dfb0d36
Compare
ivoanjo
left a comment
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.
👍 Thanks for adding the extra context to understand this.
It sucks a bit to be changing the production code to accommodate something that only happens in testing, but we have tests that cover the behavior in forks, so this should be fine.
What does this PR do?
Prevents crash tracker from initializing the component tree in its on fork handler
Motivation:
When running tests, the component tree may not be initialized, but the on fork handler in crash tracker may be active. This causes crash tracker to attempt to initialize component tree, interfering with the test being run. For example, some of the telemetry tests execute assertions in a fork, which causes crash tracker's on fork handler to run, which then creates another telemetry component instance (with wrong settings, since the correct settings were specified in the unit test and not via a global Datadog.configure), which then interferes with the test's assertions.
For example, running the following tests fails locally:
With the following errors repeated many times over:
Change log entry
None
Additional Notes:
This PR also stops duplicate reports of the test failures when
expect_in_forkis used. For example, the above two tests have 4 failures and those 4 failures are printed a total of 16 times instead of once.How to test the change?
Existing CI