GithubHelp home page GithubHelp logo

EntityTrigger does not get triggered in version of Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.3 about durabletask-dotnet HOT 13 CLOSED

netsharpdev avatar netsharpdev commented on September 25, 2024 2
EntityTrigger does not get triggered in version of Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.3

from durabletask-dotnet.

Comments (13)

th3ragex avatar th3ragex commented on September 25, 2024 1

Could this also cause my locks to never be entered anymore? Worked with 1.1.2 .

var entityLock = new EntityInstanceId("SomeLock", somekey);
await using (await context.Entities.LockEntitiesAsync(entityLock))
{
...
}

from durabletask-dotnet.

nicolaor avatar nicolaor commented on September 25, 2024 1

@davidmrdavid

I'm also facing the same issue.
Another way to reproduce it, would be to take the sample project in this repo "AzureFunctionsApp" and add the following lines to the "Greetings" function as below:

image

Here the relevant code for easy copy paste:

ILogger logger = context.CreateReplaySafeLogger("LogCategory");

var entityId = new EntityInstanceId(nameof(Counter), "MyCounter1");
await context.Entities.CallEntityAsync(entityId, nameof(Counter.Add), 1);

int count = await context.Entities.CallEntityAsync<int>(entityId, nameof(Counter.Get));

logger.LogInformation("Current count: {count}", count);

This is the exception I get after updating to 1.1.3

[2024-05-27T06:09:08.898Z] TaskEntityDispatcher-77616bd5b75544688820d8e5bd31621d-0: Unhandled exception with work item '@counter@MyCounter1': DurableTask.Core.Exceptions.EntitySchedulerException: The entity with instanceId '@counter@MyCounter1' received an unexpected event type of type 'OrchestratorStarted'. This is not a valid entity message. This is a framework-internal error, please report this issue in the GitHub repo: 'https://github.com/Azure/durabletask/'
[2024-05-27T06:09:08.906Z]    at DurableTask.Core.TaskEntityDispatcher.DetermineWork(OrchestrationRuntimeState runtimeState, SchedulerState& schedulerState, Work& batch) in /_/src/DurableTask.Core/TaskEntityDispatcher.cs:line 568
[2024-05-27T06:09:08.909Z]    at DurableTask.Core.TaskEntityDispatcher.OnProcessWorkItemAsync(TaskOrchestrationWorkItem workItem) in /_/src/DurableTask.Core/TaskEntityDispatcher.cs:line 241
[2024-05-27T06:09:08.913Z]    at DurableTask.Core.TaskEntityDispatcher.OnProcessWorkItemAsync(TaskOrchestrationWorkItem workItem)
[2024-05-27T06:09:08.921Z]    at DurableTask.Core.TaskEntityDispatcher.OnProcessWorkItemSessionAsync(TaskOrchestrationWorkItem workItem) in /_/src/DurableTask.Core/TaskEntityDispatcher.cs:line 122
[2024-05-27T06:09:08.922Z]    at DurableTask.Core.WorkItemDispatcher`1.ProcessWorkItemAsync(WorkItemDispatcherContext context, Object workItemObj) in /_/src/DurableTask.Core/WorkItemDispatcher.cs:line 373
[2024-05-27T06:09:08.924Z]
[2024-05-27T06:09:08.924Z] Backing off for 10 seconds until 5 successful operations
[2024-05-27T06:09:08.925Z] DurableTask.Core: The entity with instanceId '@counter@MyCounter1' received an unexpected event type of type 'OrchestratorStarted'. This is not a valid entity message. This is a framework-internal error, please report this issue in the GitHub repo: 'https://github.com/Azure/durabletask/'.

from durabletask-dotnet.

davidmrdavid avatar davidmrdavid commented on September 25, 2024 1

We just made a hotfix release: https://github.com/microsoft/durabletask-dotnet/releases/tag/v1.2.4. Is this issue persisting for you all with this release?

cc/ @nytian

from durabletask-dotnet.

epDugas avatar epDugas commented on September 25, 2024 1

We just made a hotfix release: https://github.com/microsoft/durabletask-dotnet/releases/tag/v1.2.4. Is this issue persisting for you all with this release?

cc/ @nytian

@davidmrdavid
Confirmed resolved for me.

from durabletask-dotnet.

davidmrdavid avatar davidmrdavid commented on September 25, 2024

@netsharpdev, @th3ragex: do y'all have minimal repros you could share?
@netsharpdev: I looked at your repro but it seemed a bit complex, so I'm curious if there's a more minimal version of it that demonstrates the problem. I'm not able to reproduce this with a "hello world"-level entity app

from durabletask-dotnet.

th3ragex avatar th3ragex commented on September 25, 2024

@davidmrdavid Sure, minimal repo with LockEntitiesAsync demo: https://github.com/th3ragex/durabletask-dotnet-bug-315 (Currently with 1.1.2 which works, after update to 1.1.3 and a proper rebuild it's stuck)

from durabletask-dotnet.

davidmrdavid avatar davidmrdavid commented on September 25, 2024

@th3ragex: Thanks. Strangely, your repro worked for me again after upgrade to 1.1.3. It could be something on my machine though - so let me try to engage some other crew members. @bachuv does the repro linked above, after changing the .NET isolated extension to 1.1.3, work for you, or does it get stuck?

from durabletask-dotnet.

bachuv avatar bachuv commented on September 25, 2024

@davidmrdavid, I tried the repro and it also worked for me after upgrading the .NET isolated extension version to 1.1.3.

from durabletask-dotnet.

davidmrdavid avatar davidmrdavid commented on September 25, 2024

Thanks for confirming. @th3ragex: When using 1.1.3 and a brand new taskhub name, does it still fail for you? Since it works for @bachuv and myself, I wonder if the reason for your lock's "stuckness" is that there's some actual deadlock in your storage account, not sure. A brand new task hub should help validate that theory.

from durabletask-dotnet.

th3ragex avatar th3ragex commented on September 25, 2024

@davidmrdavid thank for taking your time and testing

When using 1.1.3 and a brand new taskhub name, does it still fail for you?

yes, I have also tested with azurite local storage and a gen2 azure storage with new task hub names. I am testing locally with the VS debugger attached, didn't try how it behaves as deployed azure function. I have also updated my machine to the latest azure function host and VS version.

After playing with my sample code a bit I discovered that building the function after upgrading to the new nuget version occasionally didn't use the new assembly version. I have changed my code to return the loaded assembly version to make it clear.

Sorry to bother you, could you please update and try my repo again and double check that your test run actually used 1.1.3?

from durabletask-dotnet.

nicolaor avatar nicolaor commented on September 25, 2024

@davidmrdavid works for me too, thanks!

from durabletask-dotnet.

th3ragex avatar th3ragex commented on September 25, 2024

@davidmrdavid locking works now. Thank you!

from durabletask-dotnet.

bachuv avatar bachuv commented on September 25, 2024

Closing this issue as it is resolved in hotfix release durabletask-dotnet v1.2.4.

from durabletask-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.