feat(press-job): Alert Raven when a server lifecycle job fails - #7377
Open
balamurali27 wants to merge 4 commits into
Open
feat(press-job): Alert Raven when a server lifecycle job fails#7377balamurali27 wants to merge 4 commits into
balamurali27 wants to merge 4 commits into
Conversation
A failed Create Server, Archive Server or Resize Server leaves a server half provisioned, half archived, or on the wrong plan. Nobody watches the Press Job list, so these sat until a customer or a bill found them. `on_workflow_failure` is the one place every job failure goes through, so the alert lives there and names the failed step. Reused `RAVEN_SERVER_ALERTS_CHANNEL`, the channel the public server pool health alerts already use, instead of adding a Press Settings field for one more channel. Kept the list of job types explicit. Alerting on every press job type would bury the three that need a person. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XzhrGxqJ6nN5sVeK4swwt6
Contributor
Confidence Score: 5/5The PR appears safe to merge. The previous comment-length finding is fixed, and no blocking failure remains. Reviews (3): Last reviewed commit: "Merge branch 'develop' into feat/alert-f..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7377 +/- ##
===========================================
+ Coverage 61.05% 61.14% +0.08%
===========================================
Files 1059 1059
Lines 100198 100303 +105
Branches 1649 1649
===========================================
+ Hits 61175 61328 +153
+ Misses 38983 38935 -48
Partials 40 40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
An alert that cannot be turned off is one nobody can live with during an incident, when the same three job types fail again and again and bury the channel. Put the check next to the other Raven fields, so the person who set the channel up finds the switch that stops it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XzhrGxqJ6nN5sVeK4swwt6
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.
Problem
A failed Create Server, Archive Server or Resize Server leaves a server half provisioned, half archived, or on the wrong plan. Nobody watches the Press Job list, so these sit until a customer or a bill finds them.
What this does
PressJob.on_workflow_failureis the one place every job failure goes through, so the alert lives there. It fires only for the three job types that need a person:The message names the job type, the server, the step that failed, and links the Press Job:
The step comes from the Press Workflow Task that failed, so the reader knows whether the machine stopped, the resize call failed, or a later step gave up — without opening the job first.
Channel
Reused
RAVEN_SERVER_ALERTS_CHANNEL(frappe-cloud-server-alerts), the channel the public server pool health alerts already post to. Adding a Press Settings field for one more channel did not seem worth it. Say so if these belong somewhere else — it is a one-line change.Turning it off
Press Settings → Raven → Disable Press Job Failure Alerts. During an incident the same three job types fail again and again, and an alert nobody can silence is one nobody can live with. The check sits next to the Raven credentials, so whoever set the channel up finds the switch that stops it.
Choices
on_press_job_failure. The rollback handlers do real work and can throw. The alert goes out first so a broken rollback cannot swallow it.send_raven_messagealready logs an error and returns when the Raven credentials are missing or the post fails.Tests
press.press.doctype.press_job.test_press_job— 5 tests:Unknownwhen no task recorded a failure🤖 Generated with Claude Code
https://claude.ai/code/session_01XzhrGxqJ6nN5sVeK4swwt6