* Updated build and integration test scripts to include .NET 9
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed unused matrix values
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Reverted some .NET 8 requirement
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Removed unnecessary secondary build step
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updating TFM moniker
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added test to install VStest
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Rolling back use of tool as it doesn't independently exist outside of the SDK
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added .NET 9 to build targets
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added .NET 9 to target frameworks across solution
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* I understand the reason for the required install step now - adding it back with a .NET 9 install step
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Placing install steps before build
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updating global.json
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Disabled analyzer errors in unit tests
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added .NET 9 to test
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Changed from #pragma error to #pragma warning
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Fixed unit tests to resolve analyzer warning
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated integration test to always include .NET 8 and .NET 9 installs
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Falling back to add separate .NET 9 support
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated referenced projects to target appropriate frameworks
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added all target frameworks back to Dapr.Commono
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added warnings to fix nullability analyzer warnings when targeting .NET 6
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Updated build step to use .NET 9 instead
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Including target for .NET 6, 7, 8 and 9
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Trialing fix to E2E integration test - excluding use of AppWebApplicationFactory in favor of direct use of HttpClient
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Reverting as it breaks the other .NET versions
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Potentially fixed unit tests in .NET 9
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed extra line from build definition
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* 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 <whit.waldo@innovian.net>
* Removed unintentionally added file to commit
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Added .NET 9 to E2E test setup
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Fixed typo
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed RC version from .NET 9 build
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Apparently the solution file got a minor change
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Removed unnecessary null checks
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Whoops - didn't mean to commit that project to the solution
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
---------
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Migrating whole solution to Central Package Management - several package version upgrades to address security advisories and otherwise.
---------
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
* Remove .NET Core 3.1 support and standardize on .NET 6
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
* Remove support for .NET 5 as well
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
---------
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
* Allow multiple topics to call the same endpoint
Using the WithTopic builder pattern allows you to specify multiple
topics that route to a single endpoint. Given the topics are unique,
this should be a valid case.
This change allows for a single endpoint to bind to multiple topics.
Note that this can only be done via the EndpointBuilder and not the
TopicAttribute.
https://github.com/dapr/dotnet-sdk/issues/715
* Let TopicAttribute to be specified multiple times
The endpoint builder allowed for multiple WithTopic calls so the
attribute should match that behavior.
* Added support for processing raw messages.
* Refactored code and updated subscribeendpoint tests.
* Updated file name to match class name.
* Marked subscription and metadata classes as internal.
* Adds Dapr authentication handler
- This includes functionality which simplifies securing endpoints using Dapr API Token authentication
- Fixes#682
* Remove Dapr authentication handler from examples.
* Don't resolve Dapr API token on every request, set it using delegate when configuring Dapr authentication instead.
* Adds integration tests for Dapr API token
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Fixes: #592
This change teaches the cloud events middleware to JSON-decode non-JSON
content when it appears in the `data` attribute in a cloud event.
There are three cases for cloud events that matter:
- data is used, content is a JSON object, datacontentype is JSON
- data is used, content is a JSON string, dataconenttype != JSON
- data_base64 is used, content is base64 bytes
We weren't handling the second of this. If you submitted the content:
`"data": "hello, "\world!\""` with datacontenttype = text/plain
You would end up with `"hello, \"world!\""` in the request body instead
of `hello, "world!"`.
This is a very subtle case, and I'm trying to fix it before users couple
their code to the wrong behavior. Since this is technically a breaking
change, I've added a opt-out so you can restore the buggy behavior.
Our experience right now is pretty bad when tests fail, you get a
generic `failed with exit code 1`.
This change adds more full-featured integration with GitHub Actions as
well as fixes a few minor issues:
- We were missing the codecov package on one project
- Updates to test SDK
- Annotations on failing tests
- Each test project as its own status check
- Separating a parallelizing steps of the build
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
This change introduces a better API for us to test the DaprClient or
other HttpClient based APIs.
This will resolve the flakiness problems that we're seeing with some of
the actors tests.
Fixes: #573Fixes: #588
Additionally fixed an issue where DaprHttpInteractor was misuing
HttpClientHandler. This would result in a new handler being created when
it isn't needed.
* add GrpcSample, GrpcClient; update DaprClient
* disable TLS for grpc server
* implement deposit and withdraw method for grpcsample
* implement event handler for deposit and withdraw
* edit readme for grpcsample
* improve readme
* fix @amanbha requested changes
* fix or improve readme @vinayada1 reviewed
* use parameter in DaprClient to switch invocation of routing or grpcsample service
* add separate editorconfig file into samples directory
* add license header into grpcsample
* fix TypeConverters to use internal access modifier; remove useless code; fix Console to logger; fix typo; fix using statement location
* throw a exception when account is not found for BankingService Withdraw invocation
* remove TypeConverters dependence
* use config for rpc-exception argument
* fix comment of @vinayada1
* updated documentation for parameters usage
* fix additional comments from @vinayada1
* Update Readme.md
* fix DaprClient's compile error
Co-authored-by: Yongguang Zhu <Yongguang.Zhu@microsoft.com>
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Add bulk get to client
* change params, return type, class to struct
* change IList to IReadOnlyList, make parallelism nullable
* change GetBulkItem to BulkStateItem
* Returning routes for pubsub from aspnetcore integration.
* adding ref to System.IO.Pipelines
* updating tests
* not using RawText, using segments in route.
* fixing tests
* Logging a warning for routes with parameters
* Using ILoggerFactory
* adding IDAprClient interface
* Adding DaprClientBuilder and adding methods for Publish
* updating the method name for publish
* Adding unit tests for publishevent api
* Removing individual clients for publish
* Renaming base class to DaprClient and implementation calss to DparClientGrpc
* Moving State api to grpc and adding helpers to unittest grpc calls.
* More DaprClient logic
* metadata, etag, options, etc are optional
* Revert "metadata, etag, options, etc are optional"
This reverts commit ea5dc12c5d.
* Default params, 2 new Try- methods, overload refactor for InvokeMethodAsync
* Move some classes/enums to different files. Documentation
* Code refactor and changing tests to use grpc
* Adding tests with state options
* Adding test for getting etag and state
* More refactoring and adding INvokeBinding test
* Fixing tests and tidying up things.
* Updating solutions for renamed project
* Updating projects for rename.
* Oneclient secret (#245)
* ADding Secret Apis
* Using Task for secret
* Format (#242)
* Updating samples.slm
* awaint the call to grpc in common method so that common error handling can be done there.
* Addressing review comments
* fixing test.sln
* updating prod.sln
* Addressing review comments from James.
* Add doc and example for method invocation on http app
* Updating arg validation.
* Updating example.
Co-authored-by: LM <lemai>
Co-authored-by: Carlos Mendible <cmendible@gmail.com>
* Including state Store name in the APIs to support multi state store scenario in SDK
* correcting the typo in the comment.
* Respective Changes to the tests
* Changes in StateAttribute and Binder classes to support state store name
* Changes in StateEntryModelBinderTests
* StoreName changes in the Integration test app
* fixing build issues
* Fixing integration tests
* Addressing review comments.
* Addressing review comments
* Updating samples to use correct state store name as generated by dapr cli.
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
Fixes: #74
note: This relies on the fix for dapr/dapr#574 which has been merged.
This change introduces a middleware that can upwrap a *structured* cloud
event. This is the format used by dapr by default now for pub/sub
messaging. Adding the middleware makes it transparent to the developer
whether the data can from a cloud event or was a basic RPC call.
We're adding the middleware for this first since it's the most general
approach. It has a drawback compared with other approaches, performance.
Users could alternatively use the SDK from CloudEvents to read their
data without the middleware.
We might also want to add an MVC formatter in the future, which could do
the unwrapping and deserialization to a user-type in a single operation.