Skip to content

ref(sanic): Drop send_default_pii support - #7703

Open
pabloDeputter wants to merge 7 commits into
major/3.0from
pablo/sanic-drop-pii
Open

pabloDeputter wants to merge 7 commits into
major/3.0from
pablo/sanic-drop-pii

Conversation

@pabloDeputter

@pabloDeputter pabloDeputter commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Description

Issues

Resolves #7611

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 62837 passed | ❌ 1 failed | ⏭️ 2890 skipped | Total: 65728 | Pass Rate: 95.6% | Execution Time: 174m 17s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -71326
Passed Tests 📉 -67065
Failed Tests 📈 +1
Skipped Tests 📉 -4262

➕ 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: 140530517577728

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:216: 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: 140530517577728

✅ Patch coverage is 100.00%. Project has 2064 uncovered lines.
❌ Project coverage is 90.16%. Comparing base (0fbf5bf) to head (2d3ee8d).

Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.20%    90.16%    -0.04%
==========================================
  Files          194       178       -16
  Lines        26030     20982     -5048
  Branches      9678      7556     -2122
==========================================
+ Hits         23480     18918     -4562
- Misses        2550      2064      -486
- Partials      1454      1195      -259

Generated by Codecov Action

@pabloDeputter
pabloDeputter marked this pull request as ready for review September 24, 2026 14:16
@pabloDeputter
pabloDeputter requested a review from a team as a code owner September 24, 2026 14:16
Comment thread tests/integrations/sanic/test_sanic.py Outdated
{"send_default_pii": False},
None,
id="send_default_pii_false",
{"data_collection": {"url_query_params": {"mode": "denylist", "terms": []}}},

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.

Same optional suggestion as #7705 (comment) -- we don't need the outer data_collection level since it's the same everywhere

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 flattened the test cases in tests/integrations/utils.py so data_collection can be passed directly, the postfix cases _LEGACY still uses the init_kwargs. I also updated aiohttp and arq tests to use the flattened version.

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.

and when merged, I'll update the other integrations so that the legacy cases can be removed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3921844. Configure here.

Comment thread tests/integrations/utils.py

This branch has not been deployed

No deployments
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