Commit Graph

715 Commits

Author SHA1 Message Date
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
Aaron Crawfis d324644a8e Update CODEOWNERS 2021-07-13 11:30:41 -07:00
Jonathan Dickinson fe18e8ef88 fix: InvalidProgramException under ASP.Net 6.0
Call `Type.GetTypeFromHandle` when calling
`IActorRequestMessageBody.GetParameter`

The code that generates the `IActorRequestMessageBody` parameter setup
for the dispatched call is technically incorrect, as it passes a
`RuntimeTypeHandle` to a method expecting `Type`. The correct thing to
do is to call `Type.GetTypeHandle` first to perform the conversion.
2021-07-13 11:11:25 -07:00
Martin Björkström a65e8b287d Adds example for using custom ITopicMetadata
- Sample is a simple attribute which just uses Environment.ExpandEnvironmentVariables in order to be able to set Topic and PubsubName during runtime.
2021-06-06 14:49:21 -07:00
Martin Björkström aeb47bb8ac Adds copyright header. 2021-06-06 14:49:21 -07:00
Martin Björkström 638bf4c6dc Adds support for providing pubsub and topic names during runtime.
- Fixes #680
2021-06-06 14:49:21 -07:00
Dmytro Hridin 2ddb4bb7e0 Rename to CheckHealthAsync. Add http expection wrap and return false 2021-06-06 13:49:26 -07:00
Dmytro Hridin f428174252 remove CreateInvokeHealthMethodRequest. 2021-06-06 13:49:26 -07:00
Dmytro Hridin 7895891cfd Implement dapr sidecar healthcheck method 2021-06-06 13:49:26 -07:00
Tom Kerkhove fe1e697af3
Fix typos in .NET Actor client docs (#690) 2021-06-01 16:22:08 -07:00
Nick Greenfield 5a84326f3d Use correct method call (AddActors) for registering Actors. 2021-05-13 13:17:05 -07:00
jbw 33d7a2dafd remove hardcoded application/json in favour of MediaTypeNames and use ContentTypeApplicationJson property 2021-05-13 11:20:54 -07:00
Ori Zohar fc7b666fbe
Merge pull request #673 from jasonviviano/jasonviviano/typo-fix
Fix Typo
2021-05-07 11:28:35 -07:00
jasonviviano dd218400b5 Fix Typo 2021-05-06 13:31:34 -04:00
Dirk Lemstra 3b49ad0f98 Changed default value. 2021-05-01 15:07:31 -07:00
Dirk Lemstra 5367df2974 Made the ArgumentVerifier a shared class and use it in all the projects. 2021-05-01 15:07:31 -07:00
Dirk Lemstra fc82cb55e4 No longer allow null for the values in the DaprSecretStoreConfigurationSource. 2021-05-01 15:07:31 -07:00
Dirk Lemstra 0de8c79e0f Enabled nullable reference types in Dapr.Extensions.Configuration. 2021-05-01 15:07:31 -07:00
Dirk Lemstra 865ecc6432 Also use own version of the ArgumentVerifier. 2021-05-01 15:07:31 -07:00
Ryan Nowak 710868c66e Always pass serializer options to JSON serializer
Fixes: #664

This fixes an issue where we're not passing the serializer options to
the deserialize method for a user-specified payload. This was just an
oversight and did not behave as expected when users have customized the
settings.
2021-04-30 17:14:51 -07:00
Jigar 53a8f96c10
Added DeleteBulkState operation to dotnet sdk (#637)
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-04-30 15:35:44 -07:00
Ryan Nowak b1658657a5 Fix download of package assets 2021-04-30 13:43:05 -07:00
Ryan Nowak 9104c6624c Fix handling of DAPR_API_TOKEN
Fixes: #655

This fixes a functional bug in how we initialize the default settings of
based on the `DAPI_API_TOKEN` environment variable.

Additional, the `CreateInvokeMethodRequest` family of methods were
missing API token support. This has been added.
2021-04-19 14:57:11 -07:00
Newbe36524 5e5a42c96e Update dotnet-troubleshooting-pubsub.md 2021-04-01 23:29:18 -07:00
Aaron Crawfis fadb6c2654 Update actors docs 2021-04-01 10:02:50 -07:00
Ryan Nowak 51e0584110 Skip unreliable tests
These tests are failing in unpredictable ways on the CI. Skipping these
to avoid noise until we can investigate.
2021-03-30 09:39:45 -07:00
Ryan Nowak 1e23165d1c
Unit testability for timers and reminders (#622)
* Unit testability for timers and reminders

Fixes: #575

This change adds abstractions for Actors timer and reminder
functionality, making them possible to unit test. Previously these
features were wired from the Actor class directly into the client
functionality, and there was no way for a user of actors to write their
own tests when they include this functionality in their code.

Making this work required a lot of munging of basic data types because
we need to *extract* a layer of functionality into a testable API.

I also added a helper method for tests to create an actor host with
mocks attached. We'll likely need to do more in the future to support
testability for actors. I started this process by adding some "unit
test" unit tests. The only way to test that you can test is by testing
:).

----

Additionally I added E2E tests for actors timers and reminders and
improved some of the existing test functionality.

The big investment here is to change the layering of tests to ensure
that we only need to start one instance of the test app at a time.
Previously we'd start and stop the test app as part of the only test we
have. Adding more tests means we want to avoid this overhead when
possible.

This is specifically a challenge for actors since the assocation of an
actor type to an app id is **global state**. We want to keep the app
process we're using for tests long-lived to avoid classic distributed
systems problems (like the host going away) inside our tests.

* Dedupe code for initializing defaults
2021-03-19 10:00:53 -07:00
Aaron Crawfis ac318586a6
Merge pull request #624 from dapr/rynowak/docker-compose
Add local development docs
2021-03-17 09:12:31 -07:00
Ryan Nowak 7a05ea2b81
Merge branch 'master' into rynowak/docker-compose 2021-03-16 20:58:10 -07:00
Ryan Nowak 98c3b3e0c8
Update daprdocs/content/en/dotnet-sdk-docs/dotnet-development/dotnet-development-docker-compose.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
2021-03-16 20:58:00 -07:00
Ryan Nowak a2ee137945
Update daprdocs/content/en/dotnet-sdk-docs/dotnet-development/dotnet-development-docker-compose.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
2021-03-16 20:57:53 -07:00
Ryan Nowak 02ed066ef1
Update daprdocs/content/en/dotnet-sdk-docs/dotnet-development/dotnet-development-dapr-cli.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
2021-03-16 20:57:36 -07:00
Ryan Nowak 4e9d7fd5ac
Update daprdocs/content/en/dotnet-sdk-docs/dotnet-development/dotnet-development-tye.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
2021-03-16 20:57:27 -07:00
Ryan Nowak 245a1280f4
Update daprdocs/content/en/dotnet-sdk-docs/dotnet-development/dotnet-development-tye.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
2021-03-16 20:57:17 -07:00