Skip to content

fix: Ignore FDv2 objects with unrecognized kinds - #541

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

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

Conversation

@kinyoklion

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

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.
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