-
Notifications
You must be signed in to change notification settings - Fork 324
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
Bloodhound / Opensearch #4261
base: develop
Are you sure you want to change the base?
Bloodhound / Opensearch #4261
Conversation
7669b04
to
4b643a3
Compare
f331e51
to
1f6823e
Compare
updateTeamSearchVisibilityInboundImpl :: forall r. (Member (Embed IO) r) => IndexedUserStoreConfig -> TeamId -> SearchVisibilityInbound -> Sem r () | ||
updateTeamSearchVisibilityInboundImpl cfg tid vis = | ||
void $ runInBothES cfg updateAllDocs | ||
where | ||
updateAllDocs :: ES.IndexName -> ES.BH (Sem r) () | ||
updateAllDocs idx = do | ||
r <- ES.updateByQuery idx query (Just script) | ||
r <- hoistBH (embed @IO) $ ES.performBHRequest . fmap fst . ES.keepBHResponse $ ESR.updateByQuery @Value idx query (Just script) |
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 handling of version conflicts is probably broken here. See bitemyapp/bloodhound#295
2b268b2
to
91ef5f0
Compare
networks: | ||
- demo_wire | ||
|
||
opensearch-dashboard: |
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.
dashboard! neat! is there a good place to mention that so people might notice?
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.
The Developer how-to's[sic] seem to be a good place: https://github.com/wireapp/wire-server/pull/4261/files#diff-9d61e022388a68889ab4d5f60ae707d533693274a2c21540162c00e9e528f497R215
libs/wire-subsystems/src/Wire/IndexedUserStore/MigrationStore/ElasticSearch.hs
Outdated
Show resolved
Hide resolved
libs/wire-subsystems/src/Wire/IndexedUserStore/MigrationStore/ElasticSearch.hs
Outdated
Show resolved
Hide resolved
case persistResponse of | ||
Left _ -> throw $ PersistVersionFailed v $ show persistResponse | ||
Right r -> | ||
if ES.idxDocId r == docIdText |
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.
Shouldn't this still do something involving ES.isCreated
?
castResponse :: forall context1 val1 context2 val2. BHResponse context1 val1 -> BHResponse context2 val2 | ||
castResponse BHResponse {..} = BHResponse {..} |
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.
Huh? How does this work without casting the fields?
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's about casting phantom types. However, I've refactored this part to make it better understandable (Your question was an important hint!)
-- | Parse `BHResponse` as `ES.EsError`
parseESError :: BHResponse ES.StatusDependant any -> Either ES.EsProtocolException ES.EsError
parseESError res = either id id <$> ES.parseEsResponse (castResponse res)
where
castResponse :: BHResponse ES.StatusDependant any -> BHResponse ES.StatusDependant ES.EsError
castResponse BHResponse {..} = BHResponse {..}
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.
just rejecting this PR so nobody accidentally merges it (see description).
9c29e8c
to
8eb8c42
Compare
a21d71b
to
b58a7d5
Compare
d1a5104
to
ad27cff
Compare
deploy/dockerephemeral/docker/opensearch/opensearch-security/internal_users.yml
Show resolved
Hide resolved
fcd0f1a
to
857328d
Compare
The latest master of Bloodhound contains a fix regarding parsing responses that we need to use OpenSearch 1.x. Unfortunately, the interface of this library changed a lot.
This will be our new target, to be used on-prem and in the Wire cloud.
This includes adding the OpenSearch Dashboards (for better visibility and debugging purposes.)
This reflects the prior behaviour.
Won't be compatible to OpenSearch. And, users should setup their services on their own. Fix
This fits better into the Parser picture: If a value is invalid, fail in parsing - don't throw errors later.
857328d
to
1230a33
Compare
This should only be released in combination with an infrastructure migration from ElasticSearch 6 to OpenSearch 1.3.
Ticket: https://wearezeta.atlassian.net/browse/WPB-10715
Checklist
changelog.d