Skip to content

test: Fail on UserWarning - #7027

Draft
alexander-alderman-webb wants to merge 1 commit into
masterfrom
webb/fail-on-user-warnings
Draft

test: Fail on UserWarning#7027
alexander-alderman-webb wants to merge 1 commit into
masterfrom
webb/fail-on-user-warnings

Conversation

@alexander-alderman-webb

Copy link
Copy Markdown
Contributor

Description

Issues

Reminders

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

46038 passed | ❌ 165 failed | ⏭️ 3251 skipped | Total: 49454 | Pass Rate: 93.09% | Execution Time: 161m 31s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -52348
Passed Tests 📉 -49524
Failed Tests 📈 +164
Skipped Tests 📉 -2988

➕ New Tests (13)

View new tests
  • test_tool_execution_span[True-True-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[True-False-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[False-True-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[False-False-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[True-True-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[True-False-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[False-True-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[False-False-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[True-True-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[True-False-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[False-True-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_tool_execution_span[False-False-True-False]
    • File: tests.integrations.langchain.test_langchain
    • Status: ❌ Failing
  • test_scope_data_not_leaked_in_threads[propagate_scope=False]
    • File: tests.integrations.threading.test_threading
    • Status: ❌ Failing

➖ Removed Tests (1)

View removed tests
  • test_continuous_profiler_auto_start_and_stop_sampled_span_streaming[experiment-thread]
    • File: tests.profiler.test_continuous_profiler

❌ Failed Tests

test_tool_execution_span[True-True-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.10-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[True-False-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.10-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[False-True-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.10-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[False-False-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.10-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[True-True-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.13-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[True-False-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.13-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[False-True-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.13-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[False-False-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.13-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[True-True-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.14-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[True-False-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.14-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[False-True-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.14-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_tool_execution_span[False-False-True-False]

File: tests.integrations.langchain.test_langchain
Suite: py3.14-langchain-base-v1.3.14
Error: UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

Stack Trace
tests/integrations/langchain/test_langchain.py:1040: in test_tool_execution_span
    ) as _, sentry_sdk.traces.start_span(name="custom parent"):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sentry_sdk/traces.py:173: in start_span
    warnings.warn(
E   UserWarning: Using span streaming API in non-span-streaming mode. Use sentry_sdk.start_transaction() and sentry_sdk.start_span() instead.

test_scope_data_not_leaked_in_threads[propagate_scope=False]

File: tests.integrations.threading.test_threading
Suite: py3.14t-common
Error: pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-108 (do_some_work) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

Stack Trace
tests/integrations/threading/test_threading.py:204: in do_some_work
    assert sentry_sdk.get_isolation_scope()._tags == {}
E   AssertionError: assert {'initial_tag': 'initial_value'} == {}
E     
E     Left contains 1 more item:
E     {'initial_tag': 'initial_value'}
E     
E     Full diff:
E     - {}
E     + {
E     +     'initial_tag': 'initial_value',
E     + }

The above exception was the direct cause of the following exception:
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/runner.py:361: in from_call
    result: TResult | None = func()
                             ^^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/runner.py:250: in <lambda>
    lambda: runtest_hook(item=item, **kwds),
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/pluggy/_hooks.py:512: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/logging.py:865: in pytest_runtest_call
    yield
.tox/py3.14t-common/lib/python3.14t/site-packages/pluggy/_callers.py:53: in run_old_style_hookwrapper
    return result.get_result()
           ^^^^^^^^^^^^^^^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/pluggy/_callers.py:38: in run_old_style_hookwrapper
    res = yield
          ^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/capture.py:900: in pytest_runtest_call
    return (yield)
            ^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/pluggy/_callers.py:53: in run_old_style_hookwrapper
    return result.get_result()
           ^^^^^^^^^^^^^^^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/pluggy/_callers.py:38: in run_old_style_hookwrapper
    res = yield
          ^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/skipping.py:268: in pytest_runtest_call
    return (yield)
            ^^^^^
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/threadexception.py:147: in pytest_runtest_call
    collect_thread_exception(item.config)
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/threadexception.py:70: in collect_thread_exception
    raise errors[0]
.tox/py3.14t-common/lib/python3.14t/site-packages/_pytest/threadexception.py:58: in collect_thread_exception
    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))
E   pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-108 (do_some_work)
E   Enable tracemalloc to get traceback where the object was allocated.
E   See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

✅ Patch coverage is 100.00%. Project has 9330 uncovered lines.
❌ Project coverage is 62.43%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.90%    62.43%   -27.47%
==========================================
  Files          193       193         —
  Lines        24834     24834         —
  Branches      8912      8912         —
==========================================
+ Hits         22326     15504     -6822
- Misses        2508      9330     +6822
- Partials      1415       984      -431

Generated by Codecov Action

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.

1 participant