Skip to content

fix: Ignore FDv2 objects with unrecognized kinds - #541

Open
kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-3339/fdv2-ignore-unknown-kinds
Open

kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-3339/fdv2-ignore-unknown-kinds

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

FDv2 SDKs must silently ignore objects of kinds they do not support, so new kinds can be added to payloads without breaking existing SDKs. PutObject.from_dict and DeleteObject.from_dict converted kind with ObjectKind(kind), which raises for anything other than flag or segment: streaming treated the event as malformed and restarted the stream, and polling failed the whole payload. The streaming and polling parsers now skip put-object and delete-object events with an unsupported kind (debug log) before parsing them. A missing kind is still malformed, and known kinds are unchanged. The async data sources share these parsers.

Tests

test_ignores_objects_with_unknown_kinds in the streaming synchronizer and polling payload parsing tests mixes unknown-kind puts and deletes with known objects and checks the payload completes with only the known changes (both failed before the change). Full suite 1772 passed / 367 skipped; mypy, isort, pycodestyle clean.

SDK-3339


Note

Overview
FDv2 polling and streaming now ignore put-object and delete-object events whose kind is not in this SDK’s supported set, instead of treating them as malformed data.

Previously, PutObject.from_dict / DeleteObject.from_dict called ObjectKind(kind), which raised on future kinds—polling could fail the entire payload and streaming could error and restart. A shared has_unsupported_kind helper in protocolv2 gates parsing; unsupported events are skipped with a debug log while known flag / segment handling is unchanged. Payloads with a missing kind still fail validation.

Tests cover mixed unknown and known kinds for both polling payload parsing and the streaming synchronizer.

Reviewed by Cursor Bugbot for commit fe487e5. Bugbot is set up for automated code reviews on this repo. Configure here.

put-object and delete-object events whose kind the SDK does not support are now dropped before the object is parsed, in both the streaming and polling FDv2 data sources. Previously the strict ObjectKind conversion raised, which interrupted the stream or discarded the whole polling payload. Known objects in the same payload are still applied.
@kinyoklion
kinyoklion marked this pull request as ready for review October 19, 2026 22:52
@kinyoklion
kinyoklion requested a review from a team as a code owner October 19, 2026 22:52
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