-
Notifications
You must be signed in to change notification settings - Fork 200
Adding a new worker option property to opt-in the behavior to get empty entries in trigger payload #1091
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
Conversation
response.Capabilities.Add("HandlesWorkerTerminateMessage", bool.TrueString); | ||
response.Capabilities.Add("HandlesInvocationCancelMessage", bool.TrueString); | ||
|
||
if (workerOptions.IncludeEmptyEntriesInMessagePayload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the option is disabled, we just do not send the capability at all (instead of sending with False
value. Host code is not checking the value of this entry. It just checks for the existence of this capability key).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a documentation item tracking public docs updates?
public InputConverterCollection InputConverters { get; } = new InputConverterCollection(); | ||
|
||
/// <summary> | ||
/// Gets or sets a value that determines if empty entries should be included in the function trigger message payload. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have more details here to make the behavior controlled by the option clearer, perhaps also outline the current behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabiocav I tried to elaborate the scenario a bit more in the latest iteration. Could you take a look? Feel free to suggest a better version if we can improve this further. Thank you!
release_notes.md
Outdated
--> | ||
|
||
- Add new analyzer rules for the source-generated function metadata preview (#1048) | ||
- Bump gRPC dependencies to latest version (#1085) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you removing these because they're not public facing changes?
[Theory] | ||
[InlineData("IncludeEmptyEntriesInMessagePayload", true, "IncludeEmptyEntriesInMessagePayload", true, "True")] | ||
[InlineData("IncludeEmptyEntriesInMessagePayload", false, "IncludeEmptyEntriesInMessagePayload", false)] | ||
public void InitRequest_ReturnsExpectedCapabilitiesBasedOnWorkerOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - could space out the name to make easier to read "InitRequest_ReturnsExpectedCapabilities_BasedOnWorkerOptions"
bool shouldCapabilityPresent, | ||
string expectedCapabilityValue = null) | ||
{ | ||
var workerOption = new WorkerOptions(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - var name "workerOptions" ?
80bf0e7
to
9339b23
Compare
This public docs page for this type will get updated from the code comments once we merge to main. Do you think we should have a separate docs page for this property ? Let's evaluate whether we need to add details to this page. |
9339b23
to
96b8e29
Compare
/check-enforcer evaluate |
/check-enforcer reset |
…ty entries in trigger payload (#1091) * Adding a new worker option property to opt-in the behavior to get empty entries in function trigger payload * Addressing PR feedback. * renaming variable name based on PR feedback. * Rebasing on top of main. Resolved release notes conflict.
Fixes #1017
This change is part of a fix for 8499 which has details about what problem this is solving.
Adding a boolean property to WorkerOptions, using which customer can opt-in to get the behavior where empty entries in the message payload are not skipped. We made the host level changes in this PR to support this behavior.
Sample usage.
Pull request checklist
release_notes.md
Additional information
Additional PR information