Skip to content

Desktop notifications for build failures, held candidates and more, per kind of event #156

Closed

Description

@7schmiede

What

Operating-system notifications (Windows toast, Linux desktop notification, macOS later) when something in a stack or one of its lanes needs attention, configurable per kind of event:

Event Default
A build failed (main tree or a lane) on
A candidate is held and waits for promote on
A service exited by itself / crash loop on
A lane's start or move on a node failed on
A lane took (or gave back) the main ports off
A candidate went live off

Each kind on/off, per machine; possibly overridden per stack or per lane (an agent's lane may stay quiet). Clicking a notification opens the dashboard on the stack, lane and service it is about.

Why not now

ADR-0018 point 2 puts notifications in a tray, and the tray is deferred in #1 because the usual tray crates break the static Linux build. Notifications do not need a tray. Decoupling them is an architectural change: it needs an amendment of ADR-0018 (or a new ADR) before the code.

Proposal

  • The hub sends them. It already runs per user at logon (ADR-0021) and sees every stack's events over its daemon connections, so one place covers the main tree and every lane, local and on nodes. Daemons stay headless; a node never notifies.
  • Windows: WinRT toast (windows crate, ToastNotificationManager). Needs an AppUserModelID; devstack hub install already registers the hub at logon and the devstack:// link, so it would also register a Start-menu shortcut with that id. Fallback without it: a Shell_NotifyIcon balloon.
  • Linux: org.freedesktop.Notifications over D-Bus in pure Rust (zbus), so the binary stays static; without a session bus (server, container) silently off.
  • macOS: later (osascript or UNUserNotificationCenter).
  • Dashboard tab open: optionally the browser's Notification API as well, same settings, so nothing is shown twice (the hub knows whether a dashboard is connected).
  • Settings: per kind of event, in the hub's settings (dashboard: Settings → Notifications; CLI: devstack hub notify <event> on|off); a per-stack or per-lane mute from the stack/lane menu.
  • Noise: one notification per build and candidate; repeated failures of the same service within a few minutes are folded into one, and a crash loop is one notification, not one per restart.

Open points

Done when

  • An ADR (or the ADR-0018 amendment) is accepted.
  • On Windows and on a Linux desktop a failed build and a held candidate notify, each kind can be switched off, and clicking opens the dashboard there.
  • The Linux binary stays static (file says "statically linked"); without a desktop session nothing fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions