Closed st0012 closed 10 months ago
Merging #2212 (89373d3) into master (babdd55) will increase coverage by
30.91%
. The diff coverage is100.00%
.
@sl0thentr0py This also fixes an order-dependent CI failure in master, which can be reproduced with:
rspec './spec/sentry/client_spec.rb[1:7:2,1:7:3]' './spec/sentry/cron/monitor_config_spec.rb[1:1:1]' --seed 60911
It happens because the current monitor_config_spec
sets Sentry.configuration.cron
, but the value would be picked up by client specs as they don't initialise the SDK themselves.
After reviewing the recent cron monitoring PRs, I want to make a few small improvements:
MonitorCheckIns
module end-to-end: Since the module captures the core logic of the cron monitoring feature, I think making sure it works e2e in tests is very beneficial, especially when the test complexity doesn't really increase much (see the changes).MonitorCheckIns
: this will keep theMonitorConfig
simple and isolated.MonitorCheckIns#perform
's rescue scope: it should only be applied AFTER thestart
local is defined. Otherwise,Sentry.utc_now.to_i - start
would cause a newTypeError
and overshadow the original exception.skip-changelog