Add RawInput to workaround double-serialization issue#966
Merged
jviau merged 1 commit intoAzure:mainfrom Sep 19, 2023
Merged
Conversation
davidmrdavid
approved these changes
Sep 18, 2023
Collaborator
davidmrdavid
left a comment
There was a problem hiding this comment.
This makes sense to me. Tagging @cgillum for a final approval
cgillum
approved these changes
Sep 19, 2023
Member
cgillum
left a comment
There was a problem hiding this comment.
LGTM - I assume part of the reason why we're marking this [Obsolete] is because it's not really a fully fleshed-out feature (can't use RawValue in any other contexts currently)?
Collaborator
Author
Essentially - it is used to raise a flag to customers that while this type is public, we don't want them to use it. So, every usage of it comes with a pseudo "I agree" via suppressing the warning. |
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.
This PR is to address a conflicting need in Durable Functions extension. We want to use
TaskHubClientfrom withinLocalGrpcListenerso that we leverage all the logic there, especially the distributed tracing work. However, our input is already serialized andTaskHubClientwould double serialize it. To work around this an "internal" API calledRawInputhas been added. When this type is used as the input forTaskHubClient, we will directly useRawInput.Valueinstead of serializing the input.RawInputis "internal" in the sense that it ispublic, but in an.Internalnamespace, with an[Obsolete]attribute, and xmldoc advising customers to use the type at their own risk. This is a pattern used in a few .NET libraries (efcore, webjobs, functions worker, etc) to address the internal-yet-public functionality.