Skip to content

ref(seer): remove SeerViewerContext from task and consumer paths - #121029

Draft
sehr-m wants to merge 1 commit into
sehr/viewer-context-endpoint-cleanupfrom
sehr/viewer-context-tasks-consumers
Draft

ref(seer): remove SeerViewerContext from task and consumer paths#121029
sehr-m wants to merge 1 commit into
sehr/viewer-context-endpoint-cleanupfrom
sehr/viewer-context-tasks-consumers

Conversation

@sehr-m

@sehr-m sehr-m commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

Stacked on #121021. Removes SeerViewerContext from task and consumer call sites:

  • Tasks dispatched from endpoints/webhooks (~11 files): ViewerContextHook already propagates VC from the dispatcher. The explicit SeerViewerContext was redundant.
  • Consumer/ingest paths (~4 files): feedback/usecases/ingest/create_feedback.py already had viewer_context_scope — just removed the redundant SeerViewerContext alongside it. Other consumer paths (event_manager, grouping/ingest/seer) removed SeerViewerContext and rely on the chokepoint viewer_context.missing warning to flag the gap.
  • Mixed paths (endpoint + consumer-dispatched task): Removed SeerViewerContext — endpoint callers have VC via middleware, consumer-dispatched task callers will be covered by adding viewer_context_scope in the task body (future work for tasks like generate_summary_and_run_automation).

What's left (future PR)

  • Cron-dispatched tasks (statistical_detectors, context_engine_index, explorer_index, service_map_utils) still use SeerViewerContext
  • Adding viewer_context_scope at task entry points for tasks dispatched from consumer pipeline

Test plan

  • mypy passes on all changed files
  • ruff passes
  • 129+ targeted tests pass
  • CI

🤖 Generated with Claude Code

Remove SeerViewerContext from tasks dispatched by endpoints/webhooks
(ViewerContextHook already propagates VC) and from consumer paths
(feedback ingest already sets viewer_context_scope, others rely on the
chokepoint observation to flag missing VC).

Task/consumer paths that already had viewer_context_scope keep it.
Cron-dispatched tasks are left for a future PR.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on 0ba811f in this run:

tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py::GetSeerSimilarIssuesTest::test_sends_second_seer_request_when_seer_matches_are_unusablelog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py:210: in test_sends_second_seer_request_when_seer_matches_are_unusable
    assert mock_get_similarity_data.mock_calls == [
E   assert [call({'event...ode': False})] == [call({'event...80731543568})]
E     
E     At index 0 diff: �[0mcall({�[33m'�[39;49;00m�[33mevent_id�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33m12312012112120120908201304152013�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mhash�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33m900a5b062aa6064158724a4b9f17f88e�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mproject_id�[39;49;00m�[33m'�[39;49;00m: �[94m4558580731543568�[39;49;00m, �[33m'�[39;49;00m�[33mstacktrace�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mFailedToFetchError: Charlie didn�[39;49;00m�[33m\'�[39;49;00m�[33mt bring the ball back�[39;49;00m�[33m\n�[39;49;00m�[33m  File �[39;49;00m�[33m"�[39;49;00m�[33mdogpark0.py�[39;49;00m�[33m"�[39;49;00m�[33m, function play_fetch_0�[39;49;00m�[33m\n�[39;49;00m�[33m    raise FailedToFetchError(�[39;49;00m�[33m\'�[39;49;00m�[33mCharlie didn�[39;49;00m�[33m\'�[39;49;00m�[33mt bring the ball back�[39;49;00m�[33m\'�[39;49;00m�[33m)�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mexception_type�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mFailedToFetchError�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mk�[39;49;00m�[33m'�[39;49;00m: �[94m1�[39;49;00m, �[33m'�[39;49;00m�[33mreferrer�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mingest�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mmodel�[39;49;00m�[33m'�[39;49;00m: <GroupingVersion.V1: �[33m'�[39;49;00m�[33mv1�[39;49;00m�[33m'�[39;49;00m>, �[33m'�[39;49;00m�[33mtraining_mode�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m, �[33m'�[39;49;00m�[33mplatform�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mpython�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mskip_fallback�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m}, {�[33m'�[39;49;00m�[33mplatform�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mpython�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mmodel_version�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mv1�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mtraining_mode�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m, �[33m'�[39;49;00m�[33mhybrid_fingerprint�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m})�[90m�[39;49;00m != �[0mcall({�[33m'�[39;49;00m�[33mevent_id�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33m12312012112120120908201304152013�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mhash�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33m900a5b062aa6064158724a4b9f17f88e�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mproject_id�[39;49;00m�[33m'�[39;49;00m: �[94m4558580731543568�[39;49;00m, �[33m'�[39;49;00m�[33mstacktrace�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mFailedToFetchError: Charlie didn�[39;49;00m�[33m\'�[39;49;00m�[33mt bring the ball back�[39;49;00m�[33m\n�[39;49;00m�[33m  File �[39;49;00m�[33m"�[39;49;00m�[33mdogpark0.py�[39;49;00m�[33m"�[39;49;00m�[33m, function play_fetch_0�[39;49;00m�[33m\n�[39;49;00m�[33m    raise FailedToFetchError(�[39;49;00m�[33m\'�[39;49;00m�[33mCharlie didn�[39;49;00m�[33m\'�[39;49;00m�[33mt bring the ball back�[39;49;00m�[33m\'�[39;49;00m�[33m)�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mexception_type�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mFailedToFetchError�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mmodel�[39;49;00m�[33m'�[39;49;00m: <GroupingVersion.V1: �[33m'�[39;49;00m�[33mv1�[39;49;00m�[33m'�[39;49;00m>, �[33m'�[39;49;00m�[33mtraining_mode�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m, �[33m'�[39;49;00m�[33mplatform�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mpython�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mskip_fallback�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m, �[33m'�[39;49;00m�[33mk�[39;49;00m�[33m'�[39;49;00m: �[94m1�[39;49;00m, �[33m'�[39;49;00m�[33mreferrer�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mingest�[39;49;00m�[33m'�[39;49;00m}, {�[33m'�[39;49;00m�[33mplatform�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mpython�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mmodel_version�[39;49;00m�[33m'�[39;49;00m: �[33m'�[39;49;00m�[33mv1�[39;49;00m�[33m'�[39;49;00m, �[33m'�[39;49;00m�[33mtraining_mode�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m, �[33m'�[39;49;00m�[33mhybrid_fingerprint�[39;49;00m�[33m'�[39;49;00m: �[94mFalse�[39;49;00m}, viewer_context={�[33m'�[39;49;00m�[33morganization_id�[39;49;00m�[33m'�[39;49;00m: �[94m4558580731543568�[39;49;00m})�[90m�[39;49;00m
E     
E     Full diff:
E     �[0m�[91m- [�[39;49;00m�[90m�[39;49;00m
E     �[91m-     call({'event_id': '12312012112120120908201304152013', 'hash': '900a5b062aa6064158724a4b9f17f88e', 'project_id': 4558580731543568, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False, 'k': 1, 'referrer': 'ingest'}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False}, viewer_context={'organization_id': 4558580731543568}),�[39;49;00m�[90m�[39;49;00m
E     ? ^^^^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ------------------------------                                                                                                    ------------------------------------------------------�[90m�[39;49;00m
E     �[92m+ [call({'event_id': '12312012112120120908201304152013', 'hash': '900a5b062aa6064158724a4b9f17f88e', 'project_id': 4558580731543568, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False}),�[39;49;00m�[90m�[39;49;00m
E     ? ^                                                                                                                                                                                                                                                                                                                                                                       ++++++++++++++++++++++++++++++�[90m�[39;49;00m
E     �[91m-     call({'event_id': '12312012112120120908201304152013', 'hash': '900a5b062aa6064158724a4b9f17f88e', 'project_id': 4558580731543568, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False, 'k': 0, 'referrer': 'ingest_follow_up'}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False}, viewer_context={'organization_id': 4558580731543568}),�[39;49;00m�[90m�[39;49;00m
E     ? ---                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ----------------------------------------                                                                       ------------------------------------------------------  ^�[90m�[39;49;00m
E     �[92m+  call({'event_id': '12312012112120120908201304152013', 'hash': '900a5b062aa6064158724a4b9f17f88e', 'project_id': 4558580731543568, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 0, 'referrer': 'ingest_follow_up', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False})]�[39;49;00m�[90m�[39;49;00m
E     ?                                                                                                                                                                                                                                                                                                                                                                         ++++++++++++++++++++++++++++++++++++++++                                                                                                                                                                                  ^�[90m�[39;49;00m
E     �[91m- ]�[39;49;00m�[90m�[39;49;00m
tests/sentry/seer/endpoints/test_organization_seer_rpc.py::TestOrganizationSeerRpcEndpoint::test_export_agent_indexes_ignores_caller_supplied_org_idlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_seer_rpc.py:253: in test_export_agent_indexes_ignores_caller_supplied_org_id
    mock_request.assert_called_once_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:989: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: make_agent_export_indexes_request({'org_id': 4558580737114128}, viewer_context={'organization_id': 4558580737114128})
E     Actual: make_agent_export_indexes_request({'org_id': 4558580737114128})
tests/sentry/deletions/tasks/test_seer_repository_deleted.py::NotifySeerRepositoryDeletedTest::test_notifies_seer_via_signed_endpointlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/deletions/tasks/test_seer_repository_deleted.py:39: in test_notifies_seer_via_signed_endpoint
    assert kwargs["viewer_context"]["organization_id"] == self.organization_id
           ^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'viewer_context'
tests/sentry/seer/endpoints/test_organization_seer_rpc.py::TestOrganizationSeerRpcEndpoint::test_export_agent_indexeslog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/seer/endpoints/test_organization_seer_rpc.py:228: in test_export_agent_indexes
    mock_request.assert_called_once_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:989: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: make_agent_export_indexes_request({'org_id': 4558580736851984}, viewer_context={'organization_id': 4558580736851984})
E     Actual: make_agent_export_indexes_request({'org_id': 4558580736851984})
tests/sentry/grouping/seer_similarity/test_seer.py::MaybeCheckSeerForMatchingGroupHashTest::test_bypassed_platform_calls_seer_regardless_of_lengthlog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/grouping/seer_similarity/test_seer.py:192: in test_bypassed_platform_calls_seer_regardless_of_length
    mock_get_similarity_data.assert_called_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: get_similarity_data_from_seer({'event_id': '22312012112120120908201304152013', 'hash': '834c12f8bf067c1809729fa2886b4ca2', 'project_id': 4558580732985376, 'stacktrace': <ANY>, 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False}, viewer_context={'organization_id': 4558580732985376})
E     Actual: get_similarity_data_from_seer({'event_id': '22312012112120120908201304152013', 'hash': '834c12f8bf067c1809729fa2886b4ca2', 'project_id': 4558580732985376, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark1.py", function play_fetch_1\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark2.py", function play_fetch_2\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark3.py", function play_fetch_3\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark4.py", function play_fetch_4\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark5.py", function play_fetch_5\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark6.py", function play_fetch_6\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark7.py", function play_fetch_7\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark8.py", function play_fetch_8\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark9.py", function play_fetch_9\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark10.py", function play_fetch_10\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark11.py", function play_fetch_11\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark12.py", function play_fetch_12\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark13.py", function play_fetch_13\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark14.py", function play_fetch_14\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark15.py", function play_fetch_15\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark16.py", function play_fetch_16\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark17.py", function play_fetch_17\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark18.py", function play_fetch_18\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')\n  File "dogpark19.py", function play_fetch_19\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False})
tests/sentry/tasks/seer/test_night_shift.py::TestRunNightShiftFeatureDelivery::test_dispatches_candidates_to_seer_featurelog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/tasks/seer/test_night_shift.py:792: in test_dispatches_candidates_to_seer_feature
    assert outbox.payload["viewer_context"] == {"organization_id": org.id}
E   AssertionError: assert None == {'organization_id': 4558580740063248}
tests/sentry/grouping/seer_similarity/test_seer.py::MaybeCheckSeerForMatchingGroupHashTest::test_simplelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/grouping/seer_similarity/test_seer.py:53: in test_simple
    mock_get_similarity_data.assert_called_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: get_similarity_data_from_seer({'event_id': '12312012112120120908201304152013', 'hash': 'c08baef1ad91a283bcbd9e4a61d3b480', 'project_id': 4558580732526624, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark.py", function play_fetch\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False}, viewer_context={'organization_id': 4558580732526624})
E     Actual: get_similarity_data_from_seer({'event_id': '12312012112120120908201304152013', 'hash': 'c08baef1ad91a283bcbd9e4a61d3b480', 'project_id': 4558580732526624, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark.py", function play_fetch\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': False}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False})
tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py::GetSeerSimilarIssuesTest::test_sends_skip_fallback_when_feature_flag_enabledlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/grouping/seer_similarity/test_get_seer_similar_issues.py:137: in test_sends_skip_fallback_when_feature_flag_enabled
    mock_get_similarity_data.assert_called_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: get_similarity_data_from_seer({'event_id': '12312012112120120908201304152013', 'hash': '900a5b062aa6064158724a4b9f17f88e', 'project_id': 4558580732592144, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': True}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False}, viewer_context={'organization_id': 4558580732592144})
E     Actual: get_similarity_data_from_seer({'event_id': '12312012112120120908201304152013', 'hash': '900a5b062aa6064158724a4b9f17f88e', 'project_id': 4558580732592144, 'stacktrace': 'FailedToFetchError: Charlie didn\'t bring the ball back\n  File "dogpark0.py", function play_fetch_0\n    raise FailedToFetchError(\'Charlie didn\'t bring the ball back\')', 'exception_type': 'FailedToFetchError', 'k': 1, 'referrer': 'ingest', 'model': <GroupingVersion.V1: 'v1'>, 'training_mode': False, 'platform': 'python', 'skip_fallback': True}, {'platform': 'python', 'model_version': 'v1', 'training_mode': False, 'hybrid_fingerprint': False})
tests/sentry/feedback/usecases/ingest/test_create_feedback.py::test_create_feedback_issue_title_from_seerlog
[gw0] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/feedback/usecases/ingest/test_create_feedback.py:817: in test_create_feedback_issue_title_from_seer
    mock_get_feedback_title.assert_called_once_with(
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:989: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: get_feedback_title('The login button is broken and the UI is slow', 4558580732854288, True, viewer_context={'organization_id': 4558580732854288})
E     Actual: get_feedback_title('The login button is broken and the UI is slow', 4558580732854288, True)
tests/sentry/event_manager/test_severity.py::TestGetEventSeverity::test_error_event_simplelog
[gw1] linux -- Python 3.13.1 /home/runner/work/sentry/sentry/.venv/bin/python3
tests/sentry/event_manager/test_severity.py:99: in test_error_event_simple
    vc = decode_viewer_context(headers["X-Viewer-Context"], key="some-secret")
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   KeyError: 'X-Viewer-Context'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant