add ability to add multiple events to superevent in one call
The serializer will have to be modified around here https://git.ligo.org/computing/gracedb/server/-/blob/c6575e59e650449422dd65c87f4ffdcaa7bb4adb/gracedb/api/v1/superevents/serializers.py#L330-335 to accept event
as a string (for backwards compatibility), or a list and then loop over add_event_to_superevent
, or alternatively modify add_event_to_superevent
(see below).
Some considerations or questions that I don't have a good feel for yet:
-
Logging. If we were to just loop over
add_event_to_superevent
, then there would be a log message on the superevent for every event that gets added. There should still be a log message on each individual event, but maybe for superevents, there can be a "Added GXXX GYYY GZZZ" superevent. -
Alerts. There are alerts that get sent out to event and superevent topics (https://gracedb-playground.ligo.org/documentation/igwn_alert.html#event-alerts) when events are added. The superevent alert (that contains the superevent packet) should be modified to show the events that were added. The question is event alerts. To remain consistent with the existing setup, there should be alerts for every event. Though if took out the event alert, it would make the response a lot faster and would make coding this up a lot easier. I wonder if any groups actually use that?
We should think about modifying remove_event_from_superevent
as well (https://git.ligo.org/computing/gracedb/server/-/blob/c6575e59e650449422dd65c87f4ffdcaa7bb4adb/gracedb/api/v1/superevents/views.py#L171-174)