Skip to content

ref(flask): Drop send_default_pii support - #7700

Closed
pabloDeputter wants to merge 6 commits into
major/3.0from
pablo/flask-drop-pii
Closed

pabloDeputter wants to merge 6 commits into
major/3.0from
pablo/flask-drop-pii

Conversation

@pabloDeputter

@pabloDeputter pabloDeputter commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Description

Issues

Resolves #7590

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 57603 passed | ❌ 1 failed | ⏭️ 2729 skipped | Total: 60333 | Pass Rate: 95.48% | Execution Time: 157m 40s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -76526
Passed Tests 📉 -72087
Failed Tests 📈 +1
Skipped Tests 📉 -4440

➕ New Tests (1)

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

❌ Failed Tests

test_input_attributes_nonstreaming_chat[messages0-expected_system_instructions0-expected_input_messages0]

File: tests.integrations.mistral.test_mistral
Suite: py3.10-mistral-v2.6.0
Error: KeyError: 139926217306112

Stack Trace
tests/integrations/mistral/test_mistral.py:389: 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: 139926217306112

✅ Patch coverage is 100.00%. Project has 2070 uncovered lines.
❌ Project coverage is 90.04%. Comparing base (0d73f7a) to head (6b7b7d8).

Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.25%    90.04%    -0.21%
==========================================
  Files          195       179       -16
  Lines        26195     20793     -5402
  Branches      9758      7308     -2450
==========================================
+ Hits         23641     18723     -4918
- Misses        2554      2070      -484
- Partials      1484      1220      -264

Generated by Codecov Action

(event,) = events

assert event["request"]["data"]["password"] == "[Filtered]"
assert event["request"]["data"]["password"] == "ohno"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure whether this is correct behavior...but adding the explicit data_collection={} to sentry_init collects request body including the password.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe in data collection mode, this stuff needs to be scrubbed explicitly in before_send (cc @ericapisani if I'm wrong here)

@pabloDeputter
pabloDeputter marked this pull request as ready for review September 28, 2026 11:15
@pabloDeputter
pabloDeputter requested a review from a team as a code owner September 28, 2026 11:15
(event,) = events

assert event["request"]["data"]["password"] == "[Filtered]"
assert event["request"]["data"]["password"] == "ohno"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe in data collection mode, this stuff needs to be scrubbed explicitly in before_send (cc @ericapisani if I'm wrong here)

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