Repository navigation
Keep whole-number Double values in typed search attributes - #1957
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
What was changed
decode_typed_search_attributes()converts anintvalue tofloatwhen the key is aDoublesearch attribute. Adds a unit test intests/test_converter.pyand a changelog fragment.Why?
The visibility API returns a whole-number
Doublesuch as5.0as the JSON integer5. The decoder read it asint, failed theisinstance(val, float)check and dropped the pair without an error, solist_workflows()results were missing the attribute fromtyped_search_attributes.describe()was not affected because it returns the payload the client sent.The conversion only applies to
Doublekeys and only to exactintvalues, sobooland every other type keep their current handling.Checklist
Closes [Bug] Whole-number
Doublesearch attributes are missing fromlist_workflows()typed search attributes #1956How was this tested:
test_decode_typed_search_attributes_whole_number_doubledecodes aDoublepayload with data5. Without the source change it fails withassert None == 5.0. With the change it passes, and all 41 tests intests/test_converter.pypass.Doublesearch attribute of5.0now shows5.0inlist_workflows()typed search attributes instead ofNone.ruff check --select I,ruff format --check,pyright,basedpyrightandmypypass on the changed file.Any docs updates needed?
No.