java-sdk-contrib icon indicating copy to clipboard operation
java-sdk-contrib copied to clipboard

[flagd] shutting down provider should reset the state.

Open thiyagu06 opened this issue 2 years ago • 3 comments

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 avatar Aug 28 '23 13:08 thiyagu06

@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.

Kavindu-Dodan avatar Aug 29 '23 16:08 Kavindu-Dodan

Sure. I will work on this.

thiyagu06 avatar Aug 30 '23 03:08 thiyagu06

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 avatar Mar 15 '24 14:03 toddbaert

@toddbaert , I would like to contribute to this issue. Is it possible to assign it to me?

mehtasankets avatar Jun 12 '24 10:06 mehtasankets

@mehtasankets Assigned.

toddbaert avatar Jun 14 '24 14:06 toddbaert

Fixed with #832 . Thank you @mehtasankets for the contribution 👍

Kavindu-Dodan avatar Jun 21 '24 17:06 Kavindu-Dodan