Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(crons): Clarify why incident creation skip happens #66462

Conversation

evanpurkhiser
Copy link
Member

Guard statments tend to be clearer

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner March 6, 2024 21:28
@evanpurkhiser evanpurkhiser enabled auto-merge (squash) March 6, 2024 21:28
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 6, 2024
@@ -138,22 +138,25 @@ def mark_failed_threshold(failed_checkin: MonitorCheckIn, failure_issue_threshol
monitor_env.status = MonitorStatus.ERROR
monitor_env.save(update_fields=("status",))

# Do not create incident if monitor is muted
if not monitor_muted:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled this into a guard statment

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.29%. Comparing base (4c0ded0) to head (060a541).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #66462   +/-   ##
=======================================
  Coverage   84.29%   84.29%           
=======================================
  Files        5308     5310    +2     
  Lines      237214   237263   +49     
  Branches    41036    41036           
=======================================
+ Hits       199965   200012   +47     
- Misses      37030    37032    +2     
  Partials      219      219           
Files Coverage Δ
src/sentry/monitors/logic/mark_failed.py 96.63% <100.00%> (+0.02%) ⬆️

... and 37 files with indirect coverage changes

@evanpurkhiser evanpurkhiser merged commit b044cfb into master Mar 6, 2024
50 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-crons-clarify-why-incident-creation-skip-happens branch March 6, 2024 22:18
aliu3ntry pushed a commit that referenced this pull request Mar 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants