notify: use tick time in dedup repeat checks#4864
notify: use tick time in dedup repeat checks#4864KyungHwanKim-devs wants to merge 1 commit intoprometheus:mainfrom
Conversation
ultrotter
left a comment
There was a problem hiding this comment.
I don't fully love it as it's quite manual and easy to forget the overridden time.
But perhaps it's fine so far, and anyway we can evaluate moving to synctest avoiding manual time mocks, after the next go version is released.
I agree that this is a little ugly, but I think it's the intended way to get the time in a notification pipeline. I wonder if it'd be a little cleaner to make |
Spaceman1701
left a comment
There was a problem hiding this comment.
I forgot to approve before, but I think this is good to merge as is.
@KyungHwanKim-devs looks like this requires a rebase. I can merge after you've done that. Thanks for the contribution!
Signed-off-by: kkh <kkhdevs@gmail.com> Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com> Co-authored-by: Solomon Jacobs <solomonjacobs@protonmail.com>
81133ab to
f241e15
Compare
|
I have rebased this commit. I think it is good to go. |
Summary
Now) for dedup repeat-interval checks.Background
Issue #2461 reports
TestRetryconsistently failing on Darwin due to repeat notifications occurring earlier than expected.Root Cause
DedupStagerelied ontime.Now()instead of the dispatcher-provided tick time. When the pipeline execution is delayed on Darwin, the repeat interval appears to have already elapsed, causing an early resend.Fix
DedupStagenow prefers the contextNowvalue (set by dispatch) and falls back to its internal clock when absent, making repeat-interval decisions deterministic.Testing
ldLC_DYSYMTAB warnings)Fixes #2461.