-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add timezones to report cron #15849
feat: add timezones to report cron #15849
Conversation
d74a7fd
to
bd17a85
Compare
bd17a85
to
60662ec
Compare
60662ec
to
e8deda7
Compare
e8deda7
to
b086d52
Compare
rv = self.client.post(uri, json=report_schedule_data) | ||
assert rv.status_code == 400 | ||
data = json.loads(rv.data.decode("utf-8")) | ||
assert data == {"message": {"timezone": ["Field may not be null."]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: write this as a separate test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think because it's a negative assertion instead of the positive ones?
Codecov Report
@@ Coverage Diff @@
## master #15849 +/- ##
==========================================
- Coverage 77.09% 76.81% -0.29%
==========================================
Files 984 986 +2
Lines 51782 51872 +90
Branches 7028 7028
==========================================
- Hits 39920 39843 -77
- Misses 11637 11804 +167
Partials 225 225
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* add timezones to report cron * fix test
* add timezones to report cron * fix test
* add timezones to report cron * fix test
* add timezones to report cron * fix test
SUMMARY
We have a new column on the report_schedule table that defaults timezone to "UTC". This pr reads that timezone from the report and then runs the cron schedule according to that schedule. In a future PR I will add in a UI that allows users to change that timezone and save different values to the report_schedule table, such as "America/New_York" or "America/Los_Angeles"
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
We want to make sure that all existing reports continue to run on UTC. To test, create a report and make sure that it runs at the appropriate time.
This ran at 4:44pm PDT
ADDITIONAL INFORMATION