-
Notifications
You must be signed in to change notification settings - Fork 332
Move search operations to UserSubsystem #4188
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
Merged
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
aa014bf
UserStore.Cassandra: Dedup embed call
akshaymankar cac29c2
Move all indexing operations to UserSearchSubsystem
akshaymankar 082fdcd
Add metrics to UserSearchSubsystem and IndexedUserStore
akshaymankar aac6ed0
Run user serach index data migrations using subsystems
akshaymankar c234972
Remove explicit creds from ESConn
akshaymankar 63afe93
Delete leftover code from Brig.Index.Eval
akshaymankar d732248
Move UserDoc tests to subsystem
akshaymankar e46d019
indexUserRow -> indexUser
akshaymankar e0c68fa
brig: Delete bulk reindex operations from internal API
akshaymankar d0272df
brig: Use the UserSearchSubsystem for syncing with index
akshaymankar 9fab12e
regen nix
akshaymankar f170493
Rename an effect action
46e8629
WIP: Move search code to subsystem
akshaymankar 1a0f892
Move FederationConfigStore.Cassandra out of Brig
b0391e4
Remove dead code from Brig.User.API.Search
78d8856
Move browseTeam to wire-subsystem
4ad948f
wire-subsystems: Fix compile errors with MiniBackend
akshaymankar 67a3617
Merge UserSearchSubsystem into UserSubsystem
akshaymankar 459c6b8
Wire.BlockListStore.Cassandra: Take ClientState as an arg instead of …
akshaymankar 2560436
brig: Untangle sending user notifs and maintaining internal state
akshaymankar d77a0c1
Fix merge mistakes
akshaymankar 39b4ea0
Delete leftover comment
akshaymankar 01efe6a
UserStore.GetIndexUsersPaginated: Allow specifying page size
akshaymankar c664d34
wire-subsystems: Fix mock interpreters
akshaymankar 4ec43a2
Dedup IndexError
akshaymankar f614653
Remove TODO
akshaymankar 542f5ba
Reorganize Bulk operations
akshaymankar 0ec354b
UserSearch.Types: Remove comment
akshaymankar 0369090
Move expectedMigrationVersion to IndexedUserStore.Bulk
akshaymankar ec8a5d5
regen nix
akshaymankar 3e25c07
Merge remote-tracking branch 'origin/develop' into wpb-8888/search-su…
elland 559e154
Removed duplicated function.
elland 63e3c4b
Brig.API.User.onActivated: update the index when email changes
akshaymankar b6f08d2
Promote suspected bug to confirmed bug, to be solved in a separate ti…
akshaymankar 66a97d7
Another bug reported for another ticket
akshaymankar ede2aa1
hi ci
elland 15a2c44
Merge branch 'develop' into wpb-8888/search-subsystem
elland 1806e82
Resolve todo:
elland 7d0d0c7
Update user search index on team changes.
elland 99ab272
Pass casClient instead of embed.
elland 8c73d31
Error for searcher doesn't exist.
elland 1446cdb
Removed TODO, out of scope.
elland d8bac42
Upgraded TODO to FUTUREWORK.
elland 1861511
Added changelogs.
elland 69ce200
UserSubsystem: simplify folding over a domain
6fc44e9
Merge remote-tracking branch 'origin/develop' into wpb-8888/search-su…
7404df1
Bubble up liftSem'ing
55cc084
Merge remote-tracking branch 'origin/develop' into wpb-8888/search-su…
4b39d28
Remove commented out code
d479ed6
Error messages for mocks/uninterpreted actions
567a8d3
Remove a UserSubsystemError
e7017f5
Merge remote-tracking branch 'origin/develop' into wpb-8888/search-su…
01fa1bd
Remove unusued MapError instance
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Removed `indexReindex` and `indexReindexIfSameOrNewer` from internal Brig/SearchIndex. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Introduced ElasticSearch effects related to user search. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| {-# LANGUAGE TemplateHaskell #-} | ||
|
|
||
| module Wire.Sem.Metrics where | ||
|
|
||
| import Imports | ||
| import Polysemy | ||
| import Prometheus (Counter, Gauge) | ||
|
|
||
| -- | NOTE: Vectors would require non trival changes because | ||
| -- 'Prometheus.withLabel' take a paramter of type 'metric -> IO ()'. | ||
| data Metrics m a where | ||
| AddCounter :: Counter -> Double -> Metrics m () | ||
| AddGauge :: Gauge -> Double -> Metrics m () | ||
|
|
||
| makeSem ''Metrics | ||
|
|
||
| incCounter :: (Member Metrics r) => Counter -> Sem r () | ||
| incCounter c = addCounter c 1 | ||
|
|
||
| incGauge :: (Member Metrics r) => Gauge -> Sem r () | ||
| incGauge c = addGauge c 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| module Wire.Sem.Metrics.IO where | ||
|
|
||
| import Imports | ||
| import Polysemy | ||
| import qualified Prometheus as Prom | ||
| import Wire.Sem.Metrics | ||
|
|
||
| runMetricsToIO :: (Member (Embed IO) r) => InterpreterFor Metrics r | ||
| runMetricsToIO = interpret $ \case | ||
| AddCounter c n -> embed . void $ Prom.addCounter @IO c n | ||
| AddGauge g n -> embed $ Prom.addGauge @IO g n | ||
|
|
||
| ignoreMetrics :: InterpreterFor Metrics r | ||
| ignoreMetrics = interpret $ \case | ||
| AddCounter _ _ -> pure () | ||
| AddGauge _ _ -> pure () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.