Skip to content

feat(notifications): bundle server patch and Traefik notifications per team#9473

Closed
jstet wants to merge 2 commits intocoollabsio:nextfrom
jstet:feature/bundled-update-notifications
Closed

feat(notifications): bundle server patch and Traefik notifications per team#9473
jstet wants to merge 2 commits intocoollabsio:nextfrom
jstet:feature/bundled-update-notifications

Conversation

@jstet
Copy link
Copy Markdown

@jstet jstet commented Apr 7, 2026

Changes

  • Server patch and Traefik version notifications can now be bundled into a single notification per team listing all affected servers, instead of one notification per server
  • Bundling is configurable per event type (patch vs Traefik), per notification channel (Email, Discord, Slack, Telegram, Pushover, Webhook), per team — disabled by default so existing behavior is preserved
  • Uses Laravel's Bus::batch with allowFailures() + finally() to coordinate per-server check jobs and dispatch a summary notification once all checks complete
  • Per-server jobs still store results in DB and send immediate notifications to channels that have bundling disabled, so unbundled channels get the original per-server behavior
  • Includes race-safe scoped data clearing (only clears servers from the current batch), Traefik notification deduplication via checked_at/notified_at timestamps, WithoutOverlapping compatibility with releaseAfter(60), and queue:prune-batches scheduled daily
  • Bundled email template follows existing Traefik email style: compact server list with linked names, critical package summary, security considerations section
  • UI: "Bundle Notifications" checkbox nested under "Server Patching" and "Traefik Proxy Outdated" in each notification channel's settings page

Issues

Category

  • Bug fix
  • Improvement
  • New feature
  • Adding new one click service
  • Fixing or updating existing one click service

AI Assistance

  • AI was NOT used to create this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Code (Claude Opus 4.6)
  • How extensively: AI assisted with implementation, architectural review and test writing. All changes were reviewed, understood, and verified by the author.

Testing

docker exec coolify php artisan test --compact \
  tests/Feature/BundledNotificationsTest.php \
  tests/Feature/ServerPatchCheckNotificationTest.php \
  tests/Feature/CheckTraefikVersionJobTest.php \
  tests/Unit/CheckTraefikVersionForServerJobTest.php \
  tests/Unit/CheckTraefikVersionJobTest.php

48 tests, 156 assertions — all passing. Covers:

  • Per-event per-channel bundle settings (defaults, toggling, filtering)
  • Summary job data handling (scoped clearing, unreachable server skipping, Traefik dedup)
  • Team isolation (servers don't leak across teams)
  • Notification formatting across all 6 channels (Discord, Slack, Telegram, Pushover, Webhook, Email)
  • Edge cases (deleted servers, deleted teams, concurrent timezone-staggered batches, empty collections, contradictory flags)
  • End-to-end via Notification::assertSentTo (summary jobs actually dispatch notifications to correct teams)

Manual verification: UI toggle visible and functional at Notifications > [channel] > Server section.

Contributor Agreement

Important

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn't a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

andrasbacsai and others added 2 commits April 5, 2026 16:20
…r team

Instead of sending one notification per server for patch checks and Traefik
version updates, notifications can now be bundled into a single message per
team listing all affected servers. Bundling is configurable per event type
(patch vs Traefik), per notification channel (Email, Discord, Slack,
Telegram, Pushover, Webhook), per team — disabled by default.

Uses Bus::batch with allowFailures() + finally() to coordinate per-server
jobs and dispatch a summary notification after all checks complete. Includes
race-safe scoped data clearing, Traefik notification deduplication via
checked_at/notified_at, and batch table pruning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

This PR did not pass quality checks so it will be closed. If you believe this is a mistake please let us know.

@github-actions github-actions bot closed this Apr 7, 2026
@jstet jstet deleted the feature/bundled-update-notifications branch April 7, 2026 22:27
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