insights: add building block for `sg insights` tool
Created by: leonore
an sg insights
(or similar sg team
tools) were discussed in various quick insights conversations and a backend crew meeting. this has been sitting in my local env for a while and I've finally found the time to polish it up for review.
this adds, mainly:
- a building block for
sg insights
actions, so we can add more of them - a
sg insights series-ids
command, which given a frontend insight id, will find its series ids, which is a common workflow in insights.
Test plan
ksg port-forward codeinsights-db-0 5438:5432
PGPORT=5438 PGUSER=postgres PGDATABASE=postgres go run . -config ../../sg.config.yaml insights series-ids aW5zaWdodF92aWV3OiIyM3c2OWNaUTBWMlRlYWIyOHFYd1hqbDk0blci
once merged we should just be able to use sg insights series-ids [x]