Add permanent storage option for EventStream
This allows EventStream to persist to a local or remote filesystem, instead of keeping all state in-memory.
This is helpful for a high-availability situation. For example, currently, if you rolled out a new deployment, any websockets would be disconnected, existing user sessions would be cancelled, and all the session data would be lost.
With this change, the client could reconnect to a new instance of the application, and the EventStore could rehydrate from persistent storage.
This change also factors action/observation/event serialization and deserialization into its own spot, to avoid circular imports
@rbren I found this bug when opening two browsers and chat with opendevin at the same time, the bug related to EventStream. pr: https://github.com/OpenDevin/OpenDevin/pull/1713
And I found you fixed it in current pr, but I suggest to merge mine pr before you finish current one.
good catch @assertion!
Codecov Report
Attention: Patch coverage is 83.69565% with 45 lines in your changes are missing coverage. Please review.
:exclamation: No coverage uploaded for pull request base (
main@755a407). Click here to learn what that means.
Additional details and impacted files
@@ Coverage Diff @@
## main #1697 +/- ##
=======================================
Coverage ? 61.37%
=======================================
Files ? 108
Lines ? 4241
Branches ? 0
=======================================
Hits ? 2603
Misses ? 1638
Partials ? 0
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I haven't got to test it, otherwise LGTM!