GithubHelp home page GithubHelp logo

Comments (7)

sebastianburckhardt avatar sebastianburckhardt commented on June 4, 2024 1

Thanks for the quick response! Indeed a mystery. Will try to figure it out.

from durabletask-netherite.

scale-tone avatar scale-tone commented on June 4, 2024

Just putting the link to the relevant discussion on DfMon's side: microsoft/DurableFunctionsMonitor#126 (comment)

from durabletask-netherite.

sebastianburckhardt avatar sebastianburckhardt commented on June 4, 2024

Instance Ids of suborchestrations are already included as part of the List<History> returned by Netherite. Execution histories are not interpreted or modified in any way by Netherite, this is all just represented exactly like DurableTask.Core defines it.

I think the problem may be that the DFMon implementation is not using the DurableTask.Core representation of histories, which is the same for all storage providers, but a reverse engineering of the Azure Table storage format which is specific to the Azure Table Storage provider?

from durabletask-netherite.

scale-tone avatar scale-tone commented on June 4, 2024

@sebastianburckhardt , DfMon does not do any 'reverse engineering' , when bound to Netherite. For Netherite DfMon falls back to IDurableOrchestrationClient.GetStatusAsync() and renders precisely what that method returns.

Have a test Netherite-based orchestration like this:
image

Running it locally, with Azurite as a storage and an Event Hub in Azure.

Testing .GetStatusAsync() like this:

        [FunctionName("HttpStatusTest")]
        public static async Task<IActionResult> HttpStatusTest(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestMessage req,
            [DurableClient] IDurableOrchestrationClient starter,
            ILogger log)
        {
            var status = await starter.GetStatusAsync("57f8e7d45e3540ed9e83cfc0f6636812", true, true, true);
            return new ObjectResult(status);
        }

Here is the output:

{
    "name": "DurableFunctionsOrchestrationCSharp1",
    "instanceId": "57f8e7d45e3540ed9e83cfc0f6636812",
    "createdTime": "2023-08-16T15:32:11.6209051Z",
    "lastUpdatedTime": "2023-08-16T15:32:52.4618299Z",
    "input": null,
    "output": [
        "Hello Oslo!",
        "Hello Reykjavik!"
    ],
    "runtimeStatus": 1,
    "customStatus": null,
    "history": [
        {
            "EventType": "ExecutionStarted",
            "Input": null,
            "Correlation": null,
            "ScheduledStartTime": null,
            "Generation": null,
            "Timestamp": "2023-08-16T15:32:11.6209051Z",
            "FunctionName": "DurableFunctionsOrchestrationCSharp1"
        },
        {
            "EventType": "SubOrchestrationInstanceCompleted",
            "Result": [
                "Hello Tokyo Subway!",
                "Hello London Subway!"
            ],
            "Timestamp": "2023-08-16T15:32:32.2081703Z",
            "ScheduledTime": "2023-08-16T17:32:11.810787+02:00",
            "FunctionName": "SubOrchestrationCSharp1",
            "Input": null
        },
        {
            "EventType": "TaskCompleted",
            "Result": "Hello Oslo!",
            "Timestamp": "2023-08-16T15:32:42.3814044Z",
            "ScheduledTime": "2023-08-16T17:32:32.3416229+02:00",
            "FunctionName": "SayHello",
            "Input": null
        },
        {
            "EventType": "TaskCompleted",
            "Result": "Hello Reykjavik!",
            "Timestamp": "2023-08-16T15:32:52.4449048Z",
            "ScheduledTime": "2023-08-16T17:32:42.424239+02:00",
            "FunctionName": "SayHello",
            "Input": null
        },
        {
            "EventType": "ExecutionCompleted",
            "OrchestrationStatus": "Completed",
            "Result": [
                "Hello Oslo!",
                "Hello Reykjavik!"
            ],
            "FailureDetails": null,
            "Timestamp": "2023-08-16T15:32:52.4614817Z"
        }
    ]
}

You see, no child instanceId (which is supposed to be ea459c8948d74e6fb86635a48c2517a1:0) returned.
What are we missing?

from durabletask-netherite.

sebastianburckhardt avatar sebastianburckhardt commented on June 4, 2024

What seems to happen is that IDurableOrchestrationClient.GetStatusAsync is not returning the original history, but a processed version that removes some events and does some event correlation.

I was not aware that this is happening (the code that does this processing is not part of Netherite, it is in the DF extension).

Here is the code that does it:
https://github.com/Azure/azure-functions-durable-extension/blob/2455636cca50cfb4d1543633d28657437bbb5173/src/WebJobs.Extensions.DurableTask/ContextImplementations/DurableClient.cs#L850

Not sure why it does that. Seems unnecessarily complicated.

from durabletask-netherite.

StephenAstrumU avatar StephenAstrumU commented on June 4, 2024

@sebastianburckhardt does it make sense to raise an issue with the DF extension, then, if that's the root cause of this issue?

from durabletask-netherite.

sebastianburckhardt avatar sebastianburckhardt commented on June 4, 2024

Yes, I think the appropriate place to modify this would be the code I linked to above.

from durabletask-netherite.

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.