Commit Graph

498 Commits

Author SHA1 Message Date
Ryan Nowak 926d6d6094 runsettings 2022-03-22 14:44:23 -07:00
halspang a6319dd4b6
Wait for sidecar in DaprSecretStoreConfiguration (#838)
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>
2022-02-17 16:39:33 -08:00
Martin Björkström dca6106af7
Adds support for providing Actor type name during runtime. (#721)
* 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>
2022-02-15 11:01:45 -08:00
mumumi 52113a3fd2
Fix missing assignment (#824)
* Fix missing assignment

ActorHost.JsonSerializerOptions is always null.

Signed-off-by: mumumi <hjjixx@hotmail.com>

* Add test for custom json options

Signed-off-by: mumumi <hjjixx@hotmail.com>

Co-authored-by: halspang <70976921+halspang@users.noreply.github.com>
2022-01-28 09:15:38 -08:00
halspang a8acdea23f
Include .NET 5 in all builds and check test status (#826)
Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-28 08:33:10 -08:00
halspang 8ba4234578
Update Parse Trx github action (#825)
Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-27 16:56:49 -08:00
halspang 7690e98663
Add .NET 6 build targets for tests (#823)
https://github.com/dapr/dotnet-sdk/issues/794

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-26 08:59:20 -08:00
Mark Fussell b47c63ac14
Merge pull request #821 from halspang/query_docs
Add client example for Query API (Alpha)
2022-01-24 11:17:17 -08:00
Hal Spang aab8c95dfb Add client example for Query API (Alpha)
This commit adds a client example for the Query API. It also
marks the Configuration API as alpha.

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-24 11:03:41 -08:00
halspang 20ef37382c
Add documentation for GetConfiguration API (#818)
https://github.com/dapr/docs/issues/2094

Signed-off-by: Hal Spang <halspang@microsoft.com>
2022-01-21 16:15:09 -08:00
amulyavarote 596d725785
Changed application port number for actors example (#816)
* 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>
2022-01-20 16:01:01 -08:00
halspang 764b4d7674
Fix issue where state did not reset on actor error (#789)
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>
2022-01-13 09:01:31 -08:00
halspang d43de2b043
Add support for Query API (#810)
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>
2022-01-12 17:50:06 -08:00
halspang f5169cbe5f
Add support for the GetConfiguration API (#812)
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>
2022-01-12 17:07:48 -08:00
Will edd6b3db74
Add DCO requirements and updated code of conduct (#808)
Issue reference: dapr/docs#2039

Signed-off-by: Will <william.wl.tsai@gmail.com>
2022-01-06 10:35:50 -08:00
Mark Fussell 2ffbb113e7 fixed link
Signed-off-by: Mark Fussell <markfussell@gmail.com>
2021-12-28 15:31:59 -08:00
Mark Fussell d60eaf1c0e
Merge pull request #781 from fjvela/fix-link-to-docker
Fix ref to self hosted with docker
2021-12-28 11:45:05 -08:00
Mark Fussell 1e563ad38e
Merge branch 'master' into fix-link-to-docker 2021-12-28 11:31:02 -08:00
Dmitry Shmulevich 0c9d6a45c8
replaced license headers (#802)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-10 13:39:06 -08:00
halspang 8a38c292a0
Update Dapr Protos (#801)
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>
2021-12-10 11:09:15 -08:00
Javier Vela a0b514a2cb
Merge branch 'master' into fix-link-to-docker 2021-11-17 19:45:58 +01:00
Javier Vela 4817b13b5d Fix ref to self hosted with docker 2021-11-16 16:16:29 +01:00
halspang cc1b097991
Allow multiple topics to call the same endpoint (#763)
* 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.
2021-10-26 13:42:28 -07:00
halspang f3258632f4
Add support for gRPC proxying (#755)
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>
2021-10-19 14:08:29 -07:00
Whwlsfb a01a9d61b6
Fix StateManager can't get dapr-api-token header. (#768)
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>
2021-10-19 13:34:59 -07:00
halspang 839acaf877
Fix FromTopic route binding error (#770)
https://github.com/dapr/dotnet-sdk/issues/706
2021-10-19 13:13:29 -07:00
Michael Robertson fc54f21d00
- Added null-conditional operator to StateEntryApplicationModelProvider.OnProvidersExecuted when checking BindingSource to prevent startup null reference exceptions in certain implementations. (#765)
- Added null check and throws unit tests for StateEntryApplicationModelProvider
2021-10-13 16:53:22 -07:00
Phil Kedy 75bdb8ce2f
Fixing falsely logged default subscription message (#761) 2021-10-04 15:40:53 -07:00
Federico Bridger 1acd372ae2
Fixing problem with IIS Express not allowing Applications to subscribe to events (#754)
Co-authored-by: Federico.Bridger <Federico.Bridger@endava.com>
2021-09-28 13:50:49 -07:00
Christophe GIGAX a23aebe669
Add unit tests for InvokeBinding method (#751)
Co-authored-by: Christophe Gigax <christophe.gigax@codit.eu>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-09-16 15:41:04 -07:00
鬼谷子 8e4b35e0b7
Fix preview 7 dapr config (#738)
* feat: support Minimal APIs

* feat: support minimal api add actor

* feat: actor support minimal API

* fix: preview 7 dapr config

* chore: remove unused namespace

* chore: rollback

* chore: remove preview 6 fix

* feat: add MapDaprConfigEndpoint test

* chore: remove comment

Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-09-16 15:35:46 -07:00
halspang cee49bff92
Add an option to set Timeout for ActorProxy (#748)
* 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.
2021-09-08 12:06:07 -07:00
Phil Kedy aba49d1446
Adding match and priority to TopicAttribute for PubSub routing. (#746)
* Adding match and priority to TopicAttribute for PubSub routing.

* Restructuring call to dapr/subscribe

* Tweak
2021-09-01 14:50:42 -07:00
Sapinder Pal Singh de84c7642d
Added support for processing raw messages. (#717)
* 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.
2021-08-18 09:26:53 -07:00
Charlie Stanley ff25eb0bb1
Update Grpc to 2.38.1 which has arm64 support (#730)
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-08-17 13:51:38 -07:00
Martin Björkström 9fe5485cf0
Adds Dapr authentication handler (#688)
* 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>
2021-08-11 17:55:59 -07:00
halspang 5e544a687a
Only isolate state when using reentrancy (#723)
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>
2021-07-22 15:28:36 -07:00
Luis Cantero 56ac2431b0
Return TopicEventResponse instead of null (#720) 2021-07-21 18:53:59 -07:00
halspang 16321d3cb7
Add support for Actor Reentrancy (#708)
* 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
2021-07-14 13:29:29 -07:00
Bernd Verst 9c8e24aa03 address code review 2021-07-14 09:39:39 -07:00
Bernd Verst 8eee12a7ff Configurable actor reminder storage patitions 2021-07-14 09:39:39 -07:00
stulzq 1f7f200179 Fix typo in .NET SDK docs 2021-07-13 11:55:01 -07:00
Donovan Brown 28c07c01ad Update dotnet-development-tye.md
Fixed typo: Changed "wiht" to "with"
2021-07-13 11:50:09 -07:00
Michaël Hompus ed912bd2de Add unit tests for actor interface descriptions 2021-07-13 11:41:13 -07:00
Michaël Hompus d2aa0a1bb8 Fix incorrect error message shown 2021-07-13 11:41:13 -07:00
Michaël Hompus 903e721aa7 Improve readability of error message 2021-07-13 11:41:13 -07:00
Michaël Hompus 0731923446 Fix double space in error message 2021-07-13 11:41:13 -07:00
Michaël Hompus 959810cabe Fix typo in resource string identifier 2021-07-13 11:41:13 -07:00
Michaël Hompus 529d132de0 Fix detection of VarArgs 2021-07-13 11:41:13 -07:00
Jonathan Dickinson 2c98cdd766 docs fix: only UseHttpsRedirection for non-dev env
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.
2021-07-13 11:36:54 -07:00