-
Notifications
You must be signed in to change notification settings - Fork 5
Fix issue where span creation was not allowing List[Any] #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This change is primarily to fix an issue where if you try to create a trace span using a List instead of a dictionary or BaseModel it errored out even though the upper function signature specified that List[Any] is allowed. To be able to verify this with built in tests I had to update the requirements * .lock files and then the uv.lock file also got updated. This all resulted in no longer needing or being required to limit the nox session to pydantic 1.x and it was failing because the code wants pydantic 2 so i removed the pydantic 1.x requirement from the nox file.
potentially a better solution would be to change the top level tracing so it is an honest type check |
…not allowing List[Any] This flips the fix on it's head and instead of allowing List[Any] goes the other way and requires that a list be a List[Dict[str, Any]] which is what the deeper SPAN object actually wants. I noticed that the `data` parameter suffers the same lack of type consistency that the `input` parameter had where the SPAN object actually specifies only dicts and lists of dicts are accepted, but upper level functions allow list[Any] so I normalized those as well.
|
I reversed the fix so that it goes the other way: requires List[Dict[str, Any]] all the way up the chain. Also noticed that the same inconsistency exists for the |
…ce_span # Conflicts: # uv.lock
This change is primarily to fix an issue where if you try to create a trace span using a List instead of a dictionary or BaseModel it errored out even though the upper function signature specified that List[Any] is allowed.
To be able to verify this with built in tests I had to update the requirements * .lock files and then the uv.lock file also got updated.
This all resulted in no longer needing or being required to limit the nox session to pydantic 1.x and it was failing because the code wants pydantic 2 so i removed the pydantic 1.x requirement from the nox file.