ref(crons): Reorganize incident creation / issue occurrence logic#13
Open
ShashankFC wants to merge 1 commit into
Open
ref(crons): Reorganize incident creation / issue occurrence logic#13ShashankFC wants to merge 1 commit into
ShashankFC wants to merge 1 commit into
Conversation
…0528) Since we'll be doing more with issue occurrences split out the concept of incidents into it's own logic module, as well as incident_occurrence into it's own module Part of GH-80527
Contributor
Author
|
bugbot run |
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.
| "id": str(monitor_environment.monitor.guid), | ||
| "slug": str(monitor_environment.monitor.slug), | ||
| "name": monitor_environment.monitor.name, | ||
| "config": monitor_environment.monitor.config, |
There was a problem hiding this comment.
Local config copy is never used in return
Medium Severity
In get_monitor_environment_context, a local config copy is created and the schedule_type key is replaced with a human-readable display value, but the return dict on line 168 uses the original monitor_environment.monitor.config instead of the local config variable. The schedule_type transformation is effectively dead code, and the monitor context will always contain the raw schedule_type value instead of the display-friendly one.
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.


Test 8
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.
Replicated from ai-code-review-evaluation/sentry-coderabbit#8
Note
Medium Risk
Behavior should be largely preserved but the refactor touches incident creation, environment status transitions, and Kafka occurrence emission, so regressions could affect alerting/issue generation.
Overview
Refactors monitor failure incident handling by moving threshold evaluation and incident lifecycle logic out of
mark_failed.pyintotry_incident_threshold(logic/incidents.py).Extracts issue-platform occurrence creation into
logic/incident_occurrence.py, including monitor context building and human-readable failure-reason generation, and updatesmark_failedto delegate to the new flow. Also promotesSimpleCheckInintomonitors/types.pyfor shared use.Written by Cursor Bugbot for commit c3b32a7. Configure here.