Skip to content

fix(ci-visibility): proper test suite status with xdist [backport 3.7] #13427

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

Merged
merged 3 commits into from
May 17, 2025

Conversation

github-actions[bot]
Copy link
Contributor

Backport 83dea4c from #13414 to 3.7.

CI Visibility: This fix resolves an issue where ddtrace pytest plugin used with pytest-xdist would report test suites as failing even when all tests pass.

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@github-actions github-actions bot requested review from a team as code owners May 15, 2025 07:23
Copy link
Contributor Author

CODEOWNERS have been resolved as:

releasenotes/notes/ci-vis-xdist-suite-failing-3a0c20b8379f10e4.yaml     @DataDog/apm-python
tests/contrib/pytest/test_pytest_xdist_snapshot.py                      @DataDog/ci-app-libraries
tests/snapshots/tests.contrib.pytest.test_pytest_xdist_snapshot.test_pytest_xdist_will_include_lines_pct.json  @DataDog/apm-python
tests/snapshots/tests.contrib.pytest.test_pytest_xdist_snapshot.test_pytest_xdist_with_ddtrace_patch_all.json  @DataDog/apm-python
tests/snapshots/tests.contrib.pytest.test_pytest_xdist_snapshot.test_pytest_xdist_wont_include_lines_pct_if_report_empty.json  @DataDog/apm-python
ddtrace/contrib/internal/pytest/_plugin_v2.py                           @DataDog/ci-app-libraries
ddtrace/internal/ci_visibility/api/_base.py                             @DataDog/ci-app-libraries

Copy link
Contributor Author

github-actions bot commented May 16, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 231 ± 2 ms.

The average import time from base is: 234 ± 2 ms.

The import time difference between this PR and base is: -2.62 ± 0.09 ms.

Import time breakdown

The following import paths have grown:

ddtrace.auto 0.014 ms (0.01%)
ddtrace 0.014 ms (0.01%)
ddtrace._monkey 0.014 ms (0.01%)
ddtrace.appsec._listeners 0.014 ms (0.01%)
ddtrace.appsec 0.014 ms (0.01%)

The following import paths have shrunk:

ddtrace.auto 2.062 ms (0.89%)
ddtrace.bootstrap.sitecustomize 1.356 ms (0.59%)
ddtrace.bootstrap.preload 1.356 ms (0.59%)
ddtrace.internal.products 1.356 ms (0.59%)
ddtrace.internal.remoteconfig.client 0.666 ms (0.29%)
ddtrace 0.706 ms (0.31%)
ddtrace._logger 0.036 ms (0.02%)
logging 0.036 ms (0.02%)
traceback 0.036 ms (0.02%)
contextlib 0.036 ms (0.02%)

@pr-commenter
Copy link

pr-commenter bot commented May 16, 2025

Benchmarks

Benchmark execution time: 2025-05-16 19:29:16

Comparing candidate commit 6cf0bbc in PR branch backport-13414-to-3.7 with baseline commit aa2c619 in branch 3.7.

Found 0 performance improvements and 3 performance regressions! Performance is the same for 504 metrics, 5 unstable metrics.

scenario:iast_aspects-lstrip_aspect

  • 🟥 execution_time [+1.567µs; +1.685µs] or [+11.923%; +12.822%]

scenario:iast_aspects-rsplit_aspect

  • 🟥 execution_time [+143.409ns; +175.778ns] or [+9.726%; +11.921%]

scenario:iast_aspects-upper_aspect

  • 🟥 execution_time [+177.272ns; +225.910ns] or [+7.840%; +9.991%]

@gnufede gnufede enabled auto-merge (squash) May 16, 2025 19:44
@gnufede gnufede merged commit 8e3ea51 into 3.7 May 17, 2025
400 checks passed
@gnufede gnufede deleted the backport-13414-to-3.7 branch May 17, 2025 08:43
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.

2 participants