livepeer / go-tools

Utility packages used across Livepeer Go repositories.
0 stars 2 forks source link

drivers: Implement a consistent error for "not exist" #121

Closed victorges closed 2 months ago

victorges commented 2 months ago

On the catalyst-api changes to support a backup storage, we will need to handle 404s more gracefully to avoid retrying for a long time reading from a storage that just doesn't have the file.

This is especially relevant in the manifest fetching code, which will always need to fetch the file in both primary and backup storages. We don't want to wait for all retries on the backup storage when the manifest only exists on the primary (most of the time).

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.

Project coverage is 25.77065%. Comparing base (5368fd4) to head (2e5ed89).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/livepeer/go-tools/pull/121/graphs/tree.svg?width=650&height=150&src=pr&token=aoHAc2Zze6&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer)](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) ```diff @@ Coverage Diff @@ ## main #121 +/- ## =================================================== - Coverage 26.01120% 25.77065% -0.24055% =================================================== Files 13 13 Lines 1607 1622 +15 =================================================== Hits 418 418 - Misses 1151 1164 +13 - Partials 38 40 +2 ``` | [Files](https://app.codecov.io/gh/livepeer/go-tools/pull/121?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) | Coverage Δ | | |---|---|---| | [drivers/drivers.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fdrivers.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9kcml2ZXJzLmdv) | `54.05405% <ø> (ø)` | | | [drivers/local.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Flocal.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9sb2NhbC5nbw==) | `49.10180% <0.00000%> (ø)` | | | [drivers/ipfs.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fipfs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9pcGZzLmdv) | `8.00000% <0.00000%> (-0.45070%)` | :arrow_down: | | [drivers/fs.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Ffs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9mcy5nbw==) | `57.77778% <0.00000%> (-1.76420%)` | :arrow_down: | | [drivers/gs.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fgs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9ncy5nbw==) | `11.06383% <0.00000%> (-0.19158%)` | :arrow_down: | | [drivers/s3.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fs3.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9zMy5nbw==) | `14.81481% <0.00000%> (-0.11852%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/livepeer/go-tools/pull/121?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/livepeer/go-tools/pull/121?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). Last update [5368fd4...2e5ed89](https://app.codecov.io/gh/livepeer/go-tools/pull/121?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer). | [Files](https://app.codecov.io/gh/livepeer/go-tools/pull/121?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer) | Coverage Δ | | |---|---|---| | [drivers/drivers.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fdrivers.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9kcml2ZXJzLmdv) | `54.05405% <ø> (ø)` | | | [drivers/local.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Flocal.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9sb2NhbC5nbw==) | `49.10180% <0.00000%> (ø)` | | | [drivers/ipfs.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fipfs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9pcGZzLmdv) | `8.00000% <0.00000%> (-0.45070%)` | :arrow_down: | | [drivers/fs.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Ffs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9mcy5nbw==) | `57.77778% <0.00000%> (-1.76420%)` | :arrow_down: | | [drivers/gs.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fgs.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9ncy5nbw==) | `11.06383% <0.00000%> (-0.19158%)` | :arrow_down: | | [drivers/s3.go](https://app.codecov.io/gh/livepeer/go-tools/pull/121?src=pr&el=tree&filepath=drivers%2Fs3.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=livepeer#diff-ZHJpdmVycy9zMy5nbw==) | `14.81481% <0.00000%> (-0.11852%)` | :arrow_down: |