Skip to content
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] Code coverage events writer #150

Merged
merged 18 commits into from
Apr 3, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Mar 26, 2024

What does this PR do?
Adds Datadog::CI::ITR::Coverage::Writer that asynchronously sends coverage events to backend.
It starts a worker thread that is later gracefully stopped in ITR::Runner#shutdown! method.

Unit tests are provided

How to test the change?
Tested using anmarchenko/sidekiq project and executing the following DDSQL queries:

image

Unit tests are provided. Note that Codecov reports 12 uncovered lines from writer_spec.rb file: this is due to simplecov missing coverage by forked processes.

@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 95.03106% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 99.03%. Comparing base (e73065c) to head (4ae8ab7).

Files Patch % Lines
spec/datadog/ci/itr/coverage/writer_spec.rb 92.40% 12 Missing ⚠️
lib/datadog/ci/itr/coverage/writer.rb 93.87% 3 Missing ⚠️
...tadog/ci/contrib/rspec/coverage_collection_spec.rb 97.22% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              1.0     #150      +/-   ##
==========================================
- Coverage   99.19%   99.03%   -0.17%     
==========================================
  Files         176      179       +3     
  Lines        7741     8049     +308     
  Branches      314      333      +19     
==========================================
+ Hits         7679     7971     +292     
- Misses         62       78      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anmarchenko anmarchenko marked this pull request as ready for review April 2, 2024 15:17
@anmarchenko anmarchenko requested review from a team as code owners April 2, 2024 15:17
@anmarchenko anmarchenko changed the title Code coverage events writer [CIVIS-2892] Code coverage events writer Apr 2, 2024
@anmarchenko anmarchenko merged commit 9716194 into 1.0 Apr 3, 2024
23 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/coverage_worker branch April 3, 2024 08:54
@anmarchenko anmarchenko added this to the 1.0 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants