Starship icon indicating copy to clipboard operation
Starship copied to clipboard

Starship CLI enhancement

Open nascentcore-eng opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. There are a lot of limitations of using starship CLI

  • [ ] It's troublesome to open grafana to see the data
  • [ ] Module creation error should return the ID of the already existing module
  • [ ] All mutation commands must prompt for user confirmation
  • [ ] Module creation needs to fail on invalid flags 17e73ea3-736e-4733-9f8b-2b7ae8a7c37f Starship CLI does not fail when the flag points to a non-existent file, and the API Server does not fail on empty WASM content. Both should be changed to opposite.
  • [ ] Better version information, something like minikube image

Describe the solution you'd like Starship CLI just query API Server and API Server delegate the query to postgres

Describe alternatives you've considered Starship CLI directly query exposed postgres server.

Additional context None

nascentcore-eng avatar Feb 21 '23 03:02 nascentcore-eng

I want to add some comments:

  1. add a subcommand to get all agent runtime information (like deployed modules, and agent version)
  2. in the list modules command, deployed log and status (every agent) need to be displayed in the output, which is useful in some debug cases.

oojimmy avatar Feb 22 '23 11:02 oojimmy

... get all agent runtime information (like deployed modules, and agent version)

For deployed modules, this should be available from the API Server's SQLite DB, by combo module table's module ID & node_agent table's node_name, and agent_id records. By combo, I mean to get all combinations of records in 2 sets. For example:

module table
id:1 ...
id:2 ...

node_agent table, this is used to combine module ID and node_agents

node_name:ec2-1 agent_pod_id:pod_1234, agent_id:xxxx, state:online
node_name:ec2-2 ... state: terminated

By combining module ID and node agents, this produces a list of module instances that should be checked in module_instance table

id:1 node_name:ec2-1 agent_id:..., 

By querying module_instance table, we can get their state

For agent version, I don't know what is this. Could you elaborate?

deployed log and status (every agent) need to be displayed in the output

Is this the actions performed on API Server and agents?

nascentcore-eng avatar Feb 23 '23 01:02 nascentcore-eng