[CIVIS-2892] datadog_cov native extension for per test code coverage#137
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 1.0 #137 +/- ##
==========================================
+ Coverage 99.19% 99.22% +0.02%
==========================================
Files 163 171 +8
Lines 7240 7468 +228
Branches 302 310 +8
==========================================
+ Hits 7182 7410 +228
Misses 58 58 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c1ab331 to
29a064b
Compare
tonyredondo
left a comment
There was a problem hiding this comment.
LGTM, I left a couple of nits, and I have a question regarding what happens if a test spawn new threads, is that possible? how the code coverage works in that case?
ivoanjo
left a comment
There was a problem hiding this comment.
Ahaha clearly my head kept reviewing the code as an async background task and when I took a break to go get some tea the async task resolved and pointed out these two issues 🤣
2f21495 to
09c27e5
Compare
ivoanjo
left a comment
There was a problem hiding this comment.
Left a few more notes, I think you're very close ;)
One thing that occurred to me is that we have a weird setup for packaging dd-trace-rb when used by single step instrumentation (sometimes known as "lib injection" in dd-trace-rb).
TL;DR we handle gems with native extensions in a specific way, so if this native gem is still going to become a dependency of ddtrace 1.x, it's probably worth checking nothing is broken there.
I'm not entirely sure of all the details, @TonyCTHsu is the right person to ask "if this new native extension going to break or not".
Git.root returns Dir.pwd if git is not available
483aff8 to
2d4f694
Compare
|
This pull request is now rebased on top of 1.0 branch and the base is set to 1.0. From now on, all ITR functionality will go into 1.0 branch so that we don't add additional risks for ddtrace 1.x gem. |
… is ITR-only functionality
|
@ivoanjo this is ready for another pass |
ivoanjo
left a comment
There was a problem hiding this comment.
👍 Native bits look good to me! I didn't re-review the other things that came in from the rebase/changing the branch :)
What does this PR do?
Adds datadog_cov native extension for per test code coverage.
Usage of
Datadog::CI::ITR::Coverage::DDCov:Additional Notes
Current limitations:
How to test the change?
Unit tests are provided in
spec/datadog/ci/cov_spec.rbScenarios tested:
stop_coveragecall