Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flagd] shutting down provider should reset the state. #410

Closed
thiyagu06 opened this issue Aug 28, 2023 · 6 comments
Closed

[flagd] shutting down provider should reset the state. #410

thiyagu06 opened this issue Aug 28, 2023 · 6 comments
Assignees
Labels
contribfest A good issue for Contribfest KubeCon EU '24 enhancement New feature or request good first issue Good for newcomers

Comments

@thiyagu06
Copy link
Member

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.

@Kavindu-Dodan Kavindu-Dodan changed the title [flad] shutting down provider should reset the state. [flagd] shutting down provider should reset the state. Aug 29, 2023
@Kavindu-Dodan
Copy link
Collaborator

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

Footnotes

  1. https://github.com/open-feature/spec/blob/main/specification/sections/02-providers.md#25-shutdown

  2. https://github.com/open-feature/java-sdk-contrib/blob/main/providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java#L54-L60

@Kavindu-Dodan Kavindu-Dodan added enhancement New feature or request good first issue Good for newcomers labels Aug 29, 2023
@thiyagu06
Copy link
Member Author

Sure. I will work on this.

@toddbaert toddbaert added the contribfest A good issue for Contribfest KubeCon EU '24 label Mar 15, 2024
@toddbaert
Copy link
Member

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.

DBlanchard88 pushed a commit to DBlanchard88/java-sdk-contrib that referenced this issue Apr 29, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@mehtasankets
Copy link
Contributor

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

@toddbaert
Copy link
Member

@mehtasankets Assigned.

mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 18, 2024
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 18, 2024
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 18, 2024
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 18, 2024
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 18, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 19, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 19, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 19, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 19, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
Kavindu-Dodan pushed a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 19, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
mehtasankets added a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 20, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
Kavindu-Dodan pushed a commit to mehtasankets/java-sdk-contrib that referenced this issue Jun 20, 2024
…re#410)

Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
Kavindu-Dodan pushed a commit that referenced this issue Jun 20, 2024
Signed-off-by: Sanket Mehta <mehtasankets@gmail.com>
@Kavindu-Dodan
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribfest A good issue for Contribfest KubeCon EU '24 enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants