Python(fix): handle pytest plugin empty updates - #809
Merged
Merged
Conversation
Move caller_stacklevel out of the public errors module. mkdocs publishes non-underscore names from there, and a stack-walking utility is not an error type; it now sits beside the other generic helpers in _internal/util. Add SiftIgnoredInputWarning so filterwarnings can target an unknown model field and a no-op update without promoting every other Sift warning. Stop fabricating an entity when a live no-op update has nothing to return. _skip_empty_update now hands back a simulated response only on the log and simulate paths, and raises otherwise. The fabricated entity carried _simulated=True, which the pytest plugin reads to resolve the report link, so a caller passing an ID string could not tell it from a real read. Return from the unknown-key validator before sorting the field names, so the path where every key is known does no extra work.
Contributor
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-809/ Deployed from |
alexluck-sift
marked this pull request as ready for review
October 1, 2026 00:24
alexluck-sift
added this pull request to stack #811
October 1, 2026 00:40
ian-sift
approved these changes
Oct 1, 2026
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
A test-results log could contain an update that named no fields, which the API rejects. The client logged it without complaint, and because the import cursor only advances past an entry that succeeded, every retry stopped at the same entry and the rest of the log never reached Sift.
Empty update masks
SiftIgnoredInputWarning, or aValueErrorwhen a live call has no entity to return.import-test-result-log. The log format does not change.Unknown model fields
SiftIgnoredInputWarningexists so a caller who wants the stricter behavior can promote these two cases throughfilterwarningswithout also promoting unrelated Sift warnings.Verification