Page MenuHomePhabricator

Support global/broadcast notifications
Open, Needs TriagePublic


I know this is likely to be wishlist'd, but I wanted to add it to the list. Maybe the framework already exists...?

I would like to be able to send a notification (or, even better, a popup) to everyone on Phabricator from the command line. This notification should NOT be emailed by default, because of the use.

My server is set to an automatic startup/shutdown schedule, for security and energy reasons. It would be amazingly helpful for the system to be able to issue a "the system will shut down in 10 minutes" notification, so people can save their changes, etc. That can only be issued via the command line, obviously, in my case via a Bash script.

This would also be useful for other system-based notifications, such as if an admin needs to notify that the system will be down for an hour for maintenance, etc.

I can imagine that this could probably just live in ./bin/aphlict. If it isn't a massive change, I may be able to do it myself (rusty on the PHP), but I wanted to get clearance and feedback from ya'll first.

Event Timeline

CodeMouse92 raised the priority of this task from to Needs Triage.
CodeMouse92 updated the task description. (Show Details)
CodeMouse92 updated the task description. (Show Details)
CodeMouse92 added a subscriber: CodeMouse92.

Does anyone have a use case for this which isn't maintenance notifications?

Does anyone else shut down their server automatically "for security and energy reasons", or otherwise have significant planned downtime? (If so, why?)

epriestley renamed this task from Send notification from command line? to Support global/broadcast notifications.Aug 4 2016, 4:37 PM
  • T11427 is similar.
  • T10855 discusses a similar and possibly overlapping use case (mirroring system status into Phabricator), but I believe that use case isn't after global/on-all-pages notifications.

The use cases we've seen so far are:

  • Notifying users that the Phabricator system is shutting down for (or otherwise affected by) maintenance in the near future.
  • Here, routine notices that the server is shutting down to save electricity (which I suspect is a very rare use case).
  • In T11427, a notification that some other system is shutting down or unavailable. (Does this need to go to all users?)
  • In T11427, a notification that something exciting is happening outside of the direct context of Phabricator (product launch, etc). (Does this need to appear on all pages?)

Something in this general shape is likely not difficult to build, but I think there are really several different use cases here which ideally have different behaviors. "The system is shutting down for maintenance in 3 minutes" should probably be a global banner, while "New tokens are launching in 48 hours" probably shouldn't (?) or should be dismissible or something.

@bjshively, for this use case:

Countdown to launch of Flerptyderp: T Minus...

...I'd expect to approach this by putting a Countdown into a panel on the homepage -- we've done this in the past on this install for important events like this one:

Praise the sun!

Apr 11 2016, 10:00 PM

In particular, this seems very annoying/disruptive for most users if it's a global banner that persists for a significant amount of time leading up to the event, unless the countdown starts at like 60 seconds. Are there reasons using a panel isn't a very good approach? Is this just an edict from on high?

@epriestley, somewhat an edict from on high, but I do think there is potentially some value in a persistent banner (a single row tall, similar to the main phab bar but perhaps even a bit skinnier.)

We did the countdown on the main dashboard before as well. I think it is an okay-but-not-perfect solution.

There are some potential issues with a dashboard panel. For one, it presumes that all users are using the default dashboard (I think someone mentioned this previously.) Beyond this, it doesn't quite have the same effect as a message displayed across the entire system for cases such as alerting to upcoming downtime or some similarly critical message.

To your point, we did have some users complain that even just on the primary dashboard a ticking timer was a bit distracting. But, you know, when your boss's boss's boss asks if something is feasible, you at least look into it. :) And I think countdown scenario aside, a global information display that doesn't assume the user has some specific dashboard config is potentially valuable.

The "Rooster" system we had at Facebook is essentially a panel (closable) that would persist on every homepage. I would be OK forcing a panel onto all dashboards if the users can also close it. I think we need closable panels for NUX anyways. But the issue is this is still a "pull" notification, meaning the user has to visit a page to get the information. A "push" system (notification, email) is better for things like downtime. "pull" systems are good for just general FYI stuff (all-hands meeting upcoming).

I think a global banner (or some equally omnipresent, persistent element) is reasonable for "this system is going down in a couple of minutes". But if that's the only really good use case we have for it, though, I wonder if we shouldn't just build a "shutdown in X minutes" feature that automatically does this, counts down, stops new batch jobs from starting, maybe pauses builds, puts the system into read-only when the countdown finishes, etc. -- a dedicated "graceful shutdown" feature instead of just a broadcast feature. I don't think any of these things are really problems today, but I could imagine more of a "shutdown process" being useful in the future.

I think it's independently possibly reasonable to create something like a broadcast capability in the notifications system. This feels like a better fit to me for "some other system is down" or "there's a pizza party at 4PM today" or whatever, even if it's an executive pizza party. I'd imagine it possibly working like this:

  • You write a message and select an audience ("All Users", or "members of project X" or whatever).
  • Users get a sort of "super notification" that works like a notification but is pinned to the top of the notifications menu/section until they dismiss it. If real-time is configured, this would cause a bubble to pop up which could stick around until clicked (unlike normal notifications).
  • You can un-publish the broadcast (or set it to automatically time out) once it's no longer relevant.

But the use cases for this feel limited/weak to me now (e.g., it's not clear to me why a super-execuitive would use this instead of just emailing or whatever). Like, this basically amounts to a sort of weird new kind of email that no one knows how to use? The only case I can see where it's compellingly better than email is on open-source installs, since I don't want to email everyone but might reasonably want to notify active users about, say, a meetup or future downtime or something.

Yeah, basically like the Facebook Rooster system except making it act as "pinned notifications" instead of "pinned dashboard panels". We could do either, reasonably, although it's slightly messier to do a real-time notification of "a new panel appeared on all dashboards, go look". But I'm basically not sure why this is better than email in any case where the users are employees.

(Possibly it might be easier to select the correct audience in Phabricator since you can use projects or other rules, but all of the use cases here and elsewhere just want to hit everyone, I think.)

Does anyone have a use case for this which isn't maintenance notifications?

Sadly, no, but somewhat related.

Does anyone else shut down their server automatically "for security and energy reasons", or otherwise have significant planned downtime? (If so, why?)

Not having a cluster, I've sometimes had to drop the sole host into read-only mode for unplanned maintenance. Creative reasons so far have included:

  • performing unplanned storage moves ('yeah, I added another WebKit repository; why do you ask?')
  • an abundance of caution whilst doing stupid things with MySQL ('I did say milestone, but I think I meant a subproject')
  • resilience in the face of abuse ('s instance has had people battering Files)

Read-only mode already has an informative bubble, however so far people have interpreted this as an unexpected error and taken that as a cue to helpfully inform me. Being able to add free-form text to this (maintenance until 6pm UTC) would be helpful, and I'd be happy to implement.

avivey mentioned this in Unknown Object (Ponder Answer).Oct 18 2016, 4:58 PM

As said in Q501 it will be useful to have some components (e.g. an administrative panel) that appear on top of all the dashboards.

My use case is similar to the one presented in description but usually we are planning downtime days in advance (not minutes), so this way is not required to bother users on all applications they are in but show message just on home page would be enough.