-
Notifications
You must be signed in to change notification settings - Fork 272
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
Input and state lost when one entity call another with SignalEntity on .NET 8 isolated #2690
Comments
I found that // TaskEntityDispatcher
void SendSignalMessage(WorkItemEffects effects, SchedulerState schedulerState, SendSignalOperationAction action)
{
OrchestrationInstance destination = new OrchestrationInstance()
{
InstanceId = action.InstanceId
};
RequestMessage message = new RequestMessage()
{
ParentInstanceId = effects.InstanceId,
ParentExecutionId = null, // for entities, message sorter persists across executions
Id = Guid.NewGuid(),
IsSignal = true,
Operation = action.Name,
ScheduledTime = action.ScheduledTime,
};
string eventName;
if (action.ScheduledTime.HasValue)
{
DateTime original = action.ScheduledTime.Value;
DateTime capped = this.entityBackendProperties.GetCappedScheduledTime(DateTime.UtcNow, original);
eventName = EntityMessageEventNames.ScheduledRequestMessageEventName(capped);
}
else
{
eventName = EntityMessageEventNames.RequestMessageEventName;
schedulerState.MessageSorter.LabelOutgoingMessage(message, action.InstanceId, DateTime.UtcNow, this.entityBackendProperties.EntityMessageReorderWindow);
}
this.ProcessSendEventMessage(effects, destination, eventName, message);
} |
Hi @thomaseyde, I logged the issue #2693 and I am experiencing with the latest package 1.1.0 and .NET isolated. Cheers, |
Thanks for reporting this. Your analysis looks right to me - obviously the input should be passed along. I will create a PR with a fix. |
BTW, I did not understand the part about the lost state:
How would the calling entity set the state on the called entity before calling signal? |
I am sure I tried to set the state on the target entity from the calling entity as a workaround, but I forgot to take notes. Now I can't figure out how I did it. |
Closing because fixed in Azure/durabletask#1016 |
Description
When you call an entity from another entity with
operation.Context.SignalEntity()
, data for input and state are both lost. State is lost if the calling entity try to set the state on the called entity before callingoperation.Context.SignalEntity()
.Input passed with
client.Entities.SignalEntityAsync()
from a function trigger works as expected.Expected behavior
State should be kept. Input should be passed.
Actual behavior
Input as retrieved with
operation.GetInput<T>()
is null.Relevant source code snippets
Create a new function app on .NET 8 with isolated worker.
Add a trigger:
Add two functions:
Create a queue
bug
and add a message containingone
to it.Set breakpoints on calls to
GetInput()
.Debug the function app.
Functions receiving a call from the trigger will have input. Functions with calls from an entity does not.
Known workarounds
No workarounds found.
App Details
host.json
)The text was updated successfully, but these errors were encountered: