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.
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.
* 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
* Improve actor getting started and add more docs
Fixes: #546Fixes: #612
This change runs through the getting started docs and improves trims all
of the unnecessary fat. I've reorganized all of the details that aren't
relevant as part of the first tutorial into separate docs.
I've also fleshed out all of the content we have to be relevant to a new
user and added new sections like DI and logging.
* Update daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-howto.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
* Update daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-howto.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
* Update daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-howto.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
* Update daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-howto.md
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
Co-authored-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
* Fix DaprSecretStoreConfigurationProvider
* Add comment for `SendBulkResponseWithSecrets`.
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Added support for custom delimiters in secret keys.
* Removed hard-coded double underscore delimiter.
* Updated the KeyDelimiters property to use IList.
* Reverted the AddDaprSecretStore keyDelimiters parameter to IEnumerable.
* Fix for build failure due to dumb save issue.
* NormalizeKey Secret Store configuration key.
* Add test.
* Add option to disable NormalizeKey.
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.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.
* Add one more case to troubleshooting guide
Found this was missing with a user's help.
* PR feedback
* Update daprdocs/content/en/dotnet-sdk-docs/dotnet-troubleshooting/dotnet-troubleshooting-pubsub.md