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)
Wed, Mar 19, 3:54 PM
Unknown Object (File)
Feb 28 2025, 8:22 PM
Unknown Object (File)
Feb 28 2025, 8:22 PM
Unknown Object (File)
Feb 28 2025, 4:08 PM
Unknown Object (File)
Feb 5 2025, 4:57 PM
Unknown Object (File)
Feb 3 2025, 3:05 PM
Unknown Object (File)
Feb 3 2025, 1:27 PM
Unknown Object (File)
Jan 30 2025, 1: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
Branch
remove-elastic
Lint
No Lint Coverage
Unit
No Test Coverage

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

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

services/identity/src/websockets/opensearch.rs
4
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.