Skip to content

ci: fix conftest compatibility with pytest 8.1 #8579

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

Closed
wants to merge 6 commits into from

Conversation

gnufede
Copy link
Member

@gnufede gnufede commented Mar 4, 2024

See: pytest-dev/pytest#11779

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.
  • If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • 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

@gnufede gnufede added changelog/no-changelog A changelog entry is not required for this PR. CI labels Mar 4, 2024
Copy link
Contributor

@romainkomorn-exdatadog romainkomorn-exdatadog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fancy sparkly stuff. :)

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

datadog-dd-trace-py-rkomorn bot commented Mar 4, 2024

Datadog Report

Branch report: gnufede/fix-conftest-pytest-8.1
Commit report: 242e647
Test service: dd-trace-py

✅ 0 Failed, 172122 Passed, 1092 Skipped, 10m 6.96s Wall Time
❄️ 1 New Flaky

New Flaky Tests (1)

  • test_awakeable_periodic_service - test_periodic.py - Last Failure

    Expand for error
     assert [0, 1, 2, 3, 4, 5, ...] == [0, 1, 2, 3, 4, 5, ...]
       Right contains one more item: 11
       Full diff:
       - [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
       ?                                  ----
       + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    

@pr-commenter
Copy link

pr-commenter bot commented Mar 4, 2024

Benchmarks

Benchmark execution time: 2024-03-04 15:01:03

Comparing candidate commit 242e647 in PR branch gnufede/fix-conftest-pytest-8.1 with baseline commit c00d02e in branch main.

Found 7 performance improvements and 4 performance regressions! Performance is the same for 192 metrics, 9 unstable metrics.

scenario:coreapiscenario-context_with_data_listeners_and_all_listeners

  • 🟥 max_rss_usage [+815.620KB; +980.066KB] or [+2.806%; +3.371%]

scenario:coreapiscenario-context_with_data_no_listeners

  • 🟩 max_rss_usage [-907.879KB; -739.942KB] or [-3.022%; -2.463%]

scenario:coreapiscenario-core_dispatch_no_listeners

  • 🟩 max_rss_usage [-801.645KB; -650.796KB] or [-2.674%; -2.170%]

scenario:coreapiscenario-core_dispatch_only_all_listeners

  • 🟩 max_rss_usage [-899.041KB; -746.322KB] or [-2.994%; -2.485%]

scenario:coreapiscenario-core_dispatch_with_results_no_listeners

  • 🟩 max_rss_usage [-823.385KB; -666.331KB] or [-2.748%; -2.224%]

scenario:coreapiscenario-core_dispatch_with_results_only_all_listeners

  • 🟥 max_rss_usage [+809.522KB; +963.227KB] or [+2.787%; +3.316%]

scenario:coreapiscenario-get_item_exists

  • 🟩 max_rss_usage [-812.740KB; -662.639KB] or [-2.712%; -2.211%]

scenario:coreapiscenario-get_item_missing

  • 🟩 max_rss_usage [-768.312KB; -625.147KB] or [-2.565%; -2.087%]

scenario:coreapiscenario-set_item

  • 🟩 max_rss_usage [-895.559KB; -730.144KB] or [-2.984%; -2.433%]

scenario:flasksimple-debugger

  • 🟥 execution_time [+316.531µs; +365.260µs] or [+5.036%; +5.811%]

scenario:otelspan-start

  • 🟥 max_rss_usage [+4.375MB; +4.501MB] or [+9.721%; +9.999%]

@gnufede gnufede force-pushed the gnufede/fix-conftest-pytest-8.1 branch from a95b7c5 to daece9f Compare March 4, 2024 13:53
ITR:NoSkip
@gnufede gnufede marked this pull request as ready for review March 4, 2024 14:20
@gnufede gnufede requested a review from a team as a code owner March 4, 2024 14:20
@gnufede gnufede requested review from majorgreys and mabdinur March 4, 2024 14:20
@gnufede gnufede enabled auto-merge (squash) March 4, 2024 14:20
@romainkomorn-exdatadog
Copy link
Contributor

romainkomorn-exdatadog commented Mar 4, 2024

"That'll do", but I did a quick scan of the repo and it doesn't seem to me like we're "actively" using https://github.com/DataDog/dd-trace-py/blame/main/conftest.py#L73 .

We're using PY_DIR_PATTERN = re.compile(r"^py[23][0-9]$") and we only have one directory that matches:

dd-trace-py % fd --type directory | grep 'py[23][0-9]'
tests/debugging/py35/

@P403n1x87 , do we care about this and Python versions anymore, now that ddtrace is Python 3.7+? Can we drop the pytest_ignore_collect hook altogether?

@romainkomorn-exdatadog
Copy link
Contributor

tests/debugging/py35/

Turns out that's empty and just sticking around my filesystem because of __pycache__ , so yeah, I think @gnufede is right with #8582 .

@gnufede gnufede disabled auto-merge March 4, 2024 14:54
@gnufede
Copy link
Member Author

gnufede commented Mar 4, 2024

Closed in favor of #8582

@gnufede gnufede closed this Mar 4, 2024
@gnufede gnufede deleted the gnufede/fix-conftest-pytest-8.1 branch March 4, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR. CI [DEPRECATED] backport 1.20
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants