Skip to content

Fix Bug: request_meta is not available in server.request_context #103 #108

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

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

dsp-ant
Copy link
Member

@dsp-ant dsp-ant commented Dec 21, 2024

Summary

Test plan

  • Run pytest tests/server/test_request_context.py

@dsp-ant dsp-ant changed the title Add request context tests Fix #103 Dec 21, 2024
@dsp-ant dsp-ant changed the title Fix #103 Fix Bug: request_meta is not available in server.request_context #103 Dec 21, 2024
@dsp-ant dsp-ant changed the base branch from main to v1.1.x December 21, 2024 00:38
Copy link

@phact phact left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from typo LGTM +1

Pydantic treats fields starting with underscore as private/hidden. To fix this,
we need to use Field with alias='_meta' to properly handle these fields while
keeping the external API unchanged. This fixes #103 where meta fields were not
being properly assigned in request contexts.
@dsp-ant dsp-ant merged commit e691c51 into v1.1.x Dec 21, 2024
3 checks passed
@dsp-ant dsp-ant deleted the davidsp/fix-103 branch December 21, 2024 23:17
@phact
Copy link

phact commented Dec 23, 2024

Hi folks, curious when this will hit a released version. Thanks!

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.

2 participants