Fix runner jobs statistics when incorrect intervalstyle is set
What does this MR do and why?
Fix runner jobs statistics when incorrect intervalstyle is set
ActiveRecord sets ISO8601 as the default style But something in our environment messes it up
And in general, it's a bad idea to rely on the connection variables
So we're simply replacing this with
EXTRACT('EPOCH'
See more in #429227 (closed)
The fix is inspired by Use EXTRACT(EPOCH) when calculating durations (!75505 - merged)
How to set up and validate locally
I relied on tests here
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vladimir Shushlin