chore: Update FeatureProvider to SMP#35
Conversation
Signed-off-by: Max Pinheiro <max.pinheiro@fluxon.com>
Signed-off-by: Max Pinheiro <max.pinheiro@fluxon.com>
There was a problem hiding this comment.
Code Review
This pull request updates the open-feature-kotlin-sdk to version 0.8.0 and refactors the OfrepProvider to utilize the updated event system, including the use of EventDetails for error reporting. Corresponding unit tests have been updated to validate these event details. Feedback indicates that the provider's lifecycle management is incomplete, as the shutdown method lacks an event emission to signal the provider is no longer ready, and the class does not yet implement the StateManagingProvider interface as expected.
Signed-off-by: Max Pinheiro <max.pinheiro@fluxon.com>
ca9fcf8 to
7f8104e
Compare
|
We can close #34 in favor of this one, bc this one contains that fully, doesn't it? I've left a comment there nonetheless |
I opened this PR with the pessimistic assumption that it wouldn’t be reviewed so soon. It depends on #241, which hasn’t been merged and released yet, so I’m closing it for now and will reopen it later. |
Summary
Align kotlin-sdk-contrib with kotlin-sdk APIs:
StateManagingProviderlifecycle,getLongEvaluation, andValue.Longsupport. Intended to merge once the matching dev.openfeature:kotlin-sdk release is on Maven Central (update gradle/libs.versions.toml accordingly).Changes
EnvVarProvider/OfrepProvider: implementStateManagingProviderviaProviderStatusTracker(status,observe(), lifecycle events).getLongEvaluationon both providers; OFREPValue.toPrimitive/ValueSerializerupdated forLong.EnvVarProvider.onContextSet:ProviderReconciling→yield()→ProviderReady.OfrepProvider: lifecycle routed throughstatusTracker;shutdownemits not-readyProviderError.