java-sdk-contrib
java-sdk-contrib copied to clipboard
[flagd] shutting down provider should reset the state.
https://github.com/open-feature/java-sdk-contrib/blob/main/providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java#L56
It's not always guaranteed that FeatureProvider.shutdown() method is called at the end of application lifecycle. The user can call the shutdown method at any point in time of application lifetime. So it's better to reset the state. may be NOT_READY or new state and publish the event with the new state.
@thiyagu06 I also see a potential improvement here. Though the spec ^1 doesn't enforce a state change requirement after a shutdown, we can set the status to NOT_READY after executing the shutdown logic ^2.
Feel free to open up a contribution PR on this.
Sure. I will work on this.
Hey @thiyagu06 I'm going to unassign this from you for now, since we have an event coming up and KubeCon and it might be a good issue for people to take on. However, if you intend on completing it soon, let me know I will reassign to you.
@toddbaert , I would like to contribute to this issue. Is it possible to assign it to me?
@mehtasankets Assigned.
Fixed with #832 . Thank you @mehtasankets for the contribution 👍