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

feat(ci_visibility): make pytest v2 plugin the default version #12066

Merged

Conversation

vitor-de-araujo
Copy link
Contributor

@vitor-de-araujo vitor-de-araujo commented Jan 24, 2025

Previously, the pytest v2 plugin was disabled by default, and could be enabled by setting the DD_PYTEST_USE_NEW_PLUGIN_BETA variable to true. In ddtrace 3.0, the pytest v2 plugin will be enabled by default, and DD_PYTEST_USE_NEW_PLUGIN_BETA will not be used anymore.

For now I'm not removing the code for the old plugin version. Instead, I'm adding an internal environment variable _DD_PYTEST_USE_LEGACY_PLUGIN that allows running pytest with the old plugin, and using that in the tests that depend on it. We can remove the code (and the variable) after the 3.x release, since this is not part of the public interface.

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

Copy link
Contributor

github-actions bot commented Jan 24, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/ci_visibility-feat-pytest-v2-default-db160906c0ba26dc.yaml  @DataDog/apm-python
.gitlab/tests.yml                                                       @DataDog/python-guild @DataDog/apm-core-python
ddtrace/contrib/internal/pytest/_plugin_v1.py                           @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/pytest/_plugin_v2.py                           @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/pytest/_utils.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
docs/configuration.rst                                                  @DataDog/python-guild
hatch.toml                                                              @DataDog/python-guild
riotfile.py                                                             @DataDog/apm-python
tests/contrib/flask/test_appsec_flask_pytest_iast_no_snapshot.py        @DataDog/asm-python
tests/contrib/pytest/test_pytest_snapshot.py                            @DataDog/ci-app-libraries
tests/contrib/pytest/test_pytest_snapshot_v2.py                         @DataDog/ci-app-libraries
tests/contrib/selenium/test_selenium_chrome.py                          @DataDog/ci-app-libraries

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Jan 24, 2025

Datadog Report

Branch report: vitor-de-araujo/SDTEST-1210/pytest-v2-default
Commit report: 4d60ace
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1468 Skipped, 4m 57.93s Total duration (35m 44.53s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Jan 24, 2025

Benchmarks

Benchmark execution time: 2025-02-03 11:28:45

Comparing candidate commit 4d60ace in PR branch vitor-de-araujo/SDTEST-1210/pytest-v2-default with baseline commit 7257296 in branch 3.x-staging.

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

@vitor-de-araujo vitor-de-araujo changed the title Make pytest v2 plugin the default version chore(ci_visibility): make pytest v2 plugin the default version Jan 24, 2025
@vitor-de-araujo vitor-de-araujo marked this pull request as ready for review January 24, 2025 15:46
@vitor-de-araujo vitor-de-araujo requested review from a team as code owners January 24, 2025 15:46
@vitor-de-araujo vitor-de-araujo changed the title chore(ci_visibility): make pytest v2 plugin the default version feat(ci_visibility): make pytest v2 plugin the default version Jan 24, 2025
@vitor-de-araujo vitor-de-araujo changed the base branch from main to 3.x-staging January 28, 2025 13:46
@vitor-de-araujo vitor-de-araujo requested review from a team as code owners January 28, 2025 14:02
@vitor-de-araujo vitor-de-araujo removed the request for review from a team January 28, 2025 14:02
@vitor-de-araujo vitor-de-araujo force-pushed the vitor-de-araujo/SDTEST-1210/pytest-v2-default branch from 880e7da to 5b86be4 Compare January 28, 2025 14:25
@vitor-de-araujo vitor-de-araujo merged commit 1b09528 into 3.x-staging Feb 3, 2025
760 checks passed
@vitor-de-araujo vitor-de-araujo deleted the vitor-de-araujo/SDTEST-1210/pytest-v2-default branch February 3, 2025 13:47
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.

6 participants