-
Notifications
You must be signed in to change notification settings - Fork 11
chore: Add FDv2 data source interfaces. #100
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
base: main
Are you sure you want to change the base?
Conversation
| */ | ||
| public static class Status { | ||
| private final State state; | ||
| private final DataSourceStatusProvider.ErrorInfo errorInfo; |
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 don't particularly care for this type, but also we may not want what is effectively a duplicate.
| public class FDv2SourceResult { | ||
| public enum State { | ||
| /** | ||
| * The data source has encountered an interruption and will attempt to reconnect. |
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.
Initializers emit interrupted but don't attempt to reconnect.
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.
Yeah, emitting interrupted doesn't necessarily make sense for an initializer. I had a comment here that it meant the same thing for initializers as SHUTDOWN. But maybe we should just say not to emit it.
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'll extend the comment.
| * an FDv2 synchronizer produces a stream of results. | ||
| */ | ||
| public class FDv2SourceResult { | ||
| public enum State { |
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.
Do you want running in this enum?
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 I shouldn't call it State. Its more like a notification of change, and it doesn't represents valid/running because that is handled by a changeset.
| /** | ||
| * The data source has been instructed to disconnect and will not produce any further results. | ||
| */ | ||
| GOODBYE, |
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.
The current description of GOODBYE and SHUTDOWN leaves room for me to think GOODBYE -> SHUTDOWN could be a thing.
I see the diagrams in the specific ones down below that shows that is not possible, but the enum details make it look like it could be?
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.
GOODBYE is effectively a more specific shutdown. We didn't handle it in .Net because SDKs generally don't seem to have handled it yet, but it also is really hard to handle with data source updates.
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.
Basically in .Net we had an overload broad OFF and it is hard to get the correct behavior because there were are really 2-3 different meanings. Overall we don't need to emit any data source status in most situations for something being shutdown or something being told to exit by flag delivery (but we may handle them different, I am still unsure how to handle goodbye).
SHUTDOWN means I asked the thing to shutdown.
GOODBYE means that FD or some external source asked it to disconnect. Having it different means we can decide to do something different. (I think just by entering this situation we handle most of the problems, because we can be like, cool we aren't running anymore, I don't care about this disconnect I just got from the event source.)
TERMINAL_ERROR means something has gone wrong.
| "jackson": "2.11.2", | ||
| "launchdarklyJavaSdkCommon": "2.1.2", | ||
| "launchdarklyJavaSdkInternal": "1.5.1", | ||
| "launchdarklyJavaSdkInternal": "1.6.0", |
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.
May be good to put this in another PR, but I have it here for now.
| buildscript { | ||
| repositories { | ||
| mavenCentral() | ||
| mavenLocal() |
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.
Sometimes we have it this way and sometimes we don't. I am not completely sure if either is actually ideal.
BEGIN_COMMIT_OVERRIDE
chore: Add FDv2 data source interfaces.
chore: Add FDv2 polling data source.
END_COMMIT_OVERRIDE