open-feature / flagd

A feature flag daemon with a Unix philosophy
https://openfeature.dev
Apache License 2.0
510 stars 61 forks source link

feat!: support emitting errors from the bulk evaluator #1338

Closed Kavindu-Dodan closed 3 months ago

Kavindu-Dodan commented 3 months ago

Fixes #1328

Improvement

flagd's core components are intended to be reused. This PR change theIStore interface by allowing an error to be returned from GetAll. This error is then propagated through ResolveAllValues. This change enables custom IStore implementations to return errors and propagate them through the resolver layer.

With this change, I have upgrade OFREP bulk evaluator and flagd RPC ResolveAll with error propagation.

OFREP - Log warning with resolver error and return HTTP 500 with a tracking reference RPC - Log warning with resolver error and return an error with a tracking reference

netlify[bot] commented 3 months ago

Deploy Preview for polite-licorice-3db33c canceled.

Name Link
Latest commit 966ae32f90b9d25453e694a92dbaa3818d694eb7
Latest deploy log https://app.netlify.com/sites/polite-licorice-3db33c/deploys/667da94cdac08f0008483d90
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 65.90909% with 15 lines in your changes missing coverage. Please review.

Project coverage is 78.26%. Comparing base (1c530ab) to head (c53b1e4). Report is 84 commits behind head on main.

:exclamation: Current head c53b1e4 differs from pull request most recent head 966ae32

Please upload reports for the commit 966ae32 to get more accurate results.

Files Patch % Lines
core/pkg/service/ofrep/models.go 0.00% 5 Missing :warning:
core/pkg/store/flags.go 50.00% 2 Missing and 1 partial :warning:
...lagd/pkg/service/flag-evaluation/flag_evaluator.go 25.00% 2 Missing and 1 partial :warning:
core/pkg/evaluator/json.go 80.00% 1 Missing and 1 partial :warning:
flagd/pkg/service/flag-sync/sync-multiplexer.go 33.33% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1338 +/- ## ========================================== + Coverage 73.69% 78.26% +4.57% ========================================== Files 32 36 +4 Lines 3140 2830 -310 ========================================== - Hits 2314 2215 -99 + Misses 717 476 -241 - Partials 109 139 +30 ```

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