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-786] support logical names for test sessions #235

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Sep 19, 2024

What does this PR do?
Adds support for the logical test session names for test visibility.

Now users are able to name their test sessions using DD_TEST_SESSION_NAME variable. If the environment variable is not provided, "#{ci_job_name}-#{test_command}" is used as default.

Motivation
Currently test sessions suffer from unstable fingerprints issue: we use the full test command as the test session identifier right now, and test command might have some random bits (like seed for example). This makes every test session to be considered new by the Datadog's backend, and breaks some features - for example, ITR savings calculation.

This is the first step to migrate to the new definition of test session name.

How to test the change?
Unit tests are provided

Tested using sidekiq project on production:
image

image

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 98.86364% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.95%. Comparing base (0fc0203) to head (96c32c7).

Files with missing lines Patch % Lines
lib/datadog/ci/test_visibility/null_component.rb 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #235      +/-   ##
==========================================
- Coverage   98.95%   98.95%   -0.01%     
==========================================
  Files         273      273              
  Lines       13285    13368      +83     
  Branches      597      600       +3     
==========================================
+ Hits        13146    13228      +82     
- Misses        139      140       +1     

☔ 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 September 20, 2024 09:14
@anmarchenko anmarchenko requested review from a team as code owners September 20, 2024 09:14
@anmarchenko anmarchenko merged commit b8f49d9 into main Sep 20, 2024
30 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/logical_names_for_test_sessions branch September 20, 2024 09:18
@github-actions github-actions bot added this to the 1.6.0 milestone Sep 20, 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