Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

@emidoots
Copy link
Member

Today, schemadoc generates a single schema.md file for both the frontend and codeintel DBs. It does this by applying the migrations of both to the same DB and then extracting the info it needs, which is okay because Code Intel's Postgres DB and frontend are intentionally compatible and usable in the same Postgres instance (although not advised.)

For Code Insights (see #17217) I am introducing a separate TimescaleDB instance. It is basically just a Postgres plugin, but will be deploying it separately from our other Postgres instances and not designing it to be compatible with our frontend DB as codeintel has chosen to do. I am doing it this way because TimescaleDB lags a bit behind the official Postgres versioning (e.g. they are on v12) and don't want us to be tied to the version TimescaleDB supports. Also, installing the plugin is more tedious/annoying than just running it separately (and isolation is nice.)

Fixes #17217

Signed-off-by: Stephen Gutekanst stephen.gutekanst@gmail.com

…tend DBs

This is needed for us to be able to generate a schema.md file for the new Code Insights
DB, which will be a separate TimescaleDB deployment / cannot be part of the same Postgres
DB.

Fixes #17217 (see that issue for a more detailed explanation.)

Signed-off-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
@emidoots emidoots requested a review from efritz January 13, 2021 03:24
@emidoots emidoots mentioned this pull request Jan 13, 2021
27 tasks
@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #17228 (238ebb5) into main (addf98e) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #17228   +/-   ##
=======================================
  Coverage   51.98%   51.98%           
=======================================
  Files        1706     1706           
  Lines       84926    84926           
  Branches     7519     7510    -9     
=======================================
+ Hits        44150    44153    +3     
+ Misses      36873    36871    -2     
+ Partials     3903     3902    -1     
Flag Coverage Δ
go 51.03% <ø> (+<0.01%) ⬆️
integration 30.50% <ø> (-0.03%) ⬇️
storybook 30.05% <ø> (ø)
typescript 54.30% <ø> (+<0.01%) ⬆️
unit 34.80% <ø> (ø)
Impacted Files Coverage Δ
client/web/src/settings/SettingsFile.tsx 71.73% <0.00%> (+1.08%) ⬆️
.../internal/codeintel/resolvers/graphql/locations.go 85.56% <0.00%> (+2.06%) ⬆️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

code-insights Issues related to the Code Insights product slimsag-basic-scaffolding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

code insights: make internal/db/schemadoc generate separate files per DB

3 participants