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-9478] Knapsack Pro 7/RSpec 3 support #172

Merged
merged 8 commits into from
May 8, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented May 7, 2024

Closes #147

What does this PR do?
Adds instrumentation to KnapsackPro::Runners::Queue::RSpecRunner for knapsack_pro gem versions 7.0 and above. This makes sure that every knapsack_pro run is correctly reported to Datadog as a separate test session.

Motivation
Multiple reports of Datadog dropping test spans when using knapsack_pro

How to test the change?
Unit tests are provided

@codecov-commenter
Copy link

codecov-commenter commented May 7, 2024

Codecov Report

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

Project coverage is 98.97%. Comparing base (59a92c8) to head (88ec42e).

Files Patch % Lines
...ib/datadog/ci/contrib/rspec/knapsack_pro/runner.rb 92.85% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
- Coverage   98.98%   98.97%   -0.02%     
==========================================
  Files         198      202       +4     
  Lines        9638     9726      +88     
  Branches      423      431       +8     
==========================================
+ Hits         9540     9626      +86     
- Misses         98      100       +2     

☔ 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 May 7, 2024 13:54
@anmarchenko anmarchenko requested review from a team as code owners May 7, 2024 13:54
@anmarchenko anmarchenko added this to the 1.0 milestone May 7, 2024
@anmarchenko anmarchenko merged commit 8d3ce5c into main May 8, 2024
26 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/knapsack_pro_rspec branch May 8, 2024 08:05
@pcothenet
Copy link

@anmarchenko Previously, we had c.ci.force_test_level_visibility = true to work with Knapsack Pro. Should we drop this setting when testing this Beta?

@anmarchenko
Copy link
Member Author

anmarchenko commented May 28, 2024

@pcothenet yes, drop force_test_level_visibility from now on - knapsack pro is supported now

@connorshea
Copy link

Does this also work for minitest?

@anmarchenko
Copy link
Member Author

anmarchenko commented Jun 2, 2024

@connorshea I didn't test support for minitest with knapsack pro; but it might still work. Please try it and create an issue if it doesn't work.

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.

Dropping tests with knapsack_pro
5 participants