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] Add happy path test for in-memory agent && Simplify HelloAgent example && some clean-up in extension APIs #4227

Merged
merged 12 commits into from
Nov 18, 2024

Conversation

LittleLittleCloud
Copy link
Collaborator

@LittleLittleCloud LittleLittleCloud commented Nov 15, 2024

Why are these changes needed?

This PR does the following work

  • Add happy-path test for in-memory use case
  • Improve the existing extension APIs (essentially replacing WebApplicationBuilder -> IHostApplicationBuilder)

Related issue number

Checks

@LittleLittleCloud LittleLittleCloud changed the title [.NET] Add happy path test for in-memory agent && some clean-up in extension APIs [.NET] Add happy path test for in-memory agent && Simplify HelloAgent example && some clean-up in extension APIs Nov 15, 2024
Copy link
Collaborator

@rysweet rysweet left a comment

Choose a reason for hiding this comment

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

I like this. did you try this with grpc as well to make sure it still works? it conflicts with some changes Reuben was proposing that used the .Web SDK instead of .SDK. the changes to HelloAgents I am less thrilled about mainly because I liked how the previous version did everything in one shot. maybe we could have both?

I haven't had time to try and run this yet and make sure it still also works with gprc. If you have done that let me know and I'll go ahead and merge.

@LittleLittleCloud
Copy link
Collaborator Author

LittleLittleCloud commented Nov 16, 2024

Did you try this with grpc as well to make sure it still works?

What this PR does shouldn't affect the behavior of w/ grpc so I think it should still work. I can verify the case If you point me to a grpc example to try.

the changes to HelloAgents I am less thrilled about mainly because I liked how the previous version did everything in one shot. maybe we could have both?

It indeed have both. The AgentApp.StartAsync API should still work.

@rysweet rysweet merged commit ad271d9 into main Nov 18, 2024
42 checks passed
@rysweet rysweet deleted the u/updateAPI branch November 18, 2024 21:32
rysweet pushed a commit that referenced this pull request Nov 18, 2024
… example && some clean-up in extension APIs (#4227)

* add happy path test

* remove unnecessary namespace

* fix build error

* Update AgentBaseTests.cs

* revert changes

---------
rysweet added a commit that referenced this pull request Nov 19, 2024
* add subscription response

* fix send subscription response

* add register agent type response

* adding a test

* working on shaping up a test

* appsettins update for backend

* another appsettings

* fixup aspire hosting

* enable AGENT_HOST var from aspire

* add SendMessageAsync

* remove broken test

* test compiles and runs but is not (yet) correct

* subscriptions grain wireup.

* temp assert true.

* remove DI for SubscriptionGrain

* add xlang python code

* add subscription response

* rebond

* Update to .NET 9.0

* Fix Backend project SDK

* Package updates

* get RegisterAgentTypeRequest working

* fix exceptions

* add error handling for requests

* whoops

* send cloud event message type

* processing cloudevents

* trying tosend proto data - doesn't work

* trying to pack proto_data

* fix (#4238)

* pack the Message from agents_events

* format - not sure why these?

* format

* cleanup, error handling, xlang sample publishes messages that can be heard by .NET and vice versa

* format

* sdk version

* sdk vers

* net8

* back to net8

* remove netstandard2

* fix used

* remove unused

* more cleanup

* remove unneeded package

* I'm terrible at writing tests

* deserialize the cloud events and sent them as events

* comment

* cleanup

* await

* Delete dotnet/samples/Hello/Backend/Backend.csproj

unneeded change

* whoops

* merge main python back into here

* revert back to local

* revert some of the helloAgents changes.

* [.NET] Add happy path test for in-memory agent && Simplify HelloAgent example && some clean-up in extension APIs (#4227)

* add happy path test

* remove unnecessary namespace

* fix build error

* Update AgentBaseTests.cs

* revert changes

---------

* fix busted merge from main

* addressing review comments

* make internal

* case sensitive rename step 1

* case sensitive rename step 2

* remove!

---------

Co-authored-by: Peter Chang <[email protected]>
Co-authored-by: Reuben Bond <[email protected]>
Co-authored-by: Eric Zhu <[email protected]>
Co-authored-by: Xiaoyun Zhang <[email protected]>
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.

2 participants