-
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-2844] Add test session public API #72
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
==========================================
+ Coverage 99.20% 99.30% +0.09%
==========================================
Files 111 125 +14
Lines 3792 4328 +536
Branches 141 153 +12
==========================================
+ Hits 3762 4298 +536
Misses 30 30 ☔ View full report in Codecov by Sentry. |
…he active test session in #trace_test
…based on settings
anmarchenko
force-pushed
the
anmarchenko/test_session_tracing
branch
from
November 24, 2023 07:16
f6c9a93
to
b0537e3
Compare
…ple tags one by one
…t is not reentrant, keep only smallest operations synchronized
juan-fernandez
approved these changes
Nov 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
First step towards achieving test suite level visibility (TSLV) in Ruby
Adds test session manual API that is used like that:
On recorder level it adds:
Datadog::CI::TestSession
domain model that wraps tracer's span that represents the whole sessionDatadog::CI::ConcurrentSpan
domain model that provides thread safety around tracer's span (TestSession is inherited from ConcurrentSpan as it is shared between threads)Datadog::CI::Context::Global
that represents process-global context that will store active test session, active test module, and a set of active test suitesOn transport level it adds:
Serializers::Factories::TestSuiteLevel
that is capable of creating test suite level payload serializersSerializers::TestV2
that converts test span to citestcycle test event with version 2 (containing test_session_id field)Serializers::TestSession
that converts session span to citestcycle eventTo configuration it adds:
settings.ci.experimental_test_suite_level_visibility_enabled
- it will exists only for transitionary period before test suite level visibility in Ruby is going to be tested and adoptedNotes
Issues to solve or test in the future:
How to test the change?
Code is covered by a set of unit tests, end2end testing will be possible as soon as test modules and test suites are implemented