Avoid cross-dependencies between components #1940
Labels
meta: idea
Anything in the idea phase. Needs further discussion and consensus before work can begin.
type: tech debt
A code change that does not add user value.
Currently some components of Vector import and use code from other components. The list of such dependencies is the following:
sources-kubernetes
depends onsources-file
,transforms-json_parser
,transforms-regex_parser
;sources-syslog
depends onsources-socket
;sources-vector
depends onsources-socket
;sinks-humio_logs
depends onsinks-splunk_hec
;sinks-new_relic_logs
dependes onsinks-http
;sinks-sematext_logs
depends onsinks-elasticsearch
.I think in long term this might make it harder to refactor individual components, as change is one component might break some other (seemingly) unrelated component. So ideally we need to identify the common code and factor it out to
lib
crates or, if the code is too specific, at least as util modules.The above relates only to implementation of components, but not to their tests. Using other components in tests I think is less an issue, although some tests for components might be changed to not depend on other components. In particular, I think most of the tests depending on
json_parser
can be modified to avoid such a dependency.See also #1924.
The text was updated successfully, but these errors were encountered: