Fixes: #53
This API was intended to query the state store for all existing state
entries for the actor. However support for this in the dapr runtime has
not be implemented. We're removing this API to avoid confusion since
it does not behave as expected. We can revisit this in the future based
on feedback.
Fixes: #410
This change removes code that would write the exception message and call
stack to the response body when a non-remoting invoke is used. While
this kind of thing can be helpful for debugging, the best thing to do is
actually just let the exception bubble. This allows users to use the
ASP.NET Core error handling features that are much richer and have
security related guidance built-in.
* state operation overload with meta #412
* added metadata to bulk state
* getStateAndEtag with metadata test
* an -> a keyvalue pair
* Added GetBulkStateAsync_ValidateRequest
* update
* update
* removed backup files
* metadata docs
* state store metadata docs
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
Fixes: #434
This change introduces new APIs for registering Actors DI and with
the HTTP pipeline based on the ASP.NET Core Startup.cs model. This
replaces `UseActors()` in Program.cs and delivers better integration
between the ASP.NET Core framework and Actors.
The bug that motivated this change was that the actors HTTP handlers
were separate from the application's main routing table. This meant that
certain routing patterns were totally broken (such as Blazor Server)
when used in the same project as actors. There was no real way to fix
this without a change in how we register the framework to make it more
consistent with other features that build on ASP.NET Core.
We've had a list of linting-related messages piling up for a while now.
This change bulk-applies these suggestions with usually relate to
simplification or use or newer language features like ??=
The only changes I did manually here are:
Removing some usage of Task.GetAwaiter().GetResult() where it was
just laziness
Removing some dead code in methods and parameters of internal APIs.
* 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>
* Implement dependency injection for Actors
Fixes: #171
This change allows Actors to accept dependency-injected services through
constructor parameters.
There are numerous breaking changes in this PR that are visible to user
code. In most cases these are simplifications.
For example the Actor base class accepted 3 constructor parameters,
which meant that every subclass (every actor type) also had 3 constructor
parameters. This isn't fun and becomes way less fun now that users can
add their own constructor parameters in a meaningful way.
As another example, we had multiple places where "runtime options" lived
that had different interaction patterns. Now there's a single options
type and you interactive with it through UseActors(...).
* address PR feedback
* React to API change
* Rename and cleanup of HTTPExtension
Fixes: #421
This change renames `HTTPExtension`->`HttpInvocationOptions`. This is more
idiomatic in .NET and reflects existing naming conventions (options or
settings for parameters).
Also changes to use the `System.Net.Http.HttpMethod` type for the http
method, and globally prefer the term `method` over `verb`. Every .NET
API that I'm aware of uses 'method', as does rfc7231.
* One more rename
* Handle cancelled cancellation token
* add UTs
* add secrets UT
* fix review comments
* invoke and await in one call
* fix await
* Add test for multiple calls to UseActors (#459)
Fixes: #411
The bug was actually addressed in PR #453 - this change adds a test that
verifies that we actually fixed it.
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
* use grpcChannelOptions ThrowOperationCanceledOnCancellation
* Add doc
* add link to doc
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
Fixes: #411
The bug was actually addressed in PR #453 - this change adds a test that
verifies that we actually fixed it.
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Fixes: #444
ActorId doesn't define a default constructor, and so it's not
deserializable via System.Text.Json.
This change implements a converter so that ActorId's API shape can work
with the serializer properly.
I added an integration test for ActorReference as well, but no library
changes we needed for that, ActorId was the blocker.
Fixes: #446
`async void` is almost always a bug in server-side programming. If these
tests were doing any networking then they would encounter concurrency
bugs or crash in the event of an exception.
Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Makes sure we exclude the generated `coverage.json` files from git. We
don't want these to get accidentally committed if someone is running
coverage on their own machine.
Contributes to: #416
This change removes a mutable static instance - this is low-hanging
fruit design improvement and helps us make these features more flexible
in the future.
- remove references to specific VS versions (these will quickly become
stale and can be confusing because VS wants you to live on the latest
version).
- include mac/linux instructions