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

Conversation

@emidoots
Copy link
Member

@emidoots emidoots commented Jan 28, 2021

This adds the basic store package implementation (just the groundowork, no
actual implementation) based on what we do in campaigns, code monitoring, etc.

I am sending this as a separate PR before implementing the store, as it is
a non-trivial amount of setup code which is nice to track separately for
purposes of documentation and for seeing how we can improve adding backends
like this, campaigns, code monitoring, etc. in the future.

Depends on: (TODO: send other PR for running timescale on CI)

Helps #17218

Fixes #17226

Signed-off-by: Stephen Gutekanst stephen@sourcegraph.com

…structure

This adds the basic store package implementation (just the groundowork, no
actual implementation) based on what we do in campaigns, code monitoring, etc.

I am sending this as a separate PR before implementing the store, as it is
a non-trivial amount of setup code which is nice to track separately for
purposes of documentation and for seeing how we can improve adding backends
like this, campaigns, code monitoring, etc. in the future.

Helps #17218

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
@emidoots emidoots added team/internal-contributor code-insights Issues related to the Code Insights product labels Jan 28, 2021
@emidoots emidoots added this to the 3.25 milestone Jan 28, 2021
@emidoots emidoots requested review from asdine and efritz January 28, 2021 00:35
@emidoots emidoots mentioned this pull request Jan 28, 2021
27 tasks
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Jan 28, 2021

Notifying subscribers in CODENOTIFY files for diff 77b3ce3...199a53a.

Notify File(s)
@felixfbecker enterprise/internal/insights/insights.go
enterprise/internal/insights/resolvers/resolver.go
enterprise/internal/insights/store/insights_test.go
enterprise/internal/insights/store/integration_test.go
enterprise/internal/insights/store/store.go

@emidoots emidoots closed this Jan 28, 2021
@efritz
Copy link
Contributor

efritz commented Jan 28, 2021

🤔

@emidoots
Copy link
Member Author

gonna reopen in a bit, I realized I need to do more work here to get this running nicely in CI + dev testing environments first (depends on timescaledb being launched via docker)

Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
@emidoots emidoots reopened this Jan 28, 2021
@emidoots
Copy link
Member Author

Ok, PTAL @efritz

@efritz
Copy link
Contributor

efritz commented Jan 28, 2021

image

@codecov
Copy link

codecov bot commented Jan 28, 2021

Codecov Report

Merging #17733 (199a53a) into main (77b3ce3) will increase coverage by 3.09%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main   #17733      +/-   ##
==========================================
+ Coverage   48.10%   51.20%   +3.09%     
==========================================
  Files        1720     1721       +1     
  Lines       86067    86071       +4     
  Branches     7699     7699              
==========================================
+ Hits        41404    44069    +2665     
+ Misses      40773    38109    -2664     
- Partials     3890     3893       +3     
Flag Coverage Δ
go 49.93% <25.00%> (-0.01%) ⬇️
integration 30.73% <ø> (?)
storybook 30.67% <ø> (+0.04%) ⬆️
typescript 54.27% <ø> (+10.62%) ⬆️
unit 34.59% <ø> (ø)
Impacted Files Coverage Δ
enterprise/internal/insights/store/store.go 25.00% <25.00%> (ø)
.../internal/codeintel/resolvers/graphql/locations.go 83.50% <0.00%> (-2.07%) ⬇️
...nal/campaigns/resolvers/changeset_apply_preview.go 65.92% <0.00%> (+1.48%) ⬆️
...ise/code-monitoring/components/FormTriggerArea.tsx 86.20% <0.00%> (+1.72%) ⬆️
client/web/src/search/helpers.tsx 100.00% <0.00%> (+2.00%) ⬆️
client/web/src/org/area/OrgInvitationPage.tsx 2.27% <0.00%> (+2.27%) ⬆️
.../preview/list/VisibleChangesetApplyPreviewNode.tsx 83.89% <0.00%> (+2.54%) ⬆️
...lient/web/src/search/results/SearchResultsList.tsx 79.48% <0.00%> (+2.56%) ⬆️
...se/campaigns/close/CampaignCloseChangesetsList.tsx 82.75% <0.00%> (+3.44%) ⬆️
... and 204 more

// Store exposes methods to read and write code insights domain models from
// persistent storage.
type Store struct {
*basestore.Store
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@emidoots emidoots merged commit 3520c7e into main Jan 28, 2021
@emidoots emidoots deleted the sg/codeinsights-store-base branch January 28, 2021 01:35
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: deploy TimescaleDB in dev and CI environments

4 participants