-
Notifications
You must be signed in to change notification settings - Fork 307
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
chore: option to pass *config.Config to jobsdb #3764
Conversation
48db425
to
3640ab1
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3764 +/- ##
==========================================
+ Coverage 68.69% 68.70% +0.01%
==========================================
Files 345 345
Lines 51652 51649 -3
==========================================
+ Hits 35480 35486 +6
+ Misses 13884 13877 -7
+ Partials 2288 2286 -2
☔ View full report in Codecov by Sentry. |
3640ab1
to
45fde75
Compare
d84ac94
to
cf30098
Compare
TriggerAddNewDS: func() <-chan time.Time { | ||
return triggerAddNewDS | ||
}, |
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.
how are we overriding jobsdb now so that it doesn't trigger the addNewDS loop?
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.
It wasn't being used anywhere in the test.
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.
Could it be that the test wanted to simply disable this trigger?
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.
true
didn't think of it that way😅
Fortunately this didn't affect this particular test.
But in the future with the config dependency, we could set the addDSLoop-timer
to a sufficiently large duration.
thank you @Sidddddarth! with respect to the description of this pull request, I believe it deserves some more attention to include all introduced changes |
a60054e
to
e5c564a
Compare
Description
Option(
Optfunc
) to have jobsdb-handle-specific config, which falls back toconfig.Default
if not passed.This can help avoid configuration mixups between tests, each jobsdb handle can have specific config to itself, and also to test actual runtime behaviour by changing config values instead of setting
jobsdb.Handle
's internal fields.Also moved and grouped jobsdb config fields around to help with readability. eg.: it wasn't entirely clear(to me at first glance) how the number of
maxOpenConnections
were being set in case of awrite
/read
/readWrite
jobsdb.Additionally:
misc.GetConnectionString
now takes in*config.Config
as a parameter, using it to fetch db connection details.Linear Ticket
jobsdb handle specific config
Security