-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(select source sync time): Select source time of day anchor #29284
base: master
Are you sure you want to change the base?
Conversation
📸 UI snapshots have been updated6 snapshot changes in total. 0 added, 6 modified, 0 deleted:
Triggered by this commit. |
…efore saved in database.
…e UI and add sync time of day 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.
PR Summary
This PR adds a feature allowing users to select the time of day for source data synchronization in the data warehouse.
- Added
sync_time_of_day
TimeField toExternalDataSchema
model with migration 0677 - Implemented UI controls in
SchemaForm.tsx
andSchemas.tsx
to toggle between UTC/local time display - Added time selection functionality in source creation wizard via
sourceWizardLogic.tsx
- Modified
service.py
to use calendar-based scheduling for frequencies over an hour, respecting the selected sync time - Added test case
test_update_schema_sync_time_of_day
to verify the API endpoint and workflow triggering
12 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile
# Conflicts: # frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png # frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png # frontend/__snapshots__/replay-player-success--recent-recordings--dark.png # frontend/__snapshots__/replay-player-success--recent-recordings--light.png # frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png # frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png # posthog/migrations/max_migration.txt
Size Change: +312 B (0%) Total Size: 9.73 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
…' into feature(select-source-sync-time)
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
…' into feature(select-source-sync-time)
Problem
Users cannot change the time of day that a source updates at. This PR introduces a change to temporal schedules to make them Calendar based iff the interval exceeds 1 hour.
There are some nuances here to consider. Our backend is storing the time in UTC and the time selected is the first time of the day in UTC that the schedule will run. We also do not have jitter for tasks that are scheduled at midnight UTC since we theoretically are distributing our load much better than before when a user selects a time of day manually.
Changes
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Temporal schedules updated, added unit test