Skip to content
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

feat: introduce postgres dbstore with migrations #198

Merged
merged 14 commits into from
Dec 3, 2024

Conversation

mfiedorowicz
Copy link
Member

  • add postgres db to docker compose
  • add postgres schemas/migrations and initial queries
  • generate dbstore code using sqlc
  • add repositories for ingestion logs and change sets
  • run migration on reconciler service startup
Screenshot 2024-12-03 at 14 30 52

Copy link

github-actions bot commented Dec 3, 2024

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/dbstore/postgres 0.0% 0 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/gen/dbstore/postgres 0.0% 0 0 0
🟢 PASS 1.25s github.com/netboxlabs/diode/diode-server/ingester 71.2% 9 0 0
🟢 PASS 1.04s github.com/netboxlabs/diode/diode-server/migrator 68.2% 4 0 0
🟢 PASS 0.01s github.com/netboxlabs/diode/diode-server/netbox 0.0% 0 0 0
🟢 PASS 1.59s github.com/netboxlabs/diode/diode-server/netboxdiodeplugin 78.1% 40 0 0
🟢 PASS 1.48s github.com/netboxlabs/diode/diode-server/reconciler 85.0% 64 0 0
🟢 PASS 1.11s github.com/netboxlabs/diode/diode-server/reconciler/applier 88.9% 1 0 0
🟢 PASS 1.48s github.com/netboxlabs/diode/diode-server/reconciler/differ 80.9% 81 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/server 85.7% 14 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/version 100.0% 1 0 0

Total coverage: 79.4%

Copy link
Contributor

@leoparente leoparente left a comment

Choose a reason for hiding this comment

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

Overall, LGMT!

@mfiedorowicz mfiedorowicz changed the title feat: introduce postgres dbstore feat: introduce postgres dbstore with migrations Dec 3, 2024
@mfiedorowicz mfiedorowicz merged commit c10c080 into develop Dec 3, 2024
3 checks passed
@mfiedorowicz mfiedorowicz deleted the postgres-dbstore-pt-1 branch December 3, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants