Skip to content

fix(scm): Remove exception squash#110764

Merged
cmanallen merged 3 commits intomasterfrom
cmanallen/scm-raise-on-deserialization-fail
Mar 16, 2026
Merged

fix(scm): Remove exception squash#110764
cmanallen merged 3 commits intomasterfrom
cmanallen/scm-raise-on-deserialization-fail

Conversation

@cmanallen
Copy link
Member

We're reporting to Sentry and we raise elsewhere in the function anyway. Might as well raise. Should make local testing a little easier.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 16, 2026
@cmanallen cmanallen enabled auto-merge (squash) March 16, 2026 17:52
Copy link
Contributor

@cursor cursor bot left a comment

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 prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Callers still pass removed report_error parameter
    • Removed the stale report_error keyword argument from both webhook task call sites so run_listener is invoked with its current signature.

Create PR

Or push these changes by commenting:

@cursor push b03baae548
Preview (b03baae548)
diff --git a/src/sentry/scm/private/ipc.py b/src/sentry/scm/private/ipc.py
--- a/src/sentry/scm/private/ipc.py
+++ b/src/sentry/scm/private/ipc.py
@@ -408,7 +408,6 @@
         event_type_hint,
         stream=scm_event_stream,
         get_current_time=time.time,
-        report_error=report_error_to_sentry,
         record_count=record_count_metric,
         record_distribution=record_distribution_metric,
         record_timer=record_timer_metric,
@@ -430,7 +429,6 @@
         event_type_hint,
         stream=scm_event_stream,
         get_current_time=time.time,
-        report_error=report_error_to_sentry,
         record_count=record_count_metric,
         record_distribution=record_distribution_metric,
         record_timer=record_timer_metric,

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

@github-actions
Copy link
Contributor

Backend Test Failures

Failures on 8fef7cf in this run:

tests/sentry/scm/integration/test_ipc_integration.py::TestWebhookHandlerControlTaskIntegration::test_run_webhook_handler_control_task_successlog
tests/sentry/scm/integration/test_ipc_integration.py:36: in test_run_webhook_handler_control_task_success
    run_webhook_handler_control_task.delay("anything", "", "check_run")
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
src/sentry/taskworker/task.py:98: in delay
    self.apply_async(args=args, kwargs=kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
src/sentry/taskworker/task.py:128: in apply_async
    self._func(*args, **kwargs)
src/sentry/scm/private/ipc.py:405: in run_webhook_handler_control_task
    run_listener(
src/sentry/scm/private/ipc.py:478: in run_listener
    event = deserialize_event(event_data, event_type_hint)
src/sentry/scm/private/ipc.py:283: in deserialize_event
    return deserialize_check_run_event(event)
src/sentry/scm/private/ipc.py:157: in deserialize_check_run_event
    parsed = check_run_event_decoder.decode(event_data)
E   msgspec.DecodeError: Input data was truncated
tests/sentry/scm/integration/test_ipc_integration.py::TestWebhookHandlerRegionTaskIntegration::test_run_webhook_handler_region_task_successlog
tests/sentry/scm/integration/test_ipc_integration.py:44: in test_run_webhook_handler_region_task_success
    run_webhook_handler_region_task.delay("anything", "", "check_run")
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
src/sentry/taskworker/task.py:98: in delay
    self.apply_async(args=args, kwargs=kwargs)
src/sentry/silo/base.py:158: in override
    return original_method(*args, **kwargs)
src/sentry/taskworker/task.py:128: in apply_async
    self._func(*args, **kwargs)
src/sentry/scm/private/ipc.py:426: in run_webhook_handler_region_task
    run_listener(
src/sentry/scm/private/ipc.py:478: in run_listener
    event = deserialize_event(event_data, event_type_hint)
src/sentry/scm/private/ipc.py:283: in deserialize_event
    return deserialize_check_run_event(event)
src/sentry/scm/private/ipc.py:157: in deserialize_check_run_event
    parsed = check_run_event_decoder.decode(event_data)
E   msgspec.DecodeError: Input data was truncated

@cmanallen cmanallen merged commit 5df5558 into master Mar 16, 2026
57 checks passed
@cmanallen cmanallen deleted the cmanallen/scm-raise-on-deserialization-fail branch March 16, 2026 18:55
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.

2 participants