Skip to content

Conversation

@WhitWaldo
Copy link
Contributor

@WhitWaldo WhitWaldo commented Oct 14, 2024

Description

The Dapr .NET SDK takes different approaches to registering each of the various SDKs that all defer to a shared type, DaprDefaults to procure the HTTP, gRPC and API token values from the environment variables and form the various endpoints.

However, for reasons mentioned in the originating issue at #1338 I think it would be better for the SDK to prioritize pulling the value from an IConfiguration so users have the option to assign prefixes to the various default Dapr environment variable names or pull them from alternative sources. This PR seeks to do that on both the Client and Workflow SDKs. After 1.14 is released, I'll augment the Jobs PR to utilize the same approach and increasingly phase out use of the DaprDefaults.

This PR attempts to retrieve the gRPC endpoint value, the HTTP endpoint value and the API token value from the IConfiguration instance first, if any, then fails over to attempt a retrieval from the environment variable directly, then applies a default value.

This PR replaces #1339 because of a bad DCO commit in the middle.

Client SDK

Nothing particularly notable here. Where the injected IServiceProvider was previously discarded, I use it to inject an IConfiguration and, along with some helper values, build out the HTTP endpoint/port, the gRPC endpoint/port and the API token values.

Workflow SDK

As Dapr officially targets .NET 6 and up right now, there was some code in the Workflow registration that handled edge bugs noted for .NET clients older than 6. This PR simplifies and removes those targets.

Performance improvement

Further, it had a funky way of building the gRPC channel that accepted the gRPC endpoint, but then ignored and re-called it from DaprDefaults. The updated implementation uses the value previously retrieved.

Tests

I don't see that there are any unit tests for the Workflow SDK in the solution, which is surprising. A future commit for this PR will include some tests for at least my additions here and more should be added over time where relevant.

Actors SDK

The Actors SDK makes use of an Options configuration that defaults the HTTP endpoint to the value from DaprDefaults, but doesn't set the API token by default.

For this one, I simply added a check at either point during the registration to determine if the API token was empty (default) and if so, replace with the prioritization approach detailed above. A similar check is done to see if the HTTP endpoint in the options equals the default value of "http://localhost:3500" - if so, it replaces with the prioritization approach detailed above, and if not, leaves as-is (with the assumption that if either isn't default, it's because the user has opted to hard-code a new value).

Noted possible breaking changes

