Skip to content

ref(langgraph): Drop send_default_pii support - #7742

Merged
alexander-alderman-webb merged 2 commits into
major/3.0from
webb/langgraph/drop-send-default-pii
Sep 29, 2026
Merged

alexander-alderman-webb merged 2 commits into
major/3.0from
webb/langgraph/drop-send-default-pii

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Remove send_default_pii branches from the integration.

Add the data_collection option to all tests for the integration, with gen_ai options enabled if send_default_pii was True, and gen_ai options disabled if send_default_pii was False. When send_default_pii was previously not supplied to sentry_init(), provide data_collection={}.

Split tests that were parametrized on send_default_pii into two non-parametrized tests, with gen_ai options enabled and disabled (the latter suffixed with _no_sensitive_data).

Remove cases of _data_collection tests that are exercised by existing tests now.

Closes #7597

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review September 29, 2026 07:50
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner September 29, 2026 07:50
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 62034 passed | ❌ 1 failed | ⏭️ 2906 skipped | Total: 64941 | Pass Rate: 95.52% | Execution Time: 172m 50s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -71918
Passed Tests 📉 -67656
Failed Tests 📈 +1
Skipped Tests 📉 -4263

➕ New Tests (1)

View new tests
  • test_input_attributes_nonstreaming_chat[True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
    • Status: ❌ Failing

❌ Failed Tests

test_input_attributes_nonstreaming_chat[True-messages0-expected_system_instructions0-expected_input_messages0]

File: tests.integrations.mistral.test_mistral
Suite: py3.10-mistral-v2.0.5
Error: KeyError: 140586757128192

Stack Trace
tests/integrations/mistral/test_mistral.py:380: in test_input_attributes_nonstreaming_chat
    sentry_init(
tests/conftest.py:349: in inner
    client = sentry_sdk.Client(*a, **kw)
sentry_sdk/client.py:278: in __init__
    self._init_impl()
sentry_sdk/client.py:428: in _init_impl
    self.integrations = setup_integrations(
sentry_sdk/integrations/__init__.py:217: in setup_integrations
    for integration_cls in iter_default_integrations(
sentry_sdk/integrations/__init__.py:44: in iter_default_integrations
    yield getattr(import_module(module), cls)
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1024: in _find_and_load
    ???
<frozen importlib._bootstrap>:171: in __enter__
    ???
<frozen importlib._bootstrap>:123: in acquire
    ???
E   KeyError: 140586757128192

✅ Patch coverage is 92.31%. Project has 2056 uncovered lines.
❌ Project coverage is 90.22%. Comparing base (21c9144) to head (755244e).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/langgraph.py 92.31% ⚠️ 1 Missing and 1 partials
Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.28%    90.22%    -0.06%
==========================================
  Files          195       179       -16
  Lines        26195     21016     -5179
  Branches      9758      7536     -2222
==========================================
+ Hits         23649     18960     -4689
- Misses        2546      2056      -490
- Partials      1483      1209      -274

Generated by Codecov Action

),
],
)
def test_pregel_invoke_gates_request_messages_on_inputs_setting(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same q as on the other PR: do we lose test coverage by removing this and the following tests?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Both inputs and outputs enabled are covered by test_pregel_invoke() and both inputs and outputs disabled are covered by test_pregel_invoke_no_sensitive_data().

I've restored the mixed cases in 755244e

@alexander-alderman-webb
alexander-alderman-webb merged commit ac333c1 into major/3.0 Sep 29, 2026
144 of 147 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/langgraph/drop-send-default-pii branch September 29, 2026 11:34
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.

2 participants