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)
Thu, Nov 21, 2:53 AM
Unknown Object (File)
Thu, Nov 21, 2:53 AM
Unknown Object (File)
Oct 22 2024, 2:14 PM
Unknown Object (File)
Oct 22 2024, 1:07 PM
Unknown Object (File)
Oct 22 2024, 8:36 AM
Unknown Object (File)
Oct 22 2024, 8:36 AM
Unknown Object (File)
Sep 7 2024, 11:05 AM
Unknown Object (File)
Sep 6 2024, 11:55 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.