tricorder-observability / Starship

Starship: next-generation Observability platform built with eBPF+WASM
GNU Affero General Public License v3.0
164 stars 24 forks source link

Revamp API Server's HTTP APIs #50

Closed nascentcore-eng closed 1 year ago

nascentcore-eng commented 1 year ago

Is your feature request related to a problem? Please describe. Right now, API Server's HTTP APIs do not have sufficient documentation. Also, it's getting more and more fragile with additional changes, for example: https://github.com/tricorder-observability/starship/pull/49 This PR fixes the inconsistent API message, which has been changed, and broke CLI But there is currently no way to check such breakage in the tests.

Describe the solution you'd like We'd define request and response type in the Golang code. And enforce tests across the code base.

Describe alternatives you've considered Use protobuf across all places, even generate HTTP API interface skeleton with protobuf

Additional context https://tricorder.feishu.cn/wiki/wikcn3r1NMf1Z6yjCDDmM6oL0kc

nascentcore-eng commented 1 year ago

In addition to adding API Server swagger, we also should add integration tests with CLI interacting with API server, so that their interfaces stay compatible and consistent.