Skip to content

proxy: Decouple controller configuration from profiling #4158

@olix0r

Description

@olix0r

Our integration tests provide a mocked controller to integration tests so that they can perform discovery as they would in production. But they can be quite brittle, especially as the controller code is used in more places, especially the profiling use case.

The profiling use case, especially, should support traffic to an arbitrary number of services from an arbitrary number of clients, etc. In these cases, we really just want to provide a set of data (say, a JSON file or directory of JSON files) that can be used to satisfy the controller API. We do not want to have to manually instrument the controller logic in the profile's main.

The priorities goals are (in order) as follows:

  1. Decouple the controller configuration from profile tests, so that profile test configurations can grow without changing code.
  2. Be able to run the controller in a dedicated process so that it is not included in profiling.
  3. Cleanup existing tests, making it easier to add new integration tests

I assume that any work in this space should target tokio-0.2 (not 0.1)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions