Skip to content

feat: Add FDv2 payload handling to the data source event handler#305

Draft
kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-2186/fdv2-handle-payload
Draft

feat: Add FDv2 payload handling to the data source event handler#305
kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-2186/fdv2-handle-payload

Conversation

@kinyoklion

Copy link
Copy Markdown
Member

What this adds

DataSourceEventHandler.handlePayload: the entry point the FDv2 data pipeline (a later PR) calls when a payload completes. Nothing produces payloads for the event handler yet, so behavior is unchanged.

The method maps the payload's updates to item descriptors with the flag-eval mapper, applies them through FlagManager.applyChanges (full replaces, partial applies, none takes no action), and marks the data source valid — a payload of any type, including none, confirms the connection is delivering current data. Unparseable flag data is classified as an invalidData error and reported through the status manager, mirroring how the FDv1 message verbs handle bad payloads; the in-progress payload is discarded.

Testing

New tests cover all three transfer types end to end through the event handler (full replaces the stored flags and applies the environment ID, partial applies updates without per-item version comparison, none changes no data), the valid status transition, and invalid flag data producing an invalidData error with MessageStatus.invalidMessage.

SDK-2186

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.

1 participant