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

bring back grpc service #5377

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open

bring back grpc service #5377

wants to merge 44 commits into from

Conversation

rysweet
Copy link
Collaborator

@rysweet rysweet commented Feb 5, 2025

Restoring the grpc + Orleans server into the project

Why are these changes needed?

This is the distributed agent runtime for .NET that can manage routing messages amongst a fleet of grpc agent runtimes.

Related issue number

Checks

@rysweet rysweet marked this pull request as draft February 5, 2025 16:58
@rysweet rysweet changed the title Rysweet grpc service bring back grpc service Feb 5, 2025
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.08%. Comparing base (3c30d89) to head (273df31).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5377   +/-   ##
=======================================
  Coverage   78.08%   78.08%           
=======================================
  Files         158      158           
  Lines        9576     9576           
=======================================
  Hits         7477     7477           
  Misses       2099     2099           
Flag Coverage Δ
unittests 78.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rysweet rysweet marked this pull request as ready for review February 7, 2025 08:23
@rysweet rysweet requested a review from Copilot February 7, 2025 08:23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 55 out of 70 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • dotnet/AutoGen.sln: Language not supported
  • dotnet/src/Microsoft.AutoGen/AgentHost/Microsoft.AutoGen.AgentHost.csproj: Language not supported
  • dotnet/src/Microsoft.AutoGen/Agents/Microsoft.AutoGen.Agents.csproj: Language not supported
  • dotnet/src/Microsoft.AutoGen/Runtime.Grpc/Services/Grpc/GrpcGatewayService.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Runtime.Grpc/Abstractions/IAgentGrain.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/AgentHost/Program.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Core/AgentRuntimeExtensions.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Core.Grpc/GrpcAgentRuntime.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/AgentHost/Host.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Core/TypePrefixSubscriptionAttribute.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Agents/AIAgent/InferenceAgent.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Agents/protos/agent_events.proto: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Abstractions/AgentsMetadata.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Abstractions/AgentsRegistryState.cs: Evaluated as low risk
  • dotnet/src/Microsoft.AutoGen/Agents/IOAgent/ConsoleAgent/IHandleConsole.cs: Evaluated as low risk
Comments suppressed due to low confidence (3)

dotnet/src/Microsoft.AutoGen/Agents/IOAgent/FileAgent/IHandleFileIO.cs:23

  • [nitpick] Defining constants inside an interface is not a common practice. Consider moving the Route constant to a class or as part of the implementation.
const string Route = "Microsoft.AutoGen.Agents.IHandleFileIO";

dotnet/src/Microsoft.AutoGen/Agents/IOAgent/IProcessIO.cs:16

  • [nitpick] Static methods in interfaces are unusual and might not be intended. Consider removing the static modifier.
static Task ProcessOutputAsync(string message) { return Task.CompletedTask; }

dotnet/src/Microsoft.AutoGen/Agents/IOAgent/IProcessIO.cs:22

  • [nitpick] Static methods in interfaces are unusual and might not be intended. Consider removing the static modifier.
static Task<string> ProcessInputAsync(string message) { return Task.FromResult(message); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in the agents package are unrelated to the gateway change it looks like

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's where I moved the agents_events.proto which was used in the integration tests for xlang. not strictly required (could be rewritten to not use that - but its also a handy example of how to use custom protos with python).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but the agent implementations don't belong in this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already deleted my separate PR that had them because they ended up here because of deleting the .proto which has been part of the project in the top level dir for many months.

/// <param name="topic">The topic to check subscriptions for.</param>
/// <param name="eventType">The event type to check subscriptions for.</param>
/// <returns>A task representing the asynchronous operation, with the list of agent IDs as the result.</returns>
ValueTask<List<string>> GetSubscribedAndHandlingAgentsAsync(string topic, string eventType);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is an event type? This shouldnt have anything to do with subscriptions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where you and Kosta disagreed (I'm pretty sure his implementation matches what we wrote down long ago) but in the function that part is commented out for now in order to match python.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's align with Python on this one and remove the non-conforming implementation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code that runs is aligned. the event types map checks are commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants