feat(processing_errors): Add native/proguard configuration issue detection#111382
feat(processing_errors): Add native/proguard configuration issue detection#111382
Conversation
c1e9426 to
f62ea5d
Compare
2acfa08 to
0bbb6b2
Compare
| from sentry.issues.status_change_message import StatusChangeMessage | ||
| from sentry.models.group import GroupStatus | ||
| from sentry.processing_errors.detection import _redis_key_triggered | ||
| from sentry.processing_errors.detection import _cache_key_triggered |
There was a problem hiding this comment.
Bug: The periodic task resolve_stale_sourcemap_detectors is hardcoded for sourcemaps and was not updated to handle new native detectors, preventing them from ever being resolved.
Severity: HIGH
Suggested Fix
Generalize the resolve_stale_sourcemap_detectors task to handle all detector types. This can be done by making it loop through DETECTOR_CONFIGS or by creating a new generic task like resolve_stale_processing_error_detectors that handles all types.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: src/sentry/processing_errors/tasks.py#L12
Potential issue: The periodic task `resolve_stale_sourcemap_detectors` is hardcoded to
only handle `sourcemap_configuration` detectors. While the detection logic was
generalized to support new `NativeConfigurationType` detectors, the resolution task was
not. As a result, once a native detector is triggered, its `is_triggered` state will
never be reset to `false` automatically. This will prevent any new native processing
errors from being reported for that project because the detection logic returns early if
a detector is already triggered.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| from sentry.workflow_engine.handlers.detector.stateful import ( | ||
| StatefulDetectorHandler, | ||
| get_redis_client, | ||
| ) |
There was a problem hiding this comment.
Resolution task never resolves native detectors
High Severity
The resolve_stale_sourcemap_detectors task only queries for detector__type=SourcemapConfigurationType.slug, so triggered NativeConfigurationType detectors will never be auto-resolved. The detection path was generalized to trigger both sourcemap and native detectors, and _resolve_detector was updated to work generically (using state.detector.type dynamically for cache keys and metrics), but the periodic task's query filter was not updated to also include NativeConfigurationType.slug. Once a native detector is triggered, it stays triggered permanently and can never re-trigger if the problem recurs.
…ction Add a new detector for native debug symbol and Proguard mapping configuration issues, using the generalized framework from the previous commit. Includes: - NativeDetectorHandler and NativeConfigurationType (type_id=13002) - NATIVE_ERROR_TYPES covering native_missing_dsym, native_bad_dsym, native_unsupported_dsym, native_optionally_bundled_dsym, proguard_missing_mapping, proguard_missing_lineno - Feature flag: organizations:native-issue-detection - Tests for handler, detection, and provisioning
0bbb6b2 to
20b82d9
Compare


Add a new detector for native debug symbol and Proguard mapping configuration issues, using the generalized framework from the previous commit.
Includes: