-
Notifications
You must be signed in to change notification settings - Fork 412
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
chore(ci_visibility): add support for bitmap-based coverage data #10270
Merged
romainkomorndatadog
merged 66 commits into
main
from
romain.komorn/SDTEST-225/use_bytearrays_for_coverage
Aug 26, 2024
Merged
chore(ci_visibility): add support for bitmap-based coverage data #10270
romainkomorndatadog
merged 66 commits into
main
from
romain.komorn/SDTEST-225/use_bytearrays_for_coverage
Aug 26, 2024
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
…e_pytest_plugin_v2
…lugin_v2_itr_support
…of github.com:DataDog/dd-trace-py into romain.komorn/SDTEST-225/pytest_plugin_v2_itr_support
…s_for_pytest_plugin_v2
romainkomorndatadog
changed the title
WIP chore(ci_visibility): add support for bitmap-based coverage data
chore(ci_visibility): add support for bitmap-based coverage data
Aug 22, 2024
romainkomorndatadog
requested review from
erikayasuda,
ManuelPalenzuelaDD,
taegyunkim,
emmettbutler,
brettlangdon and
P403n1x87
August 22, 2024 10:38
emmettbutler
approved these changes
Aug 22, 2024
romainkomorndatadog
deleted the
romain.komorn/SDTEST-225/use_bytearrays_for_coverage
branch
August 26, 2024 14:59
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.
Per a new RFC, line-level coverage data is changing from using the current segment tuples to msgpack-encoded bytes (with little-endian ordering).
CoverageLines
CoverageLines
are introduced representation of coverage in theModuleCodeCollector
, providing a minimal, set-like API, and using a bytes-based internal storage (with bit-shifty fun to account for the desired little-endianness). Afrom_list()
classmethod is added for convenience in test updates.Encoder changes
The new coverage format is stored using
Span.set_struct_tag()
with a dictionary similar to the existing segments-based one:Paths are relative to the repo or workspace root, but prepended with a
/
to make them absolute (this is something that is already done by the backend, but doing it on the client means the backend is not modifying the tracer's payloads).The encoder is temporarily updated to look for the
COVERAGE_TAG_NAME
in both the regular tags and struct tags.ModuleCodeCollector changes
The communication between threads and processes patched for coverage support is switched from JSON to pickling (so that bytes don't need to be converted to an array and then back to bytes). The pickling statements have the
nosec
comment because we know the source of the data.Tests
Tests are updated to account for differences in plugin versions, and some utility methods are added to parse the two different coverage data formats into an intermediary format that can be checked for both without too much conditional hassle.
No release note is added because the internal code coverage collector and the v2 plugin are still unreleased, and the other changes are backwards-compatible.
Checklist
Reviewer Checklist