Page MenuHomePhabricator

[identity] Replace elastic crate in identity
ClosedPublic

Authored by will on Mar 3 2024, 10:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 18, 2:45 AM
Unknown Object (File)
Tue, Jun 18, 2:45 AM
Unknown Object (File)
Tue, Jun 18, 2:06 AM
Unknown Object (File)
Wed, Jun 12, 6:27 PM
Unknown Object (File)
Wed, Jun 12, 4:43 PM
Unknown Object (File)
May 15 2024, 9:17 AM
Unknown Object (File)
May 12 2024, 11:31 PM
Unknown Object (File)
Apr 4 2024, 6:43 PM
Subscribers

Details

Summary

This replaces the elastic crate by implementing the opensearch response struct in the file opensearch.rs. Attempted looking into using the opensearch rust crate but it doesn't implement a deserializable struct. Instead, opensearch.rs examples showed accessing the hits as a serde_json::Value. Opted to implementing our own struct instead with anything extraneous removed

Context: https://linear.app/comm/issue/ENG-7046/remove-elastic-package-from-identity-service

Test Plan

Tested on local websocket server. Successfully deserializing opensearch response into hit results

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will retitled this revision from [identity] Replace elastic crate to [identity] Replace elastic crate in identity.Mar 3 2024, 10:45 PM
will added a reviewer: bartek.
will edited the summary of this revision. (Show Details)
will edited the summary of this revision. (Show Details)
services/identity/src/websockets/mod.rs
175 ↗(On Diff #37764)

Using filter_map to grab only the Ok values. Not sure if there's a cleaner way

services/identity/src/websockets/opensearch.rs
4 ↗(On Diff #37764)
will requested review of this revision.Mar 3 2024, 10:59 PM
will edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 4 2024, 9:57 PM
This revision was automatically updated to reflect the committed changes.