Skip to content
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

Come to better abstractions for fault injection #301

Closed
pablochacin opened this issue Aug 17, 2023 · 0 comments · Fixed by #307
Closed

Come to better abstractions for fault injection #301

pablochacin opened this issue Aug 17, 2023 · 0 comments · Fixed by #307
Labels
design proposal Requires a design document for discussion enhancement New feature or request

Comments

@pablochacin
Copy link
Collaborator

Presently, fault injection capabilitites are defined in a series of interfaces that defines a method for each type of fault.
For example, the ProtocolFaultInjector defines the methods for injecting HTTP and gRPC faults.

Each disruptor (PodDisruptor, ServiceDistruptor) has to implement these methods.

The implementation of each fault injection method for each disruptor is quite similar, differing mostly in the type of fault to be injected. To inject a fault the disruptor needs to translate this fault to a command to be sent to the agent in the target using an agent controller.

This situation creates a series of issues:

  • Duplicity of logic in the fault injection between disruptors and between protocols. This causes inconsistencies such as the one reported in Apply fault injection validations uniformly across protocols and disruptors #299
  • Complexity of tests: presently to validate how a fault is mapped to the corresponding agent commands it is necessary to instantiate the disruptors. This requires considerable setup and also creates the necessity to duplicate the tests for each disruptor
  • No clear separation of concerns

All the above seems to point to the need to reconsider the abstractions used for fault injection. In particular to decouple the fault injection from the disruptor to allow reuse across disruptors.

One initial analysis points to the idea of separating the fault injection logic into a component that has the sole responsibility of mapping faults to commands for a given target, validating that this mapping is possible/allowed.

@pablochacin pablochacin added enhancement New feature or request design proposal Requires a design document for discussion labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design proposal Requires a design document for discussion enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant