The secret store configuration provider was trying to access Dapr
during the app startup. If the app started faster than Dapr, it would
get an error trying to access the secrets. This commit lets the
provider wait for the sidecar to come up before making any requests.
If the sidecar does not come up at all, we will still fail.
https://github.com/dapr/dotnet-sdk/issues/779
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Adds support for providing Actor type name during runtime.
- Fixes#677
Signed-off-by: Martin Björkström <martin.bjorkstrom@gmail.com>
* Make ActorTypeInformation.TryGet(Type) and ActorTypeInformation.Get(Type) obsolete.
- Fix relevant code after obsoleting.
Signed-off-by: Martin Björkström <martin.bjorkstrom@gmail.com>
* Changed application port number for actors example
* Modified readme for actors example
* Update README.md
Signed-off-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
Co-authored-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
When an actor call fails, it is imperative that the state is reset.
In the remoting path, we were catching the exception and returning
an error response instead of propagating the exception. Without this,
the error path was never triggered. This allowed for state from
failed requests to persist on subsequent requests.
https://github.com/dapr/dotnet-sdk/issues/762
Signed-off-by: Hal Spang <halspang@microsoft.com>
This commit adds methods to the DaprClient to call the new Query API.
Currently, a raw query string is provided to the API. The API is
still in the alpha stage which may cause shifts in how the API works.
This should not effect how the SDK exposes the call, but may change
the underlying semantics.
https://github.com/dapr/dotnet-sdk/issues/777
Signed-off-by: Hal Spang <halspang@microsoft.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
This commit adds support for the GetConfiguration API. This is an
alpha API and may be subject to change. This commit also does not
cover the Subscribe API for Configurations.
Included is a simple example showing the usage of the Configuration
API.
https://github.com/dapr/dotnet-sdk/issues/787
Signed-off-by: Hal Spang <halspang@microsoft.com>
This commit includes the copied files from dapr/dapr. These are used
to generate the gRPC client. Included in the update are:
- Configuration API
- Query API
Signed-off-by: Hal Spang <halspang@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.
This commit adds a gRPC interceptor which adds the necessary
headers for gRPC proxying to outgoing requests. This will allow
custom gRPC services to be invoked through the Dapr sidecar.
https://github.com/dapr/dotnet-sdk/issues/741
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
When "dapr_api_token" is specified in the environment variable, actor.statemanager cannot correctly set "dapr-api-token" in the request header。
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Add an option to set Timeout for ActorProxy
Actors, by there nature, may have to wait for a long period before
being allowed to execute. This could lead to long request times. The
default timeout for the HttpClient being used is fairly low. This
commit allows for the timeout to be set when constructing the
proxy.
https://github.com/dapr/dotnet-sdk/issues/728
* Removed extra constructor and e2e tests.
* 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>
Non-reentrant actors can utilize their state manager's cache
for repeated calls. They should still be able to do this unless
using reentrancy.
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Add support for Actor Reentrancy
This commit allows for the Dapr-Reentrancy-Id header to be
propogated through an actor's call chain which lets the dapr
runtime allow reentrant calls.
https://github.com/dapr/dotnet-sdk/issues/661
* Add unit/e2e tests for Actor Reentrancy
* Introduce state isolation for actor reentrancy
* Move state context to be fully AsyncLocal
Moved the UseHttpsRedirection to the else block of the IsDevelopment
check, and add a comment describing why.
The Dapr runtime reports and error and aborts the request after an HTTP
redirection. By default ASP.Net Core uses port 5000 for HTTP, and port
5001 for HTTPs. This means that if the instructions are followed exactly
the example won't work. The VSCode extension also breaks.