-
Notifications
You must be signed in to change notification settings - Fork 127
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
NEOS-1641: Fixes stale DB Connections during Data Sync Workflow #2995
NEOS-1641: Fixes stale DB Connections during Data Sync Workflow #2995
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2995 +/- ##
==========================================
+ Coverage 35.58% 36.10% +0.51%
==========================================
Files 337 343 +6
Lines 39189 39323 +134
==========================================
+ Hits 13944 14196 +252
+ Misses 23599 23477 -122
- Partials 1646 1650 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clean! Left a few comments nothing blocking
"public.users": {Columns: []string{"id"}}, | ||
}, resp.Msg.TableConstraints) | ||
} | ||
// import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean to comment this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot, I don't think I did. I'll fix them, but we need to replace these with integration tests.
|
||
func (c *ConnectionManager[T]) GetConnection( | ||
session SessionInterface, | ||
connection ConnectionInput, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be helpful to have a few debug logs here about when it finds an existing vs when it creates a new one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good callout. I updated the interface to require the logger and filled it out throughout with more messages.
This forced me to pass it down further anyways and replaced a few instances where I was using the global slog.
@@ -1573,31 +1573,32 @@ func (f *fakeEELicense) IsValid() bool { | |||
} | |||
|
|||
func executeWorkflow( | |||
t *testing.T, | |||
t testing.TB, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -32,6 +34,10 @@ func (r *RedisTestContainer) Setup(ctx context.Context) (*RedisTestContainer, er | |||
"docker.io/redis:7", | |||
redis.WithSnapshotting(10, 1), | |||
redis.WithLogLevel(redis.LogLevelVerbose), | |||
testcontainers.WithWaitStrategy( | |||
wait.ForLog("* Ready to accept connections"), | |||
wait.ForExposedPort(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to have fixed the redis container flakiness.
This is a pretty large refactor that does a few things: