-
Notifications
You must be signed in to change notification settings - Fork 55
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
Durable Entities #184
Durable Entities #184
Conversation
Bug found: |
Bug fixed 🛩️ |
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.
Very good start to this.
Since we have a bit of time before this merges, I would like to see some units tests for the entity itself instead of just the call_entity
API for the orchestration. I would also like to see some basic signals working if at all possible.
bool | ||
True if the Entity was newly constructed. False otherwise. | ||
""" | ||
# TODO: not updating this atm |
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.
Not sure if this even gets updated when C# handles a batch either, so this may not be necessary. We should consult Sebastian about this.
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.
Is there a use for a isNewlyConstructed
flag for entities? Or can it be safely removed?
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 be tracking this here: #222
self._exists = True | ||
self._result = result | ||
|
||
def destruct_on_exit(self) -> None: |
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'm not sure how we handle this in JS or C#, but there is the question of how to handle subsequent operations after this within a batch.
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.
Let's check-in with the team then 😉
@cgillum , @sebastianburckhardt:
What are the semantics for a destructed
entity (via destructOnExit) when there are still operations to perform on a batch?
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 be tracking this here: #222
* add client signal entity support * modify the formating
It looked the brackets []() are hyper-link
…ctions-durable-python into dajusto/entities
I believe this is ready for merge! |
Co-authored-by: cvitzthum-nasuni <cvitzthum@nasuni.com>
Create links for sample folder. Co-authored with @kemurayama
* Replace datetime.strptime * Deleted unnecessary format string * Delete whitespace
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.
Mostly nits, but a few of these I would want addressed before we merge.
Overall, exciting stuff though!
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.
LGTM!
Addresses: #96
Durable Entities for Python
This PR enables Durable Entities for Python, enabling our users to manage small pieces of state, the Durable way.
At a high-level, this PR includes a handful of changes:
/models/entities/
directory, which help to encapsulate the different kinds of objects that the durable-extension returns. For the most part, these resemble their DurableJS counterparts.TODO
comments over the codebase, based on observations I made while studying the DurableJS implementation of Entities. I want to keep theseTODO
s as they specify areas of the codebase that need more thought and design, but that are left as-is because they match the behaviour of JS. Admittedly, some other ToDos may just be actually leftover tasks.Finally, these changes are dependent on changes on the Python worker that have not been merged yet. Those changes are in this small PR: Azure/azure-functions-python-library#68 . In any case, we do not want to merge this until that PR is merged.