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

chore: set the default of _should_skip to false #11274

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

wantsui
Copy link
Collaborator

@wantsui wantsui commented Nov 1, 2024

While reviewing the flaky marker in gunicorn's test_span_schematization in

@flaky(until=1706677200)
, @brettlangdon pointed out that the timestamp is long past.

ie:

@flaky(until=1706677200)

This translates to Jan 31, 2024.

However, if you run the test for test_span_schematization today, it passes fine because it is getting skipped:

1 passed with 0 warnings, 0 failed

The bug fix here is to set the default to false, but keep the spirit of the original condition if statement.

If you rerun the test_span_schematization with this branch, it now doesn't get skip and the test correctly fails:

FAILED tests/contrib/gunicorn/test_gunicorn.py::test_span_schematization - AttributeError: module 'ddtrace.internal.compat' has no attribute 'stringify'

Leaving this PR in a draft state for now to see what other tests this affects.

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 Nov 1, 2024

CODEOWNERS have been resolved as:

tests/utils.py                                                          @DataDog/python-guild

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

datadog-dd-trace-py-rkomorn bot commented Nov 1, 2024

Datadog Report

Branch report: wantsui/fix-should-skip
Commit report: ebfb726
Test service: dd-trace-py

✅ 0 Failed, 958 Passed, 328 Skipped, 22m 53.01s Total duration (13m 53.72s time saved)

Comment on lines +1342 to +1344
if condition is not None and condition:
return True
return False
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if condition is not None and condition:
return True
return False
return condition is not None and condition

Copy link
Contributor

Choose a reason for hiding this comment

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

nit suggestion

@wantsui wantsui changed the title fix: set the default of _should_skip to false chore: set the default of _should_skip to false Nov 1, 2024
@pr-commenter
Copy link

pr-commenter bot commented Nov 8, 2024

Benchmarks

Benchmark execution time: 2024-11-14 22:41:19

Comparing candidate commit ebfb726 in PR branch wantsui/fix-should-skip with baseline commit bd0097f in branch main.

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

scenario:iast_aspects-ospathjoin_aspect

  • 🟩 execution_time [-720.995ns; -648.395ns] or [-12.171%; -10.946%]

scenario:iast_aspects-ospathnormcase_aspect

  • 🟩 execution_time [-244.555ns; -208.504ns] or [-9.142%; -7.795%]

@wantsui wantsui added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 14, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants