feat!: Modernize actor architecture and rework dependent components#778
Merged
feat!: Modernize actor architecture and rework dependent components#778
Conversation
Move the actors to actor communications methods into a proxy class. This allow to pass a proxy object instead of the actor object, thus preventing the pickle errors when serializing.
Instead of using a class attribute as timeout parameter, add a timeout argument to the `receive()` method.
- Rename the `SilentFakeDB` to `LocalQueueDatabase`. - Add the `FailingLocalQueueDatabase` with configurable failure modes. - General cleanup of the code and docstrings.
- General code cleanup and performance improvements - Add `ReportFilter` interface - Add `BroadcastReportFilter` to send message to all dispatchers - Add `RulesetReportFilter` to filter reports based on rules
- General code cleanup - Move dispatchers connection handling to poller thread - Improve start/stop reliability for the poller thread - Rework unit tests
Tests the handlers directly instead of passing through the actor.
Tests the components directly instead of passing through the actor.
- Derive pre-processor puller targets from config instead of actor state - Simplify dispatcher replacement using new report filter API - Update pre-processor factories to new actor/config signatures - Remove unused post-processor generator/binding code - Align unit tests with new binding and actor APIs
Instead of creating the MongoDB client from the `__init__` of the database driver, the client will be created in the `connect` method. This prevents unpickable attributes to block the initialization of the actors on Linux platforms.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #778 +/- ##
==========================================
+ Coverage 67.16% 69.88% +2.72%
==========================================
Files 91 91
Lines 2945 2919 -26
==========================================
+ Hits 1978 2040 +62
+ Misses 967 879 -88
🚀 New features to boost your workflow:
|
|
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.



This PR is a broad rework of the actor module to support multiprocessing spawn/forkserver methods that requires attributes of classes to be serializable with
pickle.Detailed changes :
ActorProxyabstractionsetupmethodteardownlifecycle hook to handle cleanup of the actor resourcesMongoClientinitialization to theconnectmethod of the driver (unpickable lock objects)Breaking Changes: