-
Notifications
You must be signed in to change notification settings - Fork 356
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 streaming updates core functionality and project streaming #8669
feat: add streaming updates core functionality and project streaming #8669
Conversation
✅ Deploy Preview for determined-ui canceled.
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8669 +/- ##
==========================================
+ Coverage 47.79% 47.82% +0.03%
==========================================
Files 1050 1061 +11
Lines 167359 168109 +750
Branches 2240 2239 -1
==========================================
+ Hits 79982 80394 +412
- Misses 87219 87557 +338
Partials 158 158
Flags with carried forward coverage won't be shown. Click here to find out more.
|
master/static/migrations/20240108170651_add-projects-trigger.tx.up.sql
Outdated
Show resolved
Hide resolved
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.
Looks good! My only question is whether or not to include stuff in this PR - comments and extra files meant for developing
master/static/migrations/20240108170651_add-projects-trigger.tx.up.sql
Outdated
Show resolved
Hide resolved
f68d968
to
b08e286
Compare
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'll defer to @rb-determined-ai, but I'm ok with this change. I feel like it'd be rare to bump up against the 64 bit int overflow to begin with (but maybe in a few years I'll be changing my tune...)
378c144
to
b877a88
Compare
master/static/migrations/20240116155819_add-projects-trigger.tx.up.sql
Outdated
Show resolved
Hide resolved
// Return Values: | ||
// - `gone` is a range-encoded string, suitable for returning over the REST API. | ||
// - `new` is a list of ints, which are PKs that will need hydrating from the database. | ||
func ProcessKnown(known string, exist []int64) (string, []int64, error) { |
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.
ProcessKnown
might not be entirely correct if known
and/or exist
is not sorted, while it is highly possible for exist
to be unsorted
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'll add in the assumption to the comment.
known
is created by the streaming client, which keeps track of the known keys and builds the known string, and exist
is populate by a query for each streamable type (currently just projects).
The project select includes an ORDER <PK> ASC
; so we should be be fine in terms of making sure that exists
is sorted.
As long as the streaming client does not build an improper known string and any additional streamable types are also sorting the results of their queries properly, this shouldn't be an issue.
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.
Since exist
is basically a concatenation of oldEventsQuery
scan and newEventsQuery
scan, both queries sorted does not guarantee exist
also sorted
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.
Good catch!
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.
Just leaving a comment here so that I can be notified properly.
From a slack conversation with Corban it sounds like the code is being re-worked to deal with the character limit.
If the code is actually ready now, or whenever it does become ready, please re-request a review.
Thanks!
80dc1ee
to
1c35290
Compare
@erikwilson |
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.
great work! It's been a long haul
…8669) --------- Co-authored-by: Ryan <[email protected]> & Eric L. <[email protected]>
Description
Add Streaming Updates core functionality with project streaming & testing. This also provides the framework for adding additional streamable types as time goes on. It also provides a
master/stream.py
demo that can be used to test out the feature.Offline & Out of Scope testing will need to be added back in due to those test not using streamable types that will be included in this initial merge.
Test Plan
Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
Ticket
DET-10056