nasa / Common-Metadata-Repository

Apache License 2.0
340 stars 94 forks source link

CMR-9741: Modify humanizer caches refresh #2073

Closed jmaeng72 closed 8 months ago

jmaeng72 commented 8 months ago

Overview

What is the feature/fix?

Changed redis connection error. If a redis connection carmine error occurs, these caches will not longer attempt to refresh the cache. It will just bubble the exception.

What is the Solution?

Try/Catch blocks to bubble up the exception. This means that if a redis connection exception occurs, the client will get a 500 server error due to the exception.

What areas of the application does this impact?

Any app that using redis cache and redis-hash-cache.

WARNING: Because this code will now throw exceptions when redis encounters connection error, the exception will bubble up to a 500 error to clients if any cache encounters the connection error.

Checklist

codecov-commenter commented 8 months ago

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 24.75%. Comparing base (41c9940) to head (9c501a0).

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

Files Patch % Lines
.../src/cmr/common_app/data/humanizer_alias_cache.clj 0.00% 1 Missing :warning:
indexer-app/src/cmr/indexer/system.clj 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2073 +/- ## =========================================== - Coverage 58.07% 24.75% -33.33% =========================================== Files 1043 1043 Lines 69749 69655 -94 Branches 1952 1029 -923 =========================================== - Hits 40508 17242 -23266 - Misses 27403 51384 +23981 + Partials 1838 1029 -809 ```

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