-
Notifications
You must be signed in to change notification settings - Fork 4
Add db-backed implementation of RegistryService
#161
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #161 +/- ##
==========================================
+ Coverage 64.58% 67.02% +2.43%
==========================================
Files 51 53 +2
Lines 2725 2981 +256
==========================================
+ Hits 1760 1998 +238
- Misses 841 851 +10
- Partials 124 132 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I can split this PR by function if it's too big. |
|
@claude Using the code reviewer, golang code writer and unit test writer agents, could you provide a review on this PR. Please keep your summary as concise as possible and only mention critical improvements that should be considered now and near-term/immediately after this PR is merged. |
|
Claude finished @ChrisJBurns's task —— View job PR Review CompleteI've reviewed this PR using the code-reviewer, golang-code-writer, and unit-test-writer agents. Overall, this is a solid implementation of the database-backed RegistryService with comprehensive integration tests (94.53% coverage). However, there are critical safety issues that should be addressed before or immediately after merge. 🔴 Critical Issues (Address Before Merge)1. Nil Pointer Dereference Risk -
|
70c2372 to
ba946ac
Compare
|
@claude Using the code reviewer, golang code writer and unit test writer agents, could you provide a review on this PR. Please keep your summary succinct and only mention critical improvements that should be considered now and near-term/immediately after this PR is merged. |
|
Claude finished @blkt's task —— View job PR Review CompleteI've reviewed this PR using the code-reviewer, unit-test-writer, and golang-code-writer agents. Overall, this is a well-structured implementation with strong test coverage (93.02%). However, there are critical safety issues that must be addressed. 🔴 Critical Issues (Must Fix Before Merge)1. Resource Leak - Connection Pool Never Closed (
|
ba946ac to
bc7581d
Compare
This change adds a db-backed implementation of the `RegistryService` interface. There are multiple public interfaces added in this change, specifically * `internal/service` which exposes the `RegistryService` interface with an `Option` type used to configure filtering and pagination of SQL statements. * `internal/service/db` which exposes means to create a `RegistryService` backed by a database. Testing is implemented as integration tests running containers in the same fashion as the `internal/db/sqlc` package. This might be revised in the future by using mocks, but (a) a mock based implementation is not going to be more succinct, and (b) does its job of covering most of the new code. The change set is pretty big, but more than 65% of it are tests.
bc7581d to
d9fe0df
Compare
This change adds a db-backed implementation of the
RegistryServiceinterface.There are multiple public interfaces added in this change, specifically
internal/servicewhich exposes theRegistryServiceinterface with anOptiontype used to configure filtering and pagination of SQL statements.internal/service/dbwhich exposes means to create aRegistryServicebacked by a database.Testing is implemented as integration tests running containers in the same fashion as the
internal/db/sqlcpackage. This might be revised in the future by using mocks, but (a) a mock based implementation is not going to be more succinct, and (b) does its job of covering most of the new code.The change set is pretty big, but more than 65% of it are tests.