When we save a test in the UI, the frontend saves the monitor_options with an additional property: notification_preset_name. Because of this, the monitor_options is not nil (HasMonitorOptions returns true) and as a result, monitor_options.renotify_interval is nil, which is saved as 0 in the local state. This causes drift with what's returned by the backend, which doesn't contain a monitor_options.renotify_interval at all.
This PR only saves the monitor_options in the local state when we do have actual properties to set (e.g. renotify_interval).
This is a PR stack, here is how it's organized:
When we save a test in the UI, the frontend saves the
monitor_options
with an additional property:notification_preset_name
. Because of this, themonitor_options
is notnil
(HasMonitorOptions
returns true) and as a result,monitor_options.renotify_interval
isnil
, which is saved as0
in the local state. This causes drift with what's returned by the backend, which doesn't contain amonitor_options.renotify_interval
at all.This PR only saves the
monitor_options
in the local state when we do have actual properties to set (e.g.renotify_interval
).