Repository navigation
fix: Ignore FDv2 objects with unrecognized kinds - #541
Draft
kinyoklion wants to merge 1 commit into
Draft
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_dictandDeleteObject.from_dictconvertedkindwithObjectKind(kind), which raises for anything other thanflagorsegment: 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 missingkindis still malformed, and known kinds are unchanged. The async data sources share these parsers.Tests
test_ignores_objects_with_unknown_kindsin 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