Skip to content

Deployment notifications for Discord, Telegram, ntfy, Google Chat and webhooks - #47

Merged
iRazvan2745 merged 5 commits into
masterfrom
feat/notifications
Nov 27, 2026
Merged

iRazvan2745 merged 5 commits into
masterfrom
feat/notifications

Conversation

@iRazvan2745

@iRazvan2745 iRazvan2745 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Notifications

Settings → Notifications lets any org member add channels and pick whether they hear about failed deployments, successful ones, or both. It covers every deployment kind: resources, cluster setup, added machines, monitoring and sandboxes.

  • Channels: Discord, Telegram, ntfy, Google Chat and generic webhooks. Created in a dialog that sends a test right away; rows have Send test, Pause/Resume and Remove.
  • Storage: notification_channels keeps each destination encrypted; the API never returns it.
  • Delivery: each finished deployment queues one SendNotification job per channel on a new notifications queue (5 attempts, exponential backoff), so a channel that's down retries without repeating the others. A notification can never fail a deployment.
  • Messages: project, cluster, trigger, commit, duration and the clipped error, linked to the deployment page when APP_URL is set.
    • Discord posts as the channel's name and can't ping @everyone.
    • Telegram HTML is escaped.
    • ntfy is published as JSON with priority and tags.
    • Google Chat gets a card.
    • Webhooks are signed with X-Clowder-Signature (HMAC-SHA256 of timestamp.body).
  • Network safety: every resolved address is checked at connect time, no redirects are followed, and response bodies are never read. isBlockedAddress moves to @clowder/workflows so Git and notifications share one policy.

Also in this branch

  • Optional name column on sandbox_images, with its migration.
  • Settings section headers are centered; the sandbox images description is shorter.
  • Docs intro copy and page header border tweaks.

Testing

  • Tests for message rendering, signing and the blocked-address guard, plus API tests for create, list (destination hidden), pause, remove, org scoping and validation, against Postgres.
  • The OpenAPI copy in apps/docs/openapi.json is regenerated.
  • All Discord message variants were sent to a real Discord webhook.
  • Telegram, ntfy and Google Chat haven't been tried against the real services yet.

Not included

Slack, email, Apprise, editing a channel after creation, and per-project filtering.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…eployments finish

Organizations add notification channels in Settings → Notifications and pick
whether they hear about failed deployments, successful ones, or both. Every
deployment kind is covered: resources, cluster setup, added machines,
monitoring and sandboxes.

- notification_channels stores each destination encrypted; the API never
  returns it.
- Each settled deployment queues one SendNotification job per channel, so a
  channel that's down retries on its own without repeating the others.
- Messages carry project, cluster, trigger, commit, duration and the clipped
  error, link to the deployment page when APP_URL is set, keep Discord from
  pinging, escape Telegram HTML, and sign webhooks with an HMAC.
- Requests check every resolved address at connect time, follow no
  redirects and never read response bodies. isBlockedAddress moves to
  workflows so Git and notifications share it.
… as the channel's name

The dialog's service fields started undefined, so the input stayed uncontrolled and never
wrote back; the button stayed disabled. Discord now uses the channel name as the webhook
username unless Discord would refuse it.
@iRazvan2745
iRazvan2745 merged commit f3aa51c into master Nov 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant