Schedule weekly reports to run Monday for the previous week#10805
Schedule weekly reports to run Monday for the previous week#10805
Conversation
2a83977 to
d1008e4
Compare
spec/jobs/job_configurations_spec.rb
Outdated
There was a problem hiding this comment.
let's add a freeze_time around these specs
There was a problem hiding this comment.
❓ @zachmargolis Do we do this automatically because of:
identity-idp/spec/rails_helper.rb
Lines 134 to 136 in cff618e
There was a problem hiding this comment.
That only applies to specs/groups with a freeze_time: true tag, I didn't see that here?
20c19ec to
42560ec
Compare
zachmargolis
left a comment
There was a problem hiding this comment.
LGTM but I would definitely prefer an explicit freeze_time before merging
42560ec to
3aafb6e
Compare
Sure, that's reasonable and understandable. Updated |
|
Looks like this is failing in CI due to our commit message changelog requirement (logs link) |
3aafb6e to
dccbf45
Compare
dccbf45 to
0bc6f37
Compare
Thanks for the handy link. Fixed ✔️ |
Our jobs use the default Rails definition of a week starting on a Monday. I think this is the ISO standard. Running a job on Monday and giving it the argument `Time.zone.yesterday` means that weekly jobs will process data for the previous week changelog: Internal, Reporting, Move weekly reports to run at 00:00 Monday UTC
Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> changelog: Internal, Reporting, Move weekly reports to run at 00:00 Monday UTC
0bc6f37 to
452fe40
Compare
🎫 Ticket
Link to the relevant ticket:
LG-13559
🛠 Summary of changes
We're missing data for Sunday in the weekly report because the report runs Sunday morning. This delays the report until Monday and then runs it for the previous week.
📜 Testing Plan
We can confirm in staging that this change schedules the expected report