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

ci(telemetry): expect observed test result #8773

Merged
merged 6 commits into from
Mar 26, 2024

Conversation

emmettbutler
Copy link
Collaborator

@emmettbutler emmettbutler commented Mar 26, 2024

This change makes an unreliable test expect the results that it actually gets in CI:
https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/58336/workflows/1bed424b-752e-4748-b3ef-ce3cad32ea72/jobs/3688991

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

@emmettbutler emmettbutler added the changelog/no-changelog A changelog entry is not required for this PR. label Mar 26, 2024
@emmettbutler emmettbutler requested a review from a team as a code owner March 26, 2024 16:16
@datadog-dd-trace-py-rkomorn
Copy link

Datadog Report

Branch report: emmett.butler/telemetry-gte
Commit report: 67141dd
Test service: dd-trace-py

❌ 1 Failed (0 Known Flaky), 170730 Passed, 1909 Skipped, 11h 47m 40.84s Total duration (42m 40.94s time saved)

❌ Failed Tests (1)

  • test_add_event_disabled_writer - test_writer.py - Details

    Expand for error
     assert 1 == 0
      +  where 1 = len([{'body': {'api_version': 'v2', 'application': {'env': '', 'language_name': 'python', 'language_version': '3.7.16', 'p...brary-Language': 'python', ...}, 'method': 'POST', 'url': 'http://localhost:9126/telemetry/proxy/api/v2/apmtelemetry'}])
      +    where [{'body': {'api_version': 'v2', 'application': {'env': '', 'language_name': 'python', 'language_version': '3.7.16', 'p...brary-Language': 'python', ...}, 'method': 'POST', 'url': 'http://localhost:9126/telemetry/proxy/api/v2/apmtelemetry'}] = <bound method TelemetryTestSession.get_requests of <tests.conftest.TelemetryTestSession object at 0x7fc3d2909fd0>>()
      +      where <bound method TelemetryTestSession.get_requests of <tests.conftest.TelemetryTestSession object at 0x7fc3d2909fd0>> = <tests.conftest.TelemetryTestSession object at 0x7fc3d2909fd0>.get_requests
    

@pr-commenter
Copy link

pr-commenter bot commented Mar 26, 2024

Benchmarks

Benchmark execution time: 2024-03-26 17:20:03

Comparing candidate commit 67141dd in PR branch emmett.butler/telemetry-gte with baseline commit bf4915e in branch main.

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

scenario:flasksimple-appsec-telemetry

  • 🟩 execution_time [-280.072µs; -231.660µs] or [-4.297%; -3.555%]

scenario:httppropagationextract-invalid_span_id_header

  • 🟥 max_rss_usage [+662.297KB; +737.306KB] or [+3.128%; +3.483%]

scenario:httppropagationextract-large_valid_headers_all

  • 🟥 max_rss_usage [+705.205KB; +782.872KB] or [+3.330%; +3.697%]

scenario:httppropagationextract-medium_valid_headers_all

  • 🟥 max_rss_usage [+680.908KB; +757.607KB] or [+3.217%; +3.580%]

scenario:httppropagationextract-wsgi_valid_headers_all

  • 🟥 max_rss_usage [+698.828KB; +792.525KB] or [+3.307%; +3.751%]

Copy link
Contributor

@mabdinur mabdinur left a comment

Choose a reason for hiding this comment

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

The current changes look good but we can simplify this test to avoid the flaky behavior. We can also use this strategy to improve the reliability of other telemetry tests.

emmettbutler and others added 4 commits March 26, 2024 12:02
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
@emmettbutler emmettbutler enabled auto-merge (squash) March 26, 2024 19:03
@emmettbutler emmettbutler merged commit 7503084 into main Mar 26, 2024
28 checks passed
@emmettbutler emmettbutler deleted the emmett.butler/telemetry-gte branch March 26, 2024 19:18
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