Skip to content

chore(profiling): resolve test files lints after mypy strict mode enablement#18134

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
vlad/fix-existing-lints-mypy-strict
May 19, 2026
Merged

chore(profiling): resolve test files lints after mypy strict mode enablement#18134
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
vlad/fix-existing-lints-mypy-strict

Conversation

@vlad-scherbich
Copy link
Copy Markdown
Contributor

Description

PR #18077 enabled strict mypy settings. As a result, many profiling tests files now fail the pre-commit hook with old lints. This PR fixes them.

Testing

  • CI

@vlad-scherbich vlad-scherbich added the changelog/no-changelog A changelog entry is not required for this PR. label May 18, 2026
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented May 18, 2026

Benchmarks

Benchmark execution time: 2026-05-18 21:21:56

Comparing candidate commit de8c41b in PR branch vlad/fix-existing-lints-mypy-strict with baseline commit f0f5ba0 in branch main.

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

scenario:iastaspects-lstrip_aspect

  • 🟥 execution_time [+61.923µs; +66.878µs] or [+22.722%; +24.540%]

scenario:iastaspects-translate_aspect

  • 🟥 execution_time [+46.041µs; +56.529µs] or [+9.151%; +11.235%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+98.051µs; +104.565µs] or [+22.373%; +23.859%]

scenario:span-start

  • 🟥 execution_time [+1.437ms; +1.586ms] or [+9.228%; +10.184%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+269.166ns; +306.429ns] or [+13.018%; +14.820%]

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented May 18, 2026

Codeowners resolved as

mypy.ini                                                                @DataDog/python-guild @DataDog/apm-core-python
tests/profiling/_test_multiprocessing.py                                @DataDog/profiling-python
tests/profiling/collector/test_asyncio.py                               @DataDog/profiling-python
tests/profiling/collector/test_asyncio_coroutines.py                    @DataDog/profiling-python
tests/profiling/collector/test_asyncio_deadlock.py                      @DataDog/profiling-python
tests/profiling/collector/test_asyncio_shield.py                        @DataDog/profiling-python
tests/profiling/collector/test_asyncio_taskgroup.py                     @DataDog/profiling-python
tests/profiling/collector/test_asyncio_timeout.py                       @DataDog/profiling-python
tests/profiling/collector/test_asyncio_timeout_at.py                    @DataDog/profiling-python
tests/profiling/collector/test_asyncio_weak_links.py                    @DataDog/profiling-python
tests/profiling/collector/test_lock_reflection.py                       @DataDog/profiling-python
tests/profiling/collector/test_memalloc.py                              @DataDog/profiling-python
tests/profiling/collector/test_stack.py                                 @DataDog/profiling-python
tests/profiling/collector/test_stack_native.py                          @DataDog/profiling-python
tests/profiling/collector/test_threading.py                             @DataDog/profiling-python
tests/profiling/collector/test_utils.py                                 @DataDog/profiling-python
tests/profiling/gevent_fork.py                                          @DataDog/profiling-python
tests/profiling/gunicorn-app.py                                         @DataDog/profiling-python
tests/profiling/simple_program.py                                       @DataDog/profiling-python
tests/profiling/simple_program_fork.py                                  @DataDog/profiling-python
tests/profiling/simple_program_pytorch_gpu.py                           @DataDog/profiling-python
tests/profiling/test_code_provenance.py                                 @DataDog/profiling-python
tests/profiling/test_process_role.py                                    @DataDog/profiling-python
tests/profiling/test_profiler.py                                        @DataDog/profiling-python
tests/profiling/test_uwsgi.py                                           @DataDog/profiling-python
tests/utils.py                                                          @DataDog/python-guild

test_flush_sample_handles_shallow_stack runs in a subprocess where only
in-body imports are available; the module-level 'from typing import cast'
is invisible to it.
@vlad-scherbich vlad-scherbich force-pushed the vlad/fix-existing-lints-mypy-strict branch from 5595b58 to de8c41b Compare May 18, 2026 20:55
@vlad-scherbich vlad-scherbich added the Profiling Continous Profling label May 18, 2026
@vlad-scherbich vlad-scherbich marked this pull request as ready for review May 18, 2026 20:55
@vlad-scherbich vlad-scherbich requested review from a team as code owners May 18, 2026 20:55
@vlad-scherbich
Copy link
Copy Markdown
Contributor Author

/merge -m squash

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented May 19, 2026

View all feedbacks in Devflow UI.

2026-05-19 17:08:58 UTC ℹ️ Start processing command /merge -m squash


2026-05-19 17:09:04 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 56m (p90).


2026-05-19 17:54:46 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 7af4ce7 into main May 19, 2026
1181 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the vlad/fix-existing-lints-mypy-strict branch May 19, 2026 17:54
vlad-scherbich added a commit that referenced this pull request May 20, 2026
…blement (#18134)

## Description

PR #18077 enabled strict mypy settings. As a result, many profiling tests files now fail the pre-commit hook with old lints. This PR fixes them.

## Testing

* CI


Co-authored-by: vlad.scherbich <vlad.scherbich@datadoghq.com>
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. Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants