Skip to content

symbols: Bring this baby into 2021

Administrator requested to merge ef/refactor-symbols into main

Created by: efritz

Major changes:

  • Environment variables all defined in one place
  • Package reorg makes components we care to replace in the future untangled from other concerns. This includes a separation of the ctags parser and the persistence layer. Things are now much more unit-testable as a result (and some packages have decent coverage, some less than stellar; we should add a few more tests were they're lacking here)
  • We now emit uniform metrics and tracing for each major operation without the ad-hoc opentracing mess. This will give us easy in-roads to emitting honey and sentry events as well (cc @Strum355). We currently need to redo the dashboards for the new metrics here, but I think they'll be much better once updated.

New package organization:

.
├── internal
│   ├── api: http handler layer
│   ├── database
│   │   ├── janitor: background diskcache evicter
│   │   ├── store: wrapper around sqlite file interaction
│   │   └── writer: uses fetcher+parser to write/update sql files, uses with cache
│   ├── fetcher: pulls tar archives from gitserver, uses gitserver
│   ├── gitserver: sends commands to gitserver
│   ├── parser: factory and pools for ctags
│   └── types: shared search arg struct
├── main.go: initializes all types to work concretely with each other

Merge request reports

Loading