nucliadb icon indicating copy to clipboard operation
nucliadb copied to clipboard

Cleanup ingest gRPC and id/slugs

Open jotare opened this issue 1 year ago • 1 comments

Description

  • Remove GetResourceId ingest call and use datamanagers directly from writer
  • Remove ResourceFieldExists from ingest gRPC
  • Simplify how we call writer endpoints by slug or by resource id. Functions get a rid and endpoints by slug convert it first, to avoid conditional code with optional rid/slug
  • KB deletion only by kbid. Deletion by slug is not an option in the REST API and having both in ingest makes no sense

How was this PR tested?

Existing tests

jotare avatar Apr 22 '24 11:04 jotare

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.06%. Comparing base (ea225f3) to head (cd78607). Report is 14 commits behind head on main.

:exclamation: Current head cd78607 differs from pull request most recent head a60bb9a. Consider uploading reports for the commit a60bb9a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2080      +/-   ##
==========================================
- Coverage   82.09%   82.06%   -0.04%     
==========================================
  Files          42       42              
  Lines        2346     2342       -4     
==========================================
- Hits         1926     1922       -4     
  Misses        420      420              
Flag Coverage Δ
utils 81.70% <ø> (-0.03%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 24 '24 16:04 codecov[bot]

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Exception: gRPC error: RpcFailure: 14-UNAVAILABLE upstream connect error or disconnect/reset before headers.... nucliadb.search.api.v1.search.catalog_post View Issue
  • ‼️ Exception: gRPC error: RpcFailure: 14-UNAVAILABLE upstream connect error or disconnect/reset before headers.... nucliadb_telemetry.tikv in _traced_async_wrapper View Issue
  • ‼️ Exception: gRPC error: RpcFailure: 14-UNAVAILABLE upstream connect error or disconnect/reset before headers.... nucliadb.search.api.v1.search.catalog_post View Issue

Did you find this useful? React with a 👍 or 👎

sentry-io[bot] avatar Apr 29 '24 11:04 sentry-io[bot]