Skip to content

Send Discord Notifications for Rollback Events #34

@adarshm11

Description

@adarshm11

Summary

When a Docker deployment fails and the automatic rollback kicks in, no Discord notification is sent. Operators have no visibility into whether a rollback succeeded or failed unless they SSH into the machine and check logs manually.

Problem

The rollback path in server.py runs git reset and docker compose up but never calls the Discord notification helper. This means:

  • A silent rollback looks identical to a successful deployment from Discord's perspective.
  • If the rollback itself fails, there is no alert at all.

Proposed Solution

Add Discord notifications at two points in the rollback flow:

  1. Rollback started — yellow/orange embed indicating the deployment failed and a rollback is in progress. Include the failed commit hash and error output.
  2. Rollback result — green embed if the rollback succeeded, red embed if the rollback also failed (with full stderr).

The embed color scheme could follow:

Event Color
Deployment success Green (0x57F287)
Deployment failed, rollback started Orange (0xFEE75C)
Rollback success Green (0x57F287)
Rollback failed Red (0xED4245)

Acceptance Criteria

  • Discord receives an orange notification when a rollback begins, including which repo/branch and the deployment error
  • Discord receives a green or red notification with the rollback outcome
  • Notifications include the commit hash that was rolled back from
  • Behavior is unchanged when rollback is not configured for a repo

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions