-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix(versioning): scheduled changes incorrectly considered live #4119
fix(versioning): scheduled changes incorrectly considered live #4119
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4119 +/- ##
=======================================
Coverage 96.44% 96.44%
=======================================
Files 1149 1149
Lines 37596 37605 +9
=======================================
+ Hits 36259 36268 +9
Misses 1337 1337 ☔ View full report in Codecov by Sentry. |
"api_key": environment_api_key, | ||
# It seems as though there is a timezone issue when using postgres's | ||
# built in now() function, so we pass in the current time from python. | ||
"live_from_before": timezone.now().isoformat(), |
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.
I would prefer avoiding the use of Python's now() here. Maybe we can leave a TODO here to revisit it in the future?
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.
I've updated the comment to use a TODO.
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.
Yeah, so this works (after updating the test to schedule the other version for 2 hours later):
and efv2."live_from" <= now() + interval '90 minutes'
Indicating that it likely is some TZ issue here.
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.
Actually, that's not true because even this works:
and efv2."live_from" <= now() + interval '1 second'
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.
I Approved it to allow its deployment, though I left some comments.
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
This PR fixes an issue where scheduled changes were incorrectly being considered live.
How did you test this code?
Added a unit test.