Skip to content
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

.Net: Bug: Process Framework has parent-less Edges which difficult rendering the Process Graph (and will difficult proper design tooling) #9715

Open
joslat opened this issue Nov 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code processes

Comments

@joslat
Copy link
Contributor

joslat commented Nov 15, 2024

Describe the bug
Process Framework has parent-less Edges which difficult rendering the Process Graph (and will difficult proper design tooling)

Usually a Step (node) has edges to other Steps which is OK.
But, in case of a Step which is a Process (ie, composed of other steps), This Step can have an Edge to an Inner Step, which makes no sense. After a great discussion with the team, @alliscode and @esttenorio (thanks a ton for the great interaction and discussion) this is done at the moment to represent Entry Steps, where the workflow is starting on the Process Step.

This made it impossible to draw this properly and is ignored, but upon discovery it was rendered like this for reference:
Image

And if we debug the Edges of the Step which is a Process, we see it has two, the second one properly formed is the exit Edge but the first one on the Edge Key it does not have a properly formed EventId but a simple name:
Image

This comes from the entry point defined next (Thanks @esttenorio for finding it):
Image

Here is there the root process steps "links" with the internal steps of the nested process.

Which works, but we end up with a Edge from an "event" (FriedFishProcess.ProcessEvents.PrepareFriedFish) to an Internal Step.
The biggest problem here is that the Event is parentless, not associated to a Step. So, we cannot "paint" the graph to depict where does it come from.
The technical solution is to attach the Edge to the target Step, but it has no parent.

Proposal: Make all Events with a Single Parent. One Event, One Parent, point. And associate the events to that parent through an Edge. so we know where it starts and where it ends(goes). This way will enable proper tooling and accurate rendering - and the inherent graph will not try to "trick us".

To Reproduce
Steps to reproduce the behavior:
Once my PR #9705 is merged :)

  1. Configure properly the SK repository for testing ( see https://github.com/microsoft/semantic-kernel/tree/main/dotnet/samples/GettingStarted or https://github.com/microsoft/semantic-kernel/tree/main/dotnet/samples/GettingStartedWithAgents to setup and configure the secrets)
  2. Go to ProcessVisualizationExtensions, line 104 in the Process.Core project and add a breakpoint.
    Image
  3. Debug test UsePrepareFishSandwichProcessAsync
    Image
  4. Review the Edges once it goes out of the Step which is a KernelProcess, after rendering it it will go to render the Edges and then one of the Edges will be ignored due to not having a "step father" - it comes from an event so just a name is in there, so cannot be "related", rendered or tooled around. You will see something similar to this:
    Image

Expected behavior
I want all edges to happily have a father so I can draw them on the Graph and in a future, have a tool that can draw them and debug them and know where they come from and where they go.

Platform

  • OS: Windows (does not matter, not OS related)
  • IDE: VS
  • Language: C#
  • Source: main

Additional context
Add any other context about the problem here.

@joslat joslat added the bug Something isn't working label Nov 15, 2024
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Nov 15, 2024
@github-actions github-actions bot changed the title Bug: Process Framework has parent-less Edges which difficult rendering the Process Graph (and will difficult proper design tooling) .Net: Bug: Process Framework has parent-less Edges which difficult rendering the Process Graph (and will difficult proper design tooling) Nov 15, 2024
@markwallace-microsoft markwallace-microsoft moved this from Bug to Backlog in Semantic Kernel Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working .NET Issue or Pull requests regarding .NET code processes
Projects
Status: Backlog
Development

No branches or pull requests

3 participants