Skip to content
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

Return none for Getter if key does not exist #1449

Merged
merged 9 commits into from Dec 8, 2020

Conversation

lzchen
Copy link
Contributor

@lzchen lzchen commented Dec 4, 2020

Fixes #1274

@lzchen lzchen requested a review from a team as a code owner December 4, 2020 16:56
@lzchen lzchen requested review from codeboten and hectorhdzg and removed request for a team December 4, 2020 16:56
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

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

LGTM

) -> typing.Optional[typing.List[str]]:
val = carrier.get(key, None)
if val is None:
return None
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this tested anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Just a question around testing, otherwise this looks pretty good.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Nice!

@lzchen lzchen merged commit 780a782 into open-telemetry:master Dec 8, 2020
@lzchen lzchen deleted the prop branch December 8, 2020 15:02
codeboten pushed a commit to codeboten/opentelemetry-python that referenced this pull request Dec 8, 2020
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.

"GET" function in propagators should return None if nothing is found
3 participants