fix(integrations): raise sync_status_outbound processing deadline to 30s - #120726
Draft
billyvg wants to merge 1 commit into
Draft
fix(integrations): raise sync_status_outbound processing deadline to 30s#120726billyvg wants to merge 1 commit into
billyvg wants to merge 1 commit into
Conversation
sync_status_outbound did not set processing_deadline_duration, so it inherited the 10s default. The task makes 3 RPC calls plus 2 proxied Azure DevOps requests (~2.5s) before issuing the work-item PATCH, leaving under 7.5s for a request whose own HTTP timeout is 10s. Under normal network variance the PATCH exceeded the remaining budget and the task was killed with ProcessingDeadlineExceeded; with all 5 retries failing the same way, the status sync was silently discarded. Align with the sibling sync_assignee_outbound task, which already uses a 30s deadline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019zHLGtYfgXd9JfY3Ee66nT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
ProcessingDeadlineExceeded('execution deadline of 10 seconds exceeded by sentry.integrations.tasks.sync_status_outbound').25662458568e42c89e207aaba3f6bf34de(EU region), VSTS (Azure DevOps) integrationRoot cause
sync_status_outboundnever setprocessing_deadline_duration, so it inherited the 10 second default. That budget is too small for the work the task actually does:get_integrationget_organization_integrationsget_integration_external_projectRoughly 2.5s elapses before the PATCH is even issued, leaving under 7.5s for a request whose own HTTP timeout is 10s. Under ordinary network variance (DNS, TCP setup, proxy overhead) the PATCH regularly runs past the remaining budget. The stack trace confirms the deadline fires inside
_new_conn()→safe_create_connection(), while the TCP socket for the PATCH is still being established — i.e. the task is killed mid-connect, not stuck in application logic.Because the activation is configured with:
sustained network slowness makes all 5 attempts fail identically and the sync is then silently discarded — VSTS users' work item statuses never sync, with no user-visible signal.
Fix
Set
processing_deadline_duration=30on the task. 30s covers the two proxied calls at their full 10s HTTP timeout plus RPC overhead, with headroom.This also aligns the task with its sibling
sync_assignee_outbound, which already uses a 30s deadline for the same shape of work:What was ruled out
ProcessingDeadlineExceededas a halt inIntegrationEventLifecycle.__exit__(src/sentry/integrations/utils/metrics.py) — noted in triage as an optional secondary improvement to stop generating spurious Sentry issues for infra timeouts. Deliberately not included here: this PR fixes the root cause only. Worth doing separately, since after this change a deadline breach is a genuine signal rather than routine noise.Testing
The dev environment in the session where this was authored had no provisioned
.venv/ Postgres, so the integration task suite could not be executed locally. The change is a single decorator keyword argument that is validated against theinstrumented_tasksignature (processing_deadline_duration: int | datetime.timedelta | None);ruff checkandruff format --checkpass on the modified file. Please let CI runtests/sentry/integrations/tasks/.🤖 Generated with Claude Code
https://claude.ai/code/session_019zHLGtYfgXd9JfY3Ee66nT
Generated by Claude Code