feat(nemesis): Remove disrupt_method_wrapper#13644
Draft
pehala wants to merge 15 commits intoscylladb:masterfrom
Draft
feat(nemesis): Remove disrupt_method_wrapper#13644pehala wants to merge 15 commits intoscylladb:masterfrom
pehala wants to merge 15 commits intoscylladb:masterfrom
Conversation
* Replace nemesis.py with module * Extract all monkeys into a separate module * Introduce gatherer.py module for autoloading all nemesis * Update affected imports
* Rename to utils
In execute nemesis, the event is started as well
Used only for multitenant k8s, which is not needed anymore Add docs/shelved/MULTITENANTK8s.md to document purpose and implementation if it needs to be revived
Reworks Argus and validation logic, which was in inner function inside this wrapper
* Add util methods * Rewrite the log logic to be more concise and all at one place
* Enables running code before and after each nemesis, without hardcoding it in nemesis code * Used currently only in longevity_lwt_test.py to validate data * Reduces code duplication
* Add default pool * Moved the code so it is inside one try block * Removes one level of indentation
Move all logic into execute_nemesis
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.
Overview
This PR refactors and in the end get rid of
disrupt_method_wrapperby moving it intoexecute_nemesis. Existing logic is simplified by removing features that are no longer needed (exclusive nemesis) or by refactoring calls to be move consise and elegant (I like context managers). Result is function which is now much simpler to understand, with only neccessary features and removal of another level of indirection by removing decorator. Due to spliting into multiple function it is now also easier to test and to mock individual parts, finally enabling us to write tests for actual nemesis executionIt builds on top of #13416 to not block it from being merged and to save myself a rebase later. Until the PR is merged, this PR can be reviewed commit by commit and individual changes can be discussed before being finalized after the dependency merge
This PR can be split into individual PR one commiteach if needed, but each PR has more or less isolated changes so it should be reviewable.
Changes
withstatementsTODO
Testing
PR pre-checks (self review)
backportlabels