DataDog / dd-trace-py

Datadog Python APM Client
https://ddtrace.readthedocs.io/
Other
506 stars 397 forks source link

WIP chore(ci_visibility): collect module-level line execution and imports #9609

Open romainkomorndatadog opened 1 week ago

romainkomorndatadog commented 1 week ago

NOTE: still very much a WIP

This explores changes necessary for coverage collection for the Intelligent Test Runner in order to be able to properly capture import-time dependencies on other modules.

To achieve this, the following are introduced:

The pytest usage of the internal coverage library is updated to use the collection of import-time lines, resulting in expanded coverage for all tests (or suites if using suite-level skipping).

Checklist

Reviewer Checklist

datadog-dd-trace-py-rkomorn[bot] commented 1 week ago

Datadog Report

Branch report: romain.komorn/CIVIS-9428/add_session_coverage Commit report: 0b535b8 Test service: dd-trace-py

:x: 35 Failed (0 Known Flaky), 175423 Passed, 1139 Skipped, 11h 27m 18.3s Total duration (27m 59.73s time saved)

:x: Failed Tests (35)

This report shows up to 5 failed tests.

  • test_cmdi - test_pygoat.py - Details
<details>
<summary>Expand for error</summary>

```
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
```
</details>
pr-commenter[bot] commented 1 week ago

Benchmarks

Benchmark execution time: 2024-06-27 14:53:05

Comparing candidate commit 42240d9a59bb4f885c99afca82dcbff4770d06e3 in PR branch romain.komorn/CIVIS-9428/add_session_coverage with baseline commit 83f8e3c8b7d0181bb10fa930670c84048acd0a3e in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 205 metrics, 9 unstable metrics.