Add state manager context#240
Merged
wcs1only merged 2 commits intodapr:masterfrom Jul 21, 2021
Merged
Conversation
Member
Author
Codecov Report
@@ Coverage Diff @@
## master #240 +/- ##
==========================================
+ Coverage 88.55% 88.71% +0.16%
==========================================
Files 52 52
Lines 2071 2101 +30
==========================================
+ Hits 1834 1864 +30
Misses 237 237
Continue to review full report at Codecov.
|
halspang
reviewed
Jul 20, 2021
halspang
left a comment
There was a problem hiding this comment.
Overall it looks fine.
It would be great to get an e2e/integration test that shows this works. You could do something like this:
ActorA.methodOne - add state "state" (do not commit)
ActorA.methodTwo - get state "state"
ActorA.methodTwo - mutate "state"
ActorA.methodTwo - commit "state"
ActorA.methodOne - do nothing
Then check that only the state from methodTwo had it's state committed showing it was isolated from methodOne.
| state_change_tracker[state_name].change_kind == StateChangeKind.remove | ||
|
|
||
| def _get_contextual_state_tracker(self) -> Dict[str, StateMetadata]: | ||
| context = CONTEXT.get(None) |
Member
Author
There was a problem hiding this comment.
That's the default value it returns if this context variable wasn't set at all.
wcs1only
approved these changes
Jul 21, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds context to actor state manager
Issue reference
Closes: #237
Adds #237. Required feature for #219