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

Reorganize the project to separate agent and extension code #375

Open
pablochacin opened this issue Nov 15, 2023 · 0 comments
Open

Reorganize the project to separate agent and extension code #375

pablochacin opened this issue Nov 15, 2023 · 0 comments
Labels
design proposal Requires a design document for discussion internal improvement improves code quality or organization

Comments

@pablochacin
Copy link
Collaborator

The disruptor consists of two main parts: a k6 extension and an agent that runs in the targets of the fault injection.

Presently, the separation of these two components is not evident in the code structure:

cmd
   |-- agent  // agent command
pkg
  |-- agent                 // agent implementation
  |-- api                     // extension api
  |-- disruptors          // extension implementation
  |-- iptables             // used by the agent
  |-- kubernetes       // used by the extension
  |-- runtime             // used by the agent
  |-- testutils             // used by agent and extension
  |-- other packages (some may be shared)

This lack of clear separation brings some issues.
For example, the extension is expected to be multiplatform (as k6 itself is), while the agent in intended to run only in linux targets.
having to use build constrains to prevent some packages to build (or be tested) in non linux platforms can be tedious.

Therefore, It would be convenient to separate the code in at least four separate components:

  • agent
  • extension
  • shared (e.g utils, types)
  • test utils

An open question is whether these components should be independent modules in the same repository.

@pablochacin pablochacin added design proposal Requires a design document for discussion internal improvement improves code quality or organization labels Nov 15, 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 internal improvement improves code quality or organization
Projects
None yet
Development

No branches or pull requests

1 participant