-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Clean up TSVB API interface, convert to typescript #57342
Copy link
Copy link
Closed
Labels
Feature:TSVBTSVB (Time Series Visual Builder)TSVB (Time Series Visual Builder)Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//impact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.Addressing this issue will have a low level of impact on the quality/strength of our product.technical debtImprovement of the software architecture and operational architectureImprovement of the software architecture and operational architecture
Metadata
Metadata
Assignees
Labels
Feature:TSVBTSVB (Time Series Visual Builder)TSVB (Time Series Visual Builder)Team:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//impact:lowAddressing this issue will have a low level of impact on the quality/strength of our product.Addressing this issue will have a low level of impact on the quality/strength of our product.technical debtImprovement of the software architecture and operational architectureImprovement of the software architecture and operational architecture
Type
Fields
Give feedbackNo fields configured for issues without a type.
The TSVB plugin is largely untyped. This is especially problematic because large config objects are sent from the client to the server without a defined shape. A preliminary Joi schema validating the config objects is currently in place in
src/plugins/vis_type_timeseries/server/routes/post_vis_schema.ts, but might contain subtle mistakes, especially since saved objects can contain configurations created with old, potentially buggy versions of TSVB.Additionally the TSVB server side code still assumes the shape of the legacy platform request object in some places - this abstraction is leaking out into the search strategy extension point used by rollup.
To clean this up and get to a well-defined API interface (both for the route and extension point), multiple clean up steps are required:
@kbn/schema- this will provide a type we can use elsewhere