-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insights: investigate DB snapshotting in CI setup [spike] #34704
Comments
Heads up @Joelkw @felixfbecker @vovakulikov @unclejustin - the "team/code-insights" label was applied to this issue. |
@coury-clark it depends on where you'd want to run this. If that's in CI, not yet but that should not be hard. If that's on preprod, I have an ongoing PR that enables to restore snapshots at the beginning of a build, so in that case, we could take a snapshot after having put the preprod in the state we're after. |
Goal: spike this in iteration 18 to understand if this helps solve our testing problems. |
What we want to achieve, essentially, is to be able to get a snapshot of code insights data from a db in an environment, and then apply that snapshot into another environment, for 2 purposes:
|
Update: we worked with @leonore and @davejrt on POC'ing this by pulling out a database dump from the demo and importing the data in local to run some queries. @leonore confirmed that she was able to perform meaningful requests in local that would be good to take into a test suite. Next step is to POC doing this in CI. |
@leonore (cc @sourcegraph/code-insights-backend) it was a bit more complicated that expected as the single server image doesn't run code insights and the preprod doesn't either because it runs in dotcom mode. In the end we opted for deploying a cluster on the fly within the CI and pointing those tests toward it as you can see here https://buildkite.com/sourcegraph/sourcegraph/builds/154809#018167f2-dab4-43b6-8403-084cf47778cd/582-583 We have a bit of flakiness to provision the database, but that's something we can probably work out (cc @davejrt). At this stage, it validates the POC from our perspective, and we should discuss what's next. The remaining items I'm seeing here are:
|
repurposing this issue for db snapshotting as part of CI to keep track of the conversations/PRs opened another issue for easier approach to just have a manual dump and apply tool for insights and use dump data for local test: #40024 |
As part of a patch retro (3.39.1) we discussed that having some snapshots of useful data may make it easier to test various scenarios that are otherwise challenging to test. This issue is to investigate:
The text was updated successfully, but these errors were encountered: