-
-
Notifications
You must be signed in to change notification settings - Fork 669
Preparations for removing BaseDendrite
#3016
Conversation
BaseDendrite
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3016 +/- ##
==========================================
+ Coverage 63.04% 63.15% +0.10%
==========================================
Files 496 497 +1
Lines 53837 53843 +6
==========================================
+ Hits 33944 34003 +59
+ Misses 16173 16115 -58
- Partials 3720 3725 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 46 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ 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.
Great improvement so far! Let's land it.
// Create required internal APIs | ||
rsAPI := roomserver.NewInternalAPI(base) | ||
rsAPI := roomserver.NewInternalAPI(base, caches) |
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.
I assume the idea is unpick base
from this entirely, and adding caches
is just a step towards that?
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.
Indeed, that is the idea. Gradually remove the need for base
.
httpRouter.PathPrefix(httputil.PublicClientPathPrefix).Handler(base.PublicClientAPIMux) | ||
httpRouter.PathPrefix(httputil.PublicMediaPathPrefix).Handler(base.PublicMediaAPIMux) | ||
httpRouter.PathPrefix(httputil.PublicClientPathPrefix).Handler(base.Routers.Client) | ||
httpRouter.PathPrefix(httputil.PublicMediaPathPrefix).Handler(base.Routers.Media) |
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.
Amazing names, much much better now we have no private APIs 😍
go func() { | ||
<-ctx.Done() | ||
_ = fts.Close() | ||
}() |
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.
Needs docs.
"net/url" | ||
|
||
"github.com/gorilla/mux" |
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.
As a side note, do we have an issue to replace mux? We need to as it has been archived and isn't maintained anymore.
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.
Now we have #3017
) | ||
|
||
type ConnectionManager interface { | ||
Connection(dbProperties *config.DatabaseOptions) (*sql.DB, Writer, error) |
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.
Not sure I see the value in interfacing this? Any concrete impl would need to return a DB which is pretty difficult to mock out!
Preparations to actually remove/replace
BaseDendrite
.Quite a few changes:
fulltext.Indexer
interface (fulltext is removed fromBaseDendrite
)BaseDendrite
Router
struct (likely to change)sqlutil.ConnectionManager
, which should removebase.DatabaseConnection
later on