There are three possible (e.g. I can't find documentation on what the preferred behavior is for #1, I don't believe #2 is necessarily breaking and #3 simplifies a non-stable SDK) breaking changes that I wanted to call out.

Honors both endpoint and ports

Further, I believe there to be a bug in the DaprDefaults implementation. I noticed while writing this PR this morning that neither DAPR_HTTP_ENDPOINT nor DAPR_GRPC_ENDPOINT are specified in the environment variables documentation (added in a separate PR) so it's not clear whether this is intended, but as-is, the port will be ignored if the endpoint is itself specified (opting to use the port (implicitly or explicitly) specified with the endpoint instead). Rather, the value of the port is only used if the endpoint isn't specified (and thus can only be used if the endpoint is defaulted to "127.0.0.1".

This PR changes this behavior and instead sets the value of each endpoint per the retrieved value. Then it attempts to do the same with that protocol's port and sets it. As a result, if both are specified, both will be applied contrary to the implementation in DaprDefaults.

Defaults to localhost instead of 127.0.0.1 if endpoint isn't specified

There is a note in the Workflow SDK registration extension class that indicates that 127.0.0.1 isn't compatible with WSL2 so it opts of using DaprDefaults so it can instead specify "localhost". To ensure nothing is broken with Workflow, I default to "localhost" instead of "127.0.0.1" across both the Client and Workflow SDK registrations.

Removed registration method in Workflow registration

Today, one is supposed to call both services.AddDaprWorkflow() and services.AddDaprWorkflowClient();. To eliminate code duplication and otherwise simplify this, only the former is necessary now. Per this PR, it will inject a DaprWorkflowClientBuilderFactory that will pull the gRPC values from the IConfiguration (per the failover policy indicated above) and itself add what was previously done with a call to services.AddDaprWorkflowClient().

As of the latest commit (#c3a190f), all tests are passing on my system except the Dapr.E2E.Test and Dapr.Actor.Generators.Test (which seemingly are all failing because the path contains slashes in the wrong direction).

Approach taken in other SDKs

As this doesn't appear to be documented anywhere, I did a survey to see how each of the other language SDKs handles this and frankly, it's a mixed bag. I would suggest that this be applied more uniformly to all the SDKs and would be happy to contribute the appropriate PRs for each if there's some consensus on that.

JavaScript

The JavaScript SDK does not use the approach from the .NET SDK. Rather, it uses an approach more like what I have in this PR in that if the endpoint and the port are specified, it uses both to construct the gRPC and HTTP endpoints. Here is how it does it to build the gRPC client and here is the same function for the HTTP client.

Python

The Python SDK similarly uses the approach I take in this PR in that if the endpoint and port are specified, it uses both to construct the gRPC client endpoint. That said, I don't see that it ever uses it for building out the HTTP client, but perhaps that class is a work in progress as it looks a bit lighter.

Go

The approach taken in Go looks to be more similar to the current approach taken in the .NET client (which this PR seeks to change) in that if the endpoint is set, it creates the new client if the endpoint is specified and only checks the port if that endpoint isn't available.

Java

The approach taken in Java also appears to be more similar to the current approach taken in the .NET client (which this PR seeks to change) in that if the endpoint is set and not empty, it will use it without checking the port. It will only use the port value if the endpoint isn't specified, but from there it seems to use its own property for sourcing the local IP address. Rather than defaulting to "127.0.0.1" as most of the other SDKs do (or "localhost" as the .NET Workflow SDK does), it instead defers to the DEFAULT_SIDECAR_IP property value which appears to be intended to be populated as an environment variable, but which isn't documented in the environment variables reference documentation, so that's a little bit of a different twist.

Rust

Rust follows the approach I'm proposing in this PR in that it uses both the endpoint and the port (concatenating both together) to specify the intended endpoint value to connect to.

C++

I tried to do a string search on GitHub for any use of "DAPR_GRPC_ENDPOINT" or "DAPR_HTTP_ENDPOINT", but it was unable to find any reference except on the example application and even then, it was just the port values from environment values with a hard-coded "127.0.0.1", so perhaps this SDK is still under construction.

PHP

I was similarly unable to find any use of "DAPR_GRPC_" in this project, so perhaps it's still under construction.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1336 and #1032
This PR also supersedes #1040

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

…tion preference. Needs testing.

Signed-off-by: Whit Waldo <[email protected]>
… approach for pulling the HTTP endpoint and API token

Signed-off-by: Whit Waldo <[email protected]>
@WhitWaldo WhitWaldo added this to the v1.15 milestone Oct 14, 2024
@philliphoff
Copy link
Collaborator

philliphoff commented Oct 14, 2024

My understanding was that the newer DAPR_GRPC_ENDPOINT and DAPR_HTTP_ENDPOINT variables were intended to completely supercede their corresponding DAPR_GRPC_PORT and DAPR_HTTP_PORT variables (see dapr/dapr#6035). That is, any explicit port should be part of the endpoint value.

…ment variables for determining the sidecar endpoint. Added notes to explain this in the code going forward.

Signed-off-by: Whit Waldo <[email protected]>
…Defaults to use when building endpoints.

Signed-off-by: Whit Waldo <[email protected]>
@WhitWaldo
Copy link
Contributor Author

My understanding was that the newer DAPR_GRPC_ENDPOINT and DAPR_HTTP_ENDPOINT variables were intended to completely supercede their corresponding DAPR_GRPC_PORT and DAPR_HTTP_PORT variables (see dapr/dapr#6035). That is, any explicit port should be part of the endpoint value.

Good catch. I've updated the offending code so it reflects the proposal:

  • If the endpoint env var is provided, it will use that value in its totality (inferring port from the protocol provided if not explicitly provided in the endpoint)
  • If the port is provided and the endpoint env var not, it will default to a "127.0.0.1" equivalent - notably, it will use "localhost" instead because of the issue documented at Use "localhost" instead of "127.0.0.1" for the sidecar host address #1032
  • If neither is provided, it will default to http://localhost:{defaultPort} as pulled from DaprDefaults for either HTTP or gRPC.

This PR supersedes the one at #1040

Copy link
Collaborator

@philliphoff philliphoff left a comment

Choose a reason for hiding this comment

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

I think it should be possible to collapse the multiple implementations into just a single set, and a question about endpoint vs. port.

@WhitWaldo
Copy link
Contributor Author

@philliphoff My bad - hold off on this PR for now. It occurs to me that it'd be mildly overhauled following part of the Jobs PR (shifting from the floating shared classes including DaprDefaults.cs to an explicit shared project).

philliphoff
philliphoff previously approved these changes Oct 17, 2024
Copy link
Collaborator

@philliphoff philliphoff left a comment

Choose a reason for hiding this comment

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

Just a couple of final nits, but overall looks good.

Signed-off-by: Whit Waldo <[email protected]>
Copy link
Collaborator

@philliphoff philliphoff left a comment

Choose a reason for hiding this comment

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

:shipit:

@WhitWaldo WhitWaldo merged commit 5548c67 into dapr:master Oct 18, 2024
10 checks passed
@WhitWaldo WhitWaldo deleted the iconfiguration-preference branch October 18, 2024 08:20
humandigital-michiel pushed a commit to neworange-agency-db/dapr-dotnet-sdk that referenced this pull request Oct 23, 2024
…tead of directly (dapr#1363)

* Implemented against Dapr.Client.AspNetCore and Dapr.Client

Signed-off-by: Whit Waldo <[email protected]>

* SImplified DaprWorkflow DI registration and updated to use IConfiguration preference. Needs testing.

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright header

Signed-off-by: Whit Waldo <[email protected]>

* Updated actor registration to prefer the updated IConfiguration-based approach for pulling the HTTP endpoint and API token

Signed-off-by: Whit Waldo <[email protected]>

* Adopted accepted proposal's guidelines for favoring different environment variables for determining the sidecar endpoint. Added notes to explain this in the code going forward.

Signed-off-by: Whit Waldo <[email protected]>

* Made some lines a little more concise, added hostname default to DaprDefaults to use when building endpoints.

Signed-off-by: Whit Waldo <[email protected]>

* Fixed and updated unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated to put endpoint resolution mechanism in DaprDefaults within Dapr.Common  - updating projects and unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated packages to fix security advisory GHSA-447r-wph3-92pm

Signed-off-by: Whit Waldo <[email protected]>

* Updated Workflow builder to use DaprDefaults with IConfiguration

Signed-off-by: Whit Waldo <[email protected]>

* Updating global.json

Signed-off-by: Whit Waldo <[email protected]>

* Tweaked global.json comment

Signed-off-by: Whit Waldo <[email protected]>

* Adding braces per nit

Signed-off-by: Whit Waldo <[email protected]>

* Consolidated both registration extension methods to remove duplication

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
divzi-p pushed a commit to divzi-p/dotnet-sdk that referenced this pull request Dec 10, 2024
…tead of directly (dapr#1363)

* Implemented against Dapr.Client.AspNetCore and Dapr.Client

Signed-off-by: Whit Waldo <[email protected]>

* SImplified DaprWorkflow DI registration and updated to use IConfiguration preference. Needs testing.

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright header

Signed-off-by: Whit Waldo <[email protected]>

* Updated actor registration to prefer the updated IConfiguration-based approach for pulling the HTTP endpoint and API token

Signed-off-by: Whit Waldo <[email protected]>

* Adopted accepted proposal's guidelines for favoring different environment variables for determining the sidecar endpoint. Added notes to explain this in the code going forward.

Signed-off-by: Whit Waldo <[email protected]>

* Made some lines a little more concise, added hostname default to DaprDefaults to use when building endpoints.

Signed-off-by: Whit Waldo <[email protected]>

* Fixed and updated unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated to put endpoint resolution mechanism in DaprDefaults within Dapr.Common  - updating projects and unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated packages to fix security advisory GHSA-447r-wph3-92pm

Signed-off-by: Whit Waldo <[email protected]>

* Updated Workflow builder to use DaprDefaults with IConfiguration

Signed-off-by: Whit Waldo <[email protected]>

* Updating global.json

Signed-off-by: Whit Waldo <[email protected]>

* Tweaked global.json comment

Signed-off-by: Whit Waldo <[email protected]>

* Adding braces per nit

Signed-off-by: Whit Waldo <[email protected]>

* Consolidated both registration extension methods to remove duplication

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Divya Perumal <[email protected]>
siri-varma pushed a commit to siri-varma/dotnet-sdk that referenced this pull request Dec 20, 2024
…tead of directly (dapr#1363)

* Implemented against Dapr.Client.AspNetCore and Dapr.Client

Signed-off-by: Whit Waldo <[email protected]>

* SImplified DaprWorkflow DI registration and updated to use IConfiguration preference. Needs testing.

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright header

Signed-off-by: Whit Waldo <[email protected]>

* Updated actor registration to prefer the updated IConfiguration-based approach for pulling the HTTP endpoint and API token

Signed-off-by: Whit Waldo <[email protected]>

* Adopted accepted proposal's guidelines for favoring different environment variables for determining the sidecar endpoint. Added notes to explain this in the code going forward.

Signed-off-by: Whit Waldo <[email protected]>

* Made some lines a little more concise, added hostname default to DaprDefaults to use when building endpoints.

Signed-off-by: Whit Waldo <[email protected]>

* Fixed and updated unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated to put endpoint resolution mechanism in DaprDefaults within Dapr.Common  - updating projects and unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated packages to fix security advisory GHSA-447r-wph3-92pm

Signed-off-by: Whit Waldo <[email protected]>

* Updated Workflow builder to use DaprDefaults with IConfiguration

Signed-off-by: Whit Waldo <[email protected]>

* Updating global.json

Signed-off-by: Whit Waldo <[email protected]>

* Tweaked global.json comment

Signed-off-by: Whit Waldo <[email protected]>

* Adding braces per nit

Signed-off-by: Whit Waldo <[email protected]>

* Consolidated both registration extension methods to remove duplication

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>
WhitWaldo added a commit that referenced this pull request Dec 28, 2024
* Make context mockable

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fix project

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Consolidated version of coverlet.msbuild, coverlet.collector, xunit, xunit.runner.visualstudio, Microsoft.AspNetCore.Mvc.Testing, Moq to the same version in all projects.

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Make context mockable

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fix project

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added unit test to prove out concern raised on Discord

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removed unused using

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added unit test to validate that headers aren't being stripped off request

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fixed spelling typo

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added fix to handle null return values

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removed unnecessary null check

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removed deprecated methods from DaprClient and tests as well as unused types

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removed unused (and invalid) reference

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removed E2E workflow test as it validated DaprClient and the functionality has been moved out to the Dapr.Workflow project instead.

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Adding instance-based CreateInvokableHttpClient (#1319)

This PR takes the implementation of the static method and puts it into the DaprClient instance, pulling from the existing apiTokenHeader on the instance to populate the daprApiToken, pulling the endpoint from the instance's httpEndpoint value and accepting only an appId argument so as to specify the ID of the Dapr app to connect to and place in the resulting URI.

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fixed security advisory updates across dependencies (transitive and direct) (#1366)

Migrating whole solution to Central Package Management - several package version upgrades to address security advisories and otherwise.

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removes floating classes and introduces Dapr.Common project (#1365)

Extracting classes out to common project

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Extracted Protos out to common project (#1367)

Protos pulled out to separate shared project

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Improvement of the dotnet-contributing files (#1330)

Add link about Dapr bot to contribution documentation

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Support case insensitive cloudevent payloads and forward cloudevent props s headers (#1153)

* forward cloudevent props
Signed-off-by: Ilias Politsopoulos <[email protected]>

* refactor middleware
Signed-off-by: Ilias Politsopoulos <[email protected]>

* add cloud event property filters
Signed-off-by: Ilias Politsopoulos <[email protected]>

* update string check
Signed-off-by: Ilias Politsopoulos <[email protected]>

* forward cloudevent props
Signed-off-by: Ilias Politsopoulos <[email protected]>

* refactor middleware
Signed-off-by: Ilias Politsopoulos <[email protected]>

* add cloud event property filters
Signed-off-by: Ilias Politsopoulos <[email protected]>

* update checks
Signed-off-by: Ilias Politsopoulos <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Updating actor serialization documentation (#1371)

* Changed headers, updated introduction to reflect the difference in serialization between either type and added a brief section to detail the use of System.Text.Json for weakly-typed Dapr actor clients and to point to official documentation on it

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Prioritize retrieval of environment variables from IConfiguration instead of directly (#1363)

* Implemented against Dapr.Client.AspNetCore and Dapr.Client

Signed-off-by: Whit Waldo <[email protected]>

* SImplified DaprWorkflow DI registration and updated to use IConfiguration preference. Needs testing.

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright header

Signed-off-by: Whit Waldo <[email protected]>

* Updated actor registration to prefer the updated IConfiguration-based approach for pulling the HTTP endpoint and API token

Signed-off-by: Whit Waldo <[email protected]>

* Adopted accepted proposal's guidelines for favoring different environment variables for determining the sidecar endpoint. Added notes to explain this in the code going forward.

Signed-off-by: Whit Waldo <[email protected]>

* Made some lines a little more concise, added hostname default to DaprDefaults to use when building endpoints.

Signed-off-by: Whit Waldo <[email protected]>

* Fixed and updated unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated to put endpoint resolution mechanism in DaprDefaults within Dapr.Common  - updating projects and unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated packages to fix security advisory https://github.com/advisories/GHSA-447r-wph3-92pm

Signed-off-by: Whit Waldo <[email protected]>

* Updated Workflow builder to use DaprDefaults with IConfiguration

Signed-off-by: Whit Waldo <[email protected]>

* Updating global.json

Signed-off-by: Whit Waldo <[email protected]>

* Tweaked global.json comment

Signed-off-by: Whit Waldo <[email protected]>

* Adding braces per nit

Signed-off-by: Whit Waldo <[email protected]>

* Consolidated both registration extension methods to remove duplication

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* cleanup: Removed Serilog nuget from Directory.Packages.props (#1376)

* Removed Serilog nuget from Directory.Packages.props

Signed-off-by: Manuel Menegazzo <[email protected]>

* Update Directory.Packages.props

Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Removed sample folder (#1375)

Signed-off-by: Manuel Menegazzo <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Remove unused variables (#1314)

* Remove unused variables

Signed-off-by: Rafael Camara <[email protected]>
Signed-off-by: Rafael Câmara <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Remove unused using statements. (#1313)

Signed-off-by: Rafael Camara <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Incremental source generator for actors (#1334)

* Samples - Add k8s deployment yaml to DemoActor sample (#1308)

* up

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed build

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed typo

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <[email protected]>

* Removed dockerfile, updated readme, removed ps1 and sh scripts

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated base image

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Added overload for DaprClient DI registration (#1289)

* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <[email protected]>

* Added supporting unit test

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Co-authored-by: Phillip Hoff <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Merge `release-1.13` back into `master` (#1285)

* Update protos and related use for Dapr 1.13. (#1236)

* Update protos and related use.

Signed-off-by: Phillip Hoff <[email protected]>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <[email protected]>

* Init properties.

Signed-off-by: Phillip Hoff <[email protected]>

---------

Signed-off-by: Phillip Hoff <[email protected]>

* Update artifact action versions. (#1240)

Signed-off-by: Phillip Hoff <[email protected]>

* Make recursive true as default (#1243)

Signed-off-by: Shivam Kumar <[email protected]>

* Fix for secret key transformation in multi-value scenarios (#1274)

* Add repro test.

Signed-off-by: Phillip Hoff <[email protected]>

* Fix for secret key transformation in multi-value scenarios.

Signed-off-by: Phillip Hoff <[email protected]>

---------

Signed-off-by: Phillip Hoff <[email protected]>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <[email protected]>

---------

Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Shivam Kumar <[email protected]>
Co-authored-by: Shivam Kumar <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Shivam Kumar <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Co-authored-by: Phillip Hoff <[email protected]>
Co-authored-by: Shivam Kumar <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Aligned nuget version

Signed-off-by: Manuel Menegazzo <[email protected]>

* UP

Signed-off-by: Manuel Menegazzo <[email protected]>

* UP

Signed-off-by: Manuel Menegazzo <[email protected]>

* Debug profile added

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated implementation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Emitted DAPR001 Diagnostic warning

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added DAPR002 diagnostic

Signed-off-by: Manuel Menegazzo <[email protected]>

* Cleaun

Signed-off-by: Manuel Menegazzo <[email protected]>

* UP

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added summaries

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added base interface to ActorClient

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added ctor

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added nullable directive

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added null check for actorproxy ctor parameter

Signed-off-by: Manuel Menegazzo <[email protected]>

* Moved DiagnoticException in a dedicate cs file

Signed-off-by: Manuel Menegazzo <[email protected]>

* Moved generator costants to dedicated class

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added ActorReference creation from the ActorBase class informations (#1277)

* Handled creation of ActorReference from Actor base class

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated null check

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added unit test for GetActorReference from null actore and actor proxy

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added test for ActorReference created inside Actor implementation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated description

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed test method naming

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added unit test for exception generated in case the type is not convertible to an ActorReference

Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added overload to support SDK supplying query string on invoked URL (#1310)

* Refactored extensions and their tests into separate directories

Signed-off-by: Whit Waldo <[email protected]>

* Added overload to method invocation to allow query string parameters to be passed in via the SDK instead of being uncermoniously added to the end of the produced HttpRequestMessage URI

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests to support implementation

Signed-off-by: Whit Waldo <[email protected]>

* Marking HttpExtensions as internal to prevent external usage and updating to work against Uri instead of HttpRequestMessage.

Signed-off-by: Whit Waldo <[email protected]>

* Updated unit tests to match new extension purpose

Signed-off-by: Whit Waldo <[email protected]>

* Resolved an ambiguous method invocation wherein it was taking the query string and passing it as the payload for a request. Removed the offending method and reworked the remaining configurations so there's no API impact.

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed actorProxy argument null check

Signed-off-by: Manuel Menegazzo <[email protected]>

* Moved ActorClientDesciptor into separta cs file

Signed-off-by: Manuel Menegazzo <[email protected]>

* Moved textual templates to dedicated class

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated comments, property names

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added argument null check to SyntaxFactoryHelpers

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added comments

Signed-off-by: Manuel Menegazzo <[email protected]>

* Removed obsolete testing packages https://github.com/dotnet/roslyn-sdk/blob/main/src/Microsoft.CodeAnalysis.Testing/README.md#obsolete-packages

Signed-off-by: Manuel Menegazzo <[email protected]>

* Adapted existing unit test to new source generated code

Signed-off-by: Manuel Menegazzo <[email protected]>

* Up

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added tests for SyntaxFactoryHelpers

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated generation of ArgumentNullException

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated nullability

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed internal methods tests

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added test to IEnumerableExtensions

Signed-off-by: Manuel Menegazzo <[email protected]>

* Unittested GetSyntaxKinds from Accessibility

Signed-off-by: Manuel Menegazzo <[email protected]>

* UP

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated assignment implementation of ctor body

Signed-off-by: Manuel Menegazzo <[email protected]>

* Improved unit test

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added implementation of method generation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed ArgumentNullException invocation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added test for NameOfExpression

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed ActorProxy method invocation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Simplified proxy argument definition

Signed-off-by: Manuel Menegazzo <[email protected]>

* Explicit generic arguments of the proxy call during generation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Handled cancellation token with default value

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed typo

Signed-off-by: Manuel Menegazzo <[email protected]>

* Configured eol used in NormalizeWhitespace function

Signed-off-by: Manuel Menegazzo <[email protected]>

* Normalized expected source

Signed-off-by: Manuel Menegazzo <[email protected]>

* Moved to constat the ActorProxyTypeName

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fix typo

Signed-off-by: Manuel Menegazzo <[email protected]>

* Created ActorProxyInvokeMethodAsync SyntaxFactoryHelper

Signed-off-by: Manuel Menegazzo <[email protected]>

* Removed custom concat implementation

Signed-off-by: Manuel Menegazzo <[email protected]>

* fix (#1329)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* link to non-dapr endpoint howto (#1335)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Merge 1.14 release branch back into `master`. (#1337)

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed merge errors
Signed-off-by: Manuel Menegazzo <[email protected]>

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated some summaries

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added some missing summaries

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed typo

Signed-off-by: Manuel Menegazzo <[email protected]>

* Improved some summary text

Signed-off-by: Manuel Menegazzo <[email protected]>

* Improved summaries

Signed-off-by: Manuel Menegazzo <[email protected]>

* Handled review requests

Signed-off-by: Manuel Menegazzo <[email protected]>

* Changed SyntaxFactoryHelpers accessor to internal

Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Shivam Kumar <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Co-authored-by: Phillip Hoff <[email protected]>
Co-authored-by: Shivam Kumar <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Add .NET client for Dapr Jobs API (#1384)

* Package addition + updates

Signed-off-by: Whit Waldo <[email protected]>

* Added Dapr.Jobs project

Signed-off-by: Whit Waldo <[email protected]>

* Initial commit - unable to proceed without update on master from streaming sub PR

Signed-off-by: Whit Waldo <[email protected]>

* Added class to Dapr.Common, fixed compilation errors

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests for Dapr.Common enum extensions

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright header

Signed-off-by: Whit Waldo <[email protected]>

* Added sample Jobs project

Signed-off-by: Whit Waldo <[email protected]>

* Added documentation

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright header

Signed-off-by: Whit Waldo <[email protected]>

* Downgraded Roslyn packages since master doesn't yet have the incremental source generator updates

Signed-off-by: Whit Waldo <[email protected]>

* Missed a reference regarding incremental source generators

Signed-off-by: Whit Waldo <[email protected]>

* Downgraded packages to fix nullability issues on build

Signed-off-by: Whit Waldo <[email protected]>

* Downgraded from 8.* packages back to 6.* packages for the various Microsoft.Extensions.* packages to fix build issues

Signed-off-by: Whit Waldo <[email protected]>

* Removed unnecessary assignment

Signed-off-by: Whit Waldo <[email protected]>

* Added braces for clarity

Signed-off-by: Whit Waldo <[email protected]>

* Added more curley braces

Signed-off-by: Whit Waldo <[email protected]>

* More curly braces again

Signed-off-by: Whit Waldo <[email protected]>

* Marked two properties as static

Signed-off-by: Whit Waldo <[email protected]>

* Updated to handle any order of parameters to endpoint route builder delegate

Signed-off-by: Whit Waldo <[email protected]>

* Updated default cancellation token value

Signed-off-by: Whit Waldo <[email protected]>

* Added missing package version in Directory.Packages

Signed-off-by: Whit Waldo <[email protected]>

* Fixed unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Added test to ensure that even if cancellation token is provided, it'll handle the mapping properly

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Updated prereqs to specify .NET 6 and .NET 8 in v1.15 (#1398)

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Refactor DaprWorkflowClientBuilderFactory and WorkflowRuntimeOptions (#1244)

This commit refactors the DaprWorkflowClientBuilderFactory and WorkflowRuntimeOptions classes.

In DaprWorkflowClientBuilderFactory:
- Added a new method, UseGrpcChannelOptions, to allow the use of custom GrpcChannelOptions for creating the GrpcChannel.
- Updated the UseGrpc method to use the GrpcChannelOptions provided by the WorkflowRuntimeOptions.

In WorkflowRuntimeOptions:
- Added a new property, GrpcChannelOptions, to store the custom GrpcChannelOptions.
- Added a new method, UseGrpcChannelOptions, to set the GrpcChannelOptions.

These changes improve the flexibility and customization options for the Dapr workflow client.

Signed-off-by: Michiel van Praat <[email protected]>
Co-authored-by: Michiel van Praat <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fix for DI registration not completing as expected (#1386)

* Tentative fix for DI registration not completing as expected

Signed-off-by: Whit Waldo <[email protected]>

* Making injected IConfiguration optional as it might not be populated if user isn't utilizing ASP.NET Core from caller

Signed-off-by: Whit Waldo <[email protected]>

* Fixed DI injection issue

Signed-off-by: Whit Waldo <[email protected]>

* Removed registration of DaprWorkflowClientBuilderFactory

Signed-off-by: Whit Waldo <[email protected]>

* Updated field names for consistency

Signed-off-by: Whit Waldo <[email protected]>

* Minor formatting changes

Signed-off-by: Whit Waldo <[email protected]>

* Fixed build error caused by bad merge resolution

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Add .NET client for pub/sub support - streaming subscriptions (#1381)

* Building out Dapr.Messaging and test project for streaming pubsub subscriptions

Signed-off-by: Whit Waldo <[email protected]>

* Added copyright notices

Signed-off-by: Whit Waldo <[email protected]>

* Minor stylistic updates

Signed-off-by: Whit Waldo <[email protected]>

* Added generic client builder to support publish/subscribe client builder

Signed-off-by: Whit Waldo <[email protected]>

* Tweaked XML comment

Signed-off-by: Whit Waldo <[email protected]>

* Added several unit tests for the generic client builder

Signed-off-by: Whit Waldo <[email protected]>

* Updated to include latest review changes:
- Added lock so that while we guarantee the method is called only once, it should be thread-safe now
- Marked PublishSubscribeReceiver as internal so its members aren't part of the public API
- Updated TopicMessage to use IReadOnlyDictionary

Signed-off-by: Whit Waldo <[email protected]>

* Switched to interlock exchange instead of lock to slightly simplify code

Signed-off-by: Whit Waldo <[email protected]>

* Added sample project

Signed-off-by: Whit Waldo <[email protected]>

* Minor changes to unit test

Signed-off-by: Whit Waldo <[email protected]>

* Deleted protos folder

Signed-off-by: Whit Waldo <[email protected]>

* Using lowercase protos dir name

Signed-off-by: Whit Waldo <[email protected]>

* Added registration extension methods

Signed-off-by: Whit Waldo <[email protected]>

* Updated example to use DI registration

Signed-off-by: Whit Waldo <[email protected]>

* Added default cancellation token

Signed-off-by: Whit Waldo <[email protected]>

* Passing stream into method instead of creating it twice

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* ci: set fail-fast to false (#1405)

Signed-off-by: Mike Nguyen <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added async operations workflow sample (#1394)

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added workflow example: Fan out/fan in (#1396)

* Added workflow fan out/fan in example

Signed-off-by: Whit Waldo <[email protected]>

* Added copyright headers

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added workflow sample: Sub-workflows (#1395)

* Added Workflow with sub-workflow

Signed-off-by: Whit Waldo <[email protected]>

* Removed duplicate package version reference

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added workflow sample: Task chaining (#1387)

* Added Workflow Task Chaining example to replace https://github.com/dapr/dotnet-sdk/pull/1206

Signed-off-by: Whit Waldo <[email protected]>

* Targeting .NET 6, fixed transposition error

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright headers

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added workflow sample: Monitor (#1388)

* Added workflow monitor

Signed-off-by: Whit Waldo <[email protected]>

* Restore to original argument names

Signed-off-by: Whit Waldo <[email protected]>

* Update to target .NET 6

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright headers

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Added workflow example: External interaction (#1389)

* Added workflow example demonstrating external interaction

Signed-off-by: Whit Waldo <[email protected]>

* Added copyright headers

Signed-off-by: Whit Waldo <[email protected]>

* Fixed .sln file

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Optional DI lifecycle change (#1408)

* Added mechanism to allow the service lifetime to be overridden from a singleton (default) to another lifetime

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests - updated dependencies accordingly

Signed-off-by: Whit Waldo <[email protected]>

* Added service lifetime to DaprClient as well

Signed-off-by: Whit Waldo <[email protected]>

* Added update to DaprClient to pass service lifetime through

Signed-off-by: Whit Waldo <[email protected]>

* Added documentation indicating how to register DaprWorkflowClient with different lifecycle options.

Signed-off-by: Whit Waldo <[email protected]>

* Removed unnecessary line from csproj

Signed-off-by: Whit Waldo <[email protected]>

* Simplified registrations

Signed-off-by: Whit Waldo <[email protected]>

* Called out an important point about registrations

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Additional lifecycle registration changes (#1410)

* Added service lifetime to Jobs client

Signed-off-by: Whit Waldo <[email protected]>

* Added service lifetime to messaging client

Signed-off-by: Whit Waldo <[email protected]>

* Added service lifetime to actors registration

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests for DaprClient

Signed-off-by: Whit Waldo <[email protected]>

* Minor naming tweaks

Signed-off-by: Whit Waldo <[email protected]>

* Removed invalid using

Signed-off-by: Whit Waldo <[email protected]>

* Added service lifetime tests for actors

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests for jobs client lifecycle registrations

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests for PubSub and lifecycle registration

Signed-off-by: Whit Waldo <[email protected]>

* Fixed missing registration dependency

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Preserve comparer of the original dictionary from ConfigurationProvider (#935)

Signed-off-by: Tomas Hrebicek <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update all.sln

Removed duplicate project include of Dapr.Workflow.Test

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Bug/476 multiple methods per interface with JSON serialization doesn´t work (#1343)

* update devcontainer

Signed-off-by: paule96 <[email protected]>

* update test setup

Signed-off-by: paule96 <[email protected]>

* Now the json serialization should work with multiple methods in an interface

Signed-off-by: paule96 <[email protected]>

* fixed devcontainer to run actors

Now the devcontainer uses docker in docker, so you can reach the dapr setup after you did run dapr init. This will then only affect the dev container, without compromising the host of the devcontainer

Signed-off-by: paule96 <[email protected]>

* fix bugs with the current implementation

Signed-off-by: paule96 <[email protected]>

* add a test that checks excatly the behavior

Signed-off-by: paule96 <[email protected]>

* fix devcontainer post creatd command

Signed-off-by: paule96 <[email protected]>

* change the default to dotnet 8.0

Signed-off-by: paule96 <[email protected]>

* I don't know what is different but we commit.

Maybe it resolves the need of chmod for it 🤷‍♀️

Signed-off-by: paule96 <[email protected]>

* make it easier to see why the application of an E2E test couldn't start

Signed-off-by: paule96 <[email protected]>

* make the exception in E2E more percise

Signed-off-by: paule96 <[email protected]>

* fix exception message

Signed-off-by: paule96 <[email protected]>

---------

Signed-off-by: paule96 <[email protected]>
Co-authored-by: Yaron Schneider <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Support .NET 9 (#1404)

* Updated build and integration test scripts to include .NET 9

Signed-off-by: Whit Waldo <[email protected]>

* Removed unused matrix values

Signed-off-by: Whit Waldo <[email protected]>

* Reverted some .NET 8 requirement

Signed-off-by: Whit Waldo <[email protected]>

* Updated setup-dotnet to use latest action version + updated script to prefer a GA release, but use RC if available.

Signed-off-by: Whit Waldo <[email protected]>

* Removed unnecessary secondary build step

Signed-off-by: Whit Waldo <[email protected]>

* Updating TFM moniker

Signed-off-by: Whit Waldo <[email protected]>

* Added test to install VStest

Signed-off-by: Whit Waldo <[email protected]>

* Rolling back use of tool as it doesn't independently exist outside of the SDK

Signed-off-by: Whit Waldo <[email protected]>

* Added .NET 9 to build targets

Signed-off-by: Whit Waldo <[email protected]>

* Added .NET 9 to target frameworks across solution

Signed-off-by: Whit Waldo <[email protected]>

* I understand the reason for the required install step now - adding it back with a .NET 9 install step

Signed-off-by: Whit Waldo <[email protected]>

* Placing install steps before build

Signed-off-by: Whit Waldo <[email protected]>

* Updating global.json

Signed-off-by: Whit Waldo <[email protected]>

* Disabled analyzer errors in unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Added .NET 9 to test

Signed-off-by: Whit Waldo <[email protected]>

* Changed from #pragma error to #pragma warning

Signed-off-by: Whit Waldo <[email protected]>

* Fixed unit tests to resolve analyzer warning

Signed-off-by: Whit Waldo <[email protected]>

* Updated integration test to always include .NET 8 and .NET 9 installs

Signed-off-by: Whit Waldo <[email protected]>

* Falling back to add separate .NET 9 support
Signed-off-by: Whit Waldo <[email protected]>

* Updated referenced projects to target appropriate frameworks

Signed-off-by: Whit Waldo <[email protected]>

* Added all target frameworks back to Dapr.Commono

Signed-off-by: Whit Waldo <[email protected]>

* Added warnings to fix nullability analyzer warnings when targeting .NET 6

Signed-off-by: Whit Waldo <[email protected]>

* Updated build step to use .NET 9 instead

Signed-off-by: Whit Waldo <[email protected]>

* Fixed cloud event middleware tests - the ApplicationBuilder requires a non-null ServiceProvider per https://learn.microsoft.com/en-us/dotnet/core/compatibility/extensions/8.0/activatorutilities-createinstance-null-provider

Signed-off-by: Whit Waldo <[email protected]>

* Including target for .NET 6, 7, 8 and 9

Signed-off-by: Whit Waldo <[email protected]>

* Trialing fix to E2E integration test - excluding use of AppWebApplicationFactory in favor of direct use of HttpClient

Signed-off-by: Whit Waldo <[email protected]>

* Reverting as it breaks the other .NET versions

Signed-off-by: Whit Waldo <[email protected]>

* Potentially fixed unit tests in .NET 9

Signed-off-by: Whit Waldo <[email protected]>

* Removed extra line from build definition

Signed-off-by: Whit Waldo <[email protected]>

* Updated documentation to reflect .NET 9 and a note highlighting that .NET 6 and .NET 7 will be deprecated in v1.16

Signed-off-by: Whit Waldo <[email protected]>

* Removed unintentionally added file to commit

Signed-off-by: Whit Waldo <[email protected]>

* Added .NET 9 to E2E test setup

Signed-off-by: Whit Waldo <[email protected]>

* Fixed typo

Signed-off-by: Whit Waldo <[email protected]>

* Removed RC version from .NET 9 build

Signed-off-by: Whit Waldo <[email protected]>

* Apparently the solution file got a minor change

Signed-off-by: Whit Waldo <[email protected]>

* Removed unnecessary null checks

Signed-off-by: Whit Waldo <[email protected]>

* Whoops - didn't mean to commit that project to the solution

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* update .net workflow docs to stable (#1418)

Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* FIX: Actor source generator generates invalid code for generic interfaces (#1419)

* Handled generic actor interface

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added more actor examples

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated actor namespace in example project

Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Add .NET client for LLM Conversations support (#1382)

* Updated prototype

Signed-off-by: Whit Waldo <[email protected]>

* Added Dapr.AI project and unit test project to contain the conversational building block (and potentially future other projects)

Signed-off-by: Whit Waldo <[email protected]>

* Changed default values

Signed-off-by: Whit Waldo <[email protected]>

* Removed unnecessary method

Signed-off-by: Whit Waldo <[email protected]>

* Added a few unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Added example project

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright headers

Signed-off-by: Whit Waldo <[email protected]>

* Changed type name -> DaprLlmInput to DaprConversationInput

Signed-off-by: Whit Waldo <[email protected]>

* Returning read only list

Signed-off-by: Whit Waldo <[email protected]>

* Update to use IReadOnlyDictionary

Signed-off-by: Whit Waldo <[email protected]>

* Added method to abstract class

Signed-off-by: Whit Waldo <[email protected]>

* Striving for consistency in how properties are specified on the record

Signed-off-by: Whit Waldo <[email protected]>

* Refactored enum extensions out to Dapr.Common since it will be used in AI project

Signed-off-by: Whit Waldo <[email protected]>

* Added JSON converter for System.Text.Json to handle enum serialization based on the enum member attributes

Signed-off-by: Whit Waldo <[email protected]>

* Added unit tests to prove out generic enum JSON converter using EnumMember attributes

Signed-off-by: Whit Waldo <[email protected]>

* Added JSON converter to new enum for Dapr Conversation role

Signed-off-by: Whit Waldo <[email protected]>

* Set up role to map to the string used in grpc call to sidecar

Signed-off-by: Whit Waldo <[email protected]>

* No need for the JSON converter after all

Signed-off-by: Whit Waldo <[email protected]>

* Added missing package version to fix build error

Signed-off-by: Whit Waldo <[email protected]>

* Removed duplicate using statement breaking build

Signed-off-by: Whit Waldo <[email protected]>

* Fixed missing [Fact] annotation

Signed-off-by: Whit Waldo <[email protected]>

* Updated proto types to reflect type name changes in https://github.com/dapr/dapr/pull/8250

Signed-off-by: Whit Waldo <[email protected]>

* Added support for service lifetime

Signed-off-by: Whit Waldo <[email protected]>

* Building out documentation for Dapr AI

Signed-off-by: Whit Waldo <[email protected]>

* Simplified registration

Signed-off-by: Whit Waldo <[email protected]>

* Tweaked package version

Signed-off-by: Whit Waldo <[email protected]>

* Using IConfiguration to source DaprClient values if provided in service provider

Signed-off-by: Whit Waldo <[email protected]>

* Removed Models.* directories, flattened into Conversation namespace

Signed-off-by: Whit Waldo <[email protected]>

* Swapped out to use IReadOnlyDictionary

Signed-off-by: Whit Waldo <[email protected]>

* Added suggested optimization

Signed-off-by: Whit Waldo <[email protected]>

* Fixed bad using statement

Signed-off-by: Whit Waldo <[email protected]>

* Updates to use uniform method for standing up new Dapr clients

Signed-off-by: Whit Waldo <[email protected]>

* Removed duplicate project reference

Signed-off-by: Whit Waldo <[email protected]>

* Fixed build error

Signed-off-by: Whit Waldo <[email protected]>

* Fixing build errors

Signed-off-by: Whit Waldo <[email protected]>

* Fixed bad references

Signed-off-by: Whit Waldo <[email protected]>

* Fixed several build errors

Signed-off-by: Whit Waldo <[email protected]>

* Fixing more build errors

Signed-off-by: Whit Waldo <[email protected]>

* Updated to fix several build errors

Signed-off-by: Whit Waldo <[email protected]>

* Fixed bad refernce

Signed-off-by: Whit Waldo <[email protected]>

* Fixing more build errors

Signed-off-by: Whit Waldo <[email protected]>

* Role is required when submitting conversation input

Signed-off-by: Whit Waldo <[email protected]>

* Removed impossible path since the role cannot be nullable

Signed-off-by: Whit Waldo <[email protected]>

* Removed impossible path from logic now that role cannot be null

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Updated protos to latest in dapr/dapr (#1420)

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Conversation builder consistency changes (#1423)

* Corrected several unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated extension name for consistency

Signed-off-by: Whit Waldo <[email protected]>

* Updated registration name for consistency

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* #906 -Added methods in status API supports for saving and reading binary data (#1116)

* Added methods in status API supports for direct storage and reading of byte arrays #906

Signed-off-by: Divya Perumal <[email protected]>
Signed-off-by: Divya Perumal <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fixes + unit tests for streaming PubSub implementation (#1415)

* Added null check - the proto suggests this shouldn't ever be null, but there's an issue reporting as much, so this fixes that

Signed-off-by: Whit Waldo <[email protected]>

* Removed the Task.WhenAll making the operation non-blocking

Signed-off-by: Whit Waldo <[email protected]>

* Added unit test to validate that the subscription is no longer blocking

Signed-off-by: Whit Waldo <[email protected]>

* Removed unused line from previous test, added another test

Signed-off-by: Whit Waldo <[email protected]>

* Added another test

Signed-off-by: Whit Waldo <[email protected]>

* More unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Added more unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Updated to make DaprPublishSubscribeClientBuilder configurable via a registered IConfiguration

Signed-off-by: Whit Waldo <[email protected]>

* Added missing copyright statements

Signed-off-by: Whit Waldo <[email protected]>

* Added missing package reference

Signed-off-by: Whit Waldo <[email protected]>

* Fixed bad reference (missed in merge)

Signed-off-by: Whit Waldo <[email protected]>

* Fixed failing unit test

Signed-off-by: Whit Waldo <[email protected]>

* Tweak to only pass along EventMessage payloads to developers as it's expected that the initial response will be null if EventMessage is populated

Signed-off-by: Whit Waldo <[email protected]>

* Was missing assignment of the Data property in the TopicMessage. Shout out to both @tommorvolloriddle and @Aimless321 for catching this!

Signed-off-by: Whit Waldo <[email protected]>

* Fix - return would be bad. Continue is the right move.

Signed-off-by: Whit Waldo <[email protected]>

* Added a simple test

Signed-off-by: Whit Waldo <[email protected]>

* Fixed unit tests

Signed-off-by: Whit Waldo <[email protected]>

* Merged in tweaks from #1422

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fix nulls

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Delete examples/Client/PublishSubscribe/StreamingSubscriptionExample/Properties/launchSettings.json

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Delete examples/AI/ConversationalAI/Properties/launchSettings.json

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Delete daprdocs/content/en/dotnet-sdk-docs/dotnet-ai/dotnet-ai-usage.md

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update dotnet-jobs-howto.md

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update dotnet-jobs-howto.md

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update dotnet-workflowclient-usage.md

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update dotnet-workflowclient-usage.md

Signed-off-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* fix thing

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update WorkflowActivityContext.cs

Signed-off-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update WorkflowActivityContext.cs

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Fix version

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update Dapr.Workflow.Test.csproj

Signed-off-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* fix things

Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Delete examples/AI/ConversationalAI/Properties/launchSettings.json

Signed-off-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Delete examples/Client/PublishSubscribe/StreamingSubscriptionExample/Properties/launchSettings.json

Signed-off-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>

* Update WorkflowActivityContext.cs

Signed-off-by: Siri Varma Vegiraju <[email protected]>

---------

Signed-off-by: Siri Varma Vegiraju <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Rafael Camara <[email protected]>
Signed-off-by: Rafael Câmara <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Shivam Kumar <[email protected]>
Signed-off-by: Hannah Hunter <[email protected]>
Signed-off-by: Michiel van Praat <[email protected]>
Signed-off-by: Mike Nguyen <[email protected]>
Signed-off-by: Tomas Hrebicek <[email protected]>
Signed-off-by: paule96 <[email protected]>
Signed-off-by: Divya Perumal <[email protected]>
Signed-off-by: Divya Perumal <[email protected]>
Signed-off-by: Siri Varma Vegiraju <[email protected]>
Co-authored-by: Siri Varma Vegiraju <[email protected]>
Co-authored-by: Manuel Menegazzo <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Co-authored-by: Shubhdeep Singh <[email protected]>
Co-authored-by: Ilias <[email protected]>
Co-authored-by: Manuel Menegazzo <[email protected]>
Co-authored-by: Rafael Câmara <[email protected]>
Co-authored-by: Phillip Hoff <[email protected]>
Co-authored-by: Shivam Kumar <[email protected]>
Co-authored-by: Hannah Hunter <[email protected]>
Co-authored-by: Ruud van Falier <[email protected]>
Co-authored-by: Michiel van Praat <[email protected]>
Co-authored-by: Mike Nguyen <[email protected]>
Co-authored-by: Tomas Hrebicek <[email protected]>
Co-authored-by: paule96 <[email protected]>
Co-authored-by: Yaron Schneider <[email protected]>
Co-authored-by: Divya Perumal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prioritize IConfiguration for environment variable retrieval during DI registrations

3 participants