HubSpot / Singularity

Scheduler (HTTP API and webapp) for running Mesos tasks—long running processes, one-off tasks, and scheduled jobs. #hubspot-open-source
http://getsingularity.com/
Apache License 2.0
822 stars 188 forks source link

Add fire alarm #2241

Closed pschoenfelder closed 2 years ago

pschoenfelder commented 2 years ago

Fairly basic fire alarm capability for Singularity.

The idea is that in an emergency, when users taking certain actions could be destructive (e.g. bouncing while agent capacity is low due to an outage) but we don't want to outright disallow then, a banner can be displayed warning users about the potential consequences of certain actions.

This allows setting, updating, and deleting a firealarm. Can easily make it more sophisticated if necessary.

This does not include UI updates. When it's time to implement that, the banner should probably also check the disasters resource to check what actions are currently explicitly disallowed.

ssalinas commented 2 years ago

Backend part looks fine. As for UI, I'm wondering if we should include this data in some version of the state json (or some other thing the UI already fetches on every page). Just trying to be careful about adding yet another api call made on every UI page

pschoenfelder commented 2 years ago

Added to state. Should just get picked up without any kind of migration since it's an optional.

rosalind210 commented 2 years ago

🚢