Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Jan 13, 2026

BEGIN_COMMIT_OVERRIDE
chore: Add FDv2 data source interfaces.
chore: Add FDv2 polling data source.
END_COMMIT_OVERRIDE

*/
public static class Status {
private final State state;
private final DataSourceStatusProvider.ErrorInfo errorInfo;
Copy link
Member Author

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.
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member Author

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 {
Copy link
Contributor

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?

Copy link
Member Author

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,
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

@kinyoklion kinyoklion changed the title Rlamb/add fdv2 data source interfaces chore: Add FDv2 data source interfaces. Jan 14, 2026
"jackson": "2.11.2",
"launchdarklyJavaSdkCommon": "2.1.2",
"launchdarklyJavaSdkInternal": "1.5.1",
"launchdarklyJavaSdkInternal": "1.6.0",
Copy link
Member Author

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()
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants