Skip to content

Signal Entity #206

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

Merged
merged 4 commits into from
Oct 13, 2020
Merged

Signal Entity #206

merged 4 commits into from
Oct 13, 2020

Conversation

wenhzha
Copy link
Contributor

@wenhzha wenhzha commented Oct 6, 2020

This PR enables Signal Entity for Durable Python which builds on top of #184.

On a high level, this pr:

  • add signal entity
  • fix serialization issue when processing multiple entity operation in one batch
  • add json deserialization step when returning call_entity result to function execution
  • add test and fix test infra that misses serializing entity operation test input

@wenhzha wenhzha requested a review from davidmrdavid October 6, 2020 21:40
Comment on lines 67 to 71

# TODO: json.loads inside parse_history_event is not recursvie
# investigate if response.result is used elsewhere,
# which probably requires another deserialization
result = json.loads(response.result)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make a ticket to follow-up on this one.

Comment on lines 49 to 52
if event_sent:
return

context.actions.append([new_action])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since signal_entity is weird in that it does not wait for a response, I think this portion would benefit from just a few comments explaining what's going on and why

Copy link
Collaborator

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me! Nothing blocking here.

@davidmrdavid
Copy link
Collaborator

This PR is automatically blocked because the flake8 Python linter is complaining about a few things. That's my bad, I forgot to bring that up. I'll let you know how to set up that linter next time and we should find a way to get VSCode to automatically format our code because manually fixing linter errors takes so long :)

@wenhzha wenhzha merged commit 69ec826 into dajusto/entities Oct 13, 2020
@davidmrdavid davidmrdavid deleted the wenhzha/signal-entity branch October 13, 2020 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants