celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

misc(blob/service)!: return single ErrNotFound in GetAll

Open vgonkivs opened this issue 1 year ago • 7 comments

Resolves #3192

vgonkivs avatar Mar 01 '24 09:03 vgonkivs

This is technically API breaking as someone could depend on the error, so we should mark it as so

Wondertan avatar Mar 01 '24 11:03 Wondertan

Codecov Report

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

Project coverage is 44.50%. Comparing base (2469e7a) to head (bc24637). Report is 134 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3223      +/-   ##
==========================================
- Coverage   44.83%   44.50%   -0.33%     
==========================================
  Files         265      273       +8     
  Lines       14620    15402     +782     
==========================================
+ Hits         6555     6855     +300     
- Misses       7313     7738     +425     
- Partials      752      809      +57     

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

codecov-commenter avatar Mar 07 '24 12:03 codecov-commenter

This is technically API breaking as someone could depend on the error, so we should mark it as so

Isn't this breaking? why were tags and ! removed?

jcstein avatar Mar 07 '24 15:03 jcstein

Reworked to non-breaking.

vgonkivs avatar Mar 07 '24 15:03 vgonkivs

makes sense, thanks! and in this feature, if there are no blobs, empty vector is returned? is there anything else that changes from a user perspective?

jcstein avatar Mar 07 '24 15:03 jcstein

if there are no blobs, empty vector is returned?

Yeap

is there anything else that changes from a user perspective?

  1. Single ErrNotFound is returned in case blobs won't be found in multiple namespaces.
  2. The result blobs will be grouped by namespace but we don't guarantee the order corresponding to namespaces in the request.(not changed but worth adding to docs imo)
  3. ErrNotFound will not be returned in case of multiple positive + multiple negative responses. If during [n1,n2,n3,n4] we will find only [n1,n3], they will be returned without any error.
  4. For other type of errors(e.g. networking), we can return both found blobs + merged from all other requests error

vgonkivs avatar Mar 11 '24 10:03 vgonkivs

Hey @jcstein, we discussed internally with @renaynay and agreed to return the break label bc the behaviour has been slightly changed.

vgonkivs avatar Mar 11 '24 13:03 vgonkivs