add an internal API endpoint to help in rendering related config entries
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
The discovery chain API endpoint returns back the _compiled_ view of the config entries. For possible visualizations it may be more useful to display the _original_ view.
Under the covers the discovery chain endpoints operate in two steps:
1. fetch related config entries
2. assemble those config entries into an AST/graph
Probably it would be useful to just execute (1). That would be enough to give the UI a list of graph nodes, but then the UI would need to infer the appropriate edges. This is a little bit silly because in order to fetch the related entries the state store already is traversing these same edges.
We could just augment the traversal function to record all of the `(src_kind, src_name, dst_kind, dst_name, edge_type)` edges as it goes and return those to the caller as well. Like the discovery chain results it probably should also return which kind/name is the first one at the top of the sequence to start rendering.
This would not be terribly difficult to add.
Contributor guide
Research direction
Start by locating the discovery chain API endpoint and the state-store traversal function it uses. Trace how related config entries become the compiled AST/graph, then determine how the traversal can expose original entries, edge tuples, and the first kind/name for rendering; done means the internal endpoint returns those values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100