-
Notifications
You must be signed in to change notification settings - Fork 4
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
[CIVIS-2892] datadog_cov native extension for per test code coverage #137
Conversation
Codecov ReportAttention: 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. |
c1ab331
to
29a064b
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.
🎉 very nice!
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 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?
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.
Left a few notes! :)
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.
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
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.
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 |
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.
👍 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.rb
Scenarios tested:
stop_coverage
call