-
Notifications
You must be signed in to change notification settings - Fork 469
Include empty entries when building InvocationRequest payload for OOP workers #8642
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
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.
This is a new capability and none of the worker are sending it now. We will start with dotnet worker and then share the info with other language workers so that they can also opt in for this 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.
Are you saying that if we simply updated the ToRpcStringArray method to correctly add nulls with full fidelity, existing workers won't be able to handle that? Can you link to the corresponding worker code showing where the null-ref occurs?
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 saying that if we simply updated the ToRpcStringArray method to correctly add nulls with full fidelity, existing workers won't be able to handle that? Can you link to the corresponding worker code showing where the null-ref occurs?
No. I did not mean that. The fix is correcting the current incorrect behavior/bug. So probably do not need to be considered as a breaking change or so. I will remove the capability check.
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.
Latest iteration has this capability check removed.
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.
So we'll now send along empty entries, but still skip nulls. For empty entries, are we sure workers handle this w/o breaking changes? Probably need to verify with some testing for the triggers supporting cardinality many (EventHubs, ServiceBus Batches).
This will address the linked issue (empty strings) but what about nulls? Is it possible for the triggers to send nulls here? If so, in those cases, we'll have the same issue.
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.
Is it really that this cannot be null? We are using Microsoft.Azure.Devices.Client.Message
without a body (there is only constructor where you don't need to specify a body). We only set properties and a messageId on this Message. That IoTHub message is then routed to this eventhub. Is the default body of an IoT Hub message string.Empty
?
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.
Language worker testing is currently blocked due to this issue on python. Tested JS, TS and Dotnetworker and they look good.
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.
Historically, any behavior change like this is based on capability advertisement. That’s the safest way if you want to expedite the fix. If you don’t want to introduce a capability, thorough testing of all language workers will be required, and that wouldn’t cover external ones other teams may be maintaining.
is there a concern about the new capability?
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.
Brought back the capability check based on offline sync. Thank you!
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.
We are now testing this bugfix in our azure function but it looks like we are still hitting this issue. Nobody also replied to my comment above...
Is it really that this cannot be null? We are using
Microsoft.Azure.Devices.Client.Message
without a body (there is only constructor where you don't need to specify a body). We only set properties and a messageId on this Message. That IoTHub message is then routed to this eventhub. Is the default body of an IoT Hub messagestring.Empty
?
It looks like our payload was just null and this bugfix is only helping when you are sending string.Empty. Which Microsoft.Azure.Devices.Client.Message
doesn't do by default.
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 - name seems a little disjointed? Is "Rpc collection" a single concept? (e.g. would "ToRpcCollection_String_IncludeEmptyEntriesForTypedDataCollection" make sense?)
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.
ToRpc is the method name and other tests are using this format. So I will keep it as it is for consistency.
… OOP workers based on a new worker capability we are introducing "IncludeEmptyEntriesInMessagePayload"
This reverts commit 52303be4
88387f0
to
be1546a
Compare
Fixes #8499
The current behavior is to skip entries which are null or empty. This causes issues like this. So we decided to introduce a new capability called
IncludeEmptyEntriesInMessagePayload
which language workers can advertise and if it is present, we will include the empty entries (empty, not null) in the array we create for the message payload.Pull request checklist
release_notes.md
Additional information
Additional PR information
Please refer #8499 which has details about the current behavior and problems caused by that.