-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: Improve wait logic to a more elegant solution #1160 #1169
base: main
Are you sure you want to change the base?
feat: Improve wait logic to a more elegant solution #1160 #1169
Conversation
Signed-off-by: christian.lutnik <[email protected]>
…ant-solution-open-feature#1160 # Conflicts: # providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java # providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/resolver/process/InProcessResolver.java # providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/resolver/process/InProcessResolverTest.java
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
* for sync blocks. | ||
*/ | ||
@Getter | ||
public class EventsLock { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this class out of the FlagdProvider
to ensure no private fields are accessed and to keep the size of the file down.
However, I feel like the name is not approrpaite anymore, so please feel free to suggest a better one. Also, this new class is strongly coupled to the FlagdProvider
, if you have any suggestions to make it cleaner please let me know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe FlagdProviderSyncState
or similar could be an appropriate name - or just SyncState
or SyncResource
- but to be fair, i am also not hundred percent happy with my suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you - i just added some questions and suggestions, nothing crucial except the one about where we are doing this wait and notify
providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java
Outdated
Show resolved
Hide resolved
providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/FlagdProviderTest.java
Outdated
Show resolved
Hide resolved
providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/EventsLock.java
Outdated
Show resolved
Hide resolved
* for sync blocks. | ||
*/ | ||
@Getter | ||
public class EventsLock { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe FlagdProviderSyncState
or similar could be an appropriate name - or just SyncState
or SyncResource
- but to be fair, i am also not hundred percent happy with my suggestions
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
…re#1160 Signed-off-by: christian.lutnik <[email protected]>
|
…open-feature#1160 # Conflicts: # providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java
Signed-off-by: christian.lutnik <[email protected]>
providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/ConfigCucumberTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: christian.lutnik <[email protected]>
Signed-off-by: christian.lutnik <[email protected]>
Signed-off-by: christian.lutnik <[email protected]>
...ers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/steps/ProviderSteps.java
Show resolved
Hide resolved
Signed-off-by: christian.lutnik <[email protected]>
Signed-off-by: christian.lutnik <[email protected]>
…open-feature#1160 # Conflicts: # providers/flagd/src/main/java/dev/openfeature/contrib/providers/flagd/FlagdProvider.java # providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/steps/EventSteps.java
Signed-off-by: christian.lutnik <[email protected]>
This PR
Adds a better wait logic to wait for the initialization of the
FlagdProvider
.With these changes, it is not advisable to restart a
FlagdProvider
once it has been shut down.Related Issues
Fixes #1160