Skip to content

fix(notifications): include remote server in Docker cleanup messages - #5458

Open
dscamargo wants to merge 6 commits into
Dokploy:canaryfrom
dscamargo:feature/cleanup-notification-message
Open

dscamargo wants to merge 6 commits into
Dokploy:canaryfrom
dscamargo:feature/cleanup-notification-message

Conversation

@dscamargo

@dscamargo dscamargo commented Sep 13, 2026

Copy link
Copy Markdown

What is this PR about?

This PR updates Docker cleanup notifications for remote servers to include the server name and ID, making it clear where the cleanup was executed. The server-specific message is now used consistently
across all notification channels.

RetriggerConfidence Score: 5/5

The PR appears safe to merge. No new actionable issue remains.

Summary

Docker cleanup notifications now name the server that was cleaned. Scheduled and immediate cleanups use the same server-specific message across email and other notification channels.

  • Passes server names into cleanup scheduling and direct cleanup notifications.
  • Shows the server name and ID in notification messages.
  • Escapes the message for email, HTML, Markdown, and Slack-style formats.

Reviews (2) · Last reviewed commit: "fix(notifications): use escaped Markdown..."

Comment thread apps/dokploy/server/utils/docker-cleanup.ts
{
name: decorate("`📜`", "Message"),
value: `\`\`\`${message}\`\`\``,
value: `\`\`\`${markdownMessage}\`\`\``,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The Discord message wraps the markdown-escaped markdownMessage inside a triple-backtick code block, but code blocks render literally in Discord (no markdown parsing happens inside them). This means the backslashes inserted by escapeMarkdown show up as visible characters instead of being interpreted

{
title: "Message",
value: message,
value: slackMessage,

@narcisonunez narcisonunez Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The Slack attachment escapes the message with escapeSlackMrkdwn and places it in a field value, but the attachment object never sets mrkdwn_in: ["fields"] — unlike build-error.ts / build-success.ts, which do set it. Without that flag, Slack does not parse the field as markdown, so the escape backslashes inserted by escapeSlackMrkdwn render literally instead of being stripped/interpreted.

@narcisonunez

Copy link
Copy Markdown
Collaborator

Please, tests this and upload screenshots if possible. Make sure this renders properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants