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

[SDTEST-1129] Extract Knapsack instrumentation as standalone integration #253

Merged
merged 7 commits into from
Nov 18, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Nov 15, 2024

What does this PR do?
Refactors Contrib module and extracts Knapsack instrumentation as a standalone integration (rather than putting knapsack instrumentation inside rspec).

I used this work also as a chance to make instrumentation code more object oriented and untangle the complex mix of class-level and object-level methods that was inherited from Tracing implementation.

Motivation
For the auto-instrumentation feature we need to instrument every gem as a separate integration.

How to test the change?
No changes in the behaviour, covered by existing unit tests.

@anmarchenko anmarchenko changed the title Extract Knapsack instrumentation as standalone integration [SDTEST-1129] Extract Knapsack instrumentation as standalone integration Nov 15, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 97.25490% with 7 lines in your changes missing coverage. Please review.

Project coverage is 98.77%. Comparing base (acc48cb) to head (b17763c).

Files with missing lines Patch % Lines
lib/datadog/ci/contrib/knapsack/patcher.rb 85.71% 2 Missing ⚠️
lib/datadog/ci/contrib/knapsack/runner.rb 93.93% 2 Missing ⚠️
lib/datadog/ci/contrib/instrumentation.rb 97.50% 1 Missing ⚠️
lib/datadog/ci/contrib/integration.rb 97.14% 1 Missing ⚠️
spec/datadog/ci/configuration/settings_spec.rb 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #253      +/-   ##
==========================================
+ Coverage   98.73%   98.77%   +0.04%     
==========================================
  Files         293      291       -2     
  Lines       13961    13933      -28     
  Branches      668      670       +2     
==========================================
- Hits        13784    13762      -22     
+ Misses        177      171       -6     

☔ 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 November 18, 2024 10:52
@anmarchenko anmarchenko requested review from a team as code owners November 18, 2024 10:52
@anmarchenko anmarchenko merged commit 4aae21e into main Nov 18, 2024
31 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/knapsack_standalone_integration branch November 18, 2024 13:40
@github-actions github-actions bot added this to the 1.9.0 milestone Nov 18, 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