Commit Graph

320 Commits

Author SHA1 Message Date
vinayada1 b31a39bf41 Fix documentation 2020-12-03 13:17:29 -08:00
Yongguang Zhu 1253cbdf71
Includes a gRPC sample (#382)
* 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>
2020-12-02 17:52:43 -08:00
Ryan Nowak e95a5567f2
Implement dependency injection for Actors (#463)
* 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
2020-12-01 10:15:08 -08:00
vinayada1 6a5d8ea09d
remove binaryformatter (#456)
* remove binaryformatter
2020-11-30 16:24:10 -08:00
Ryan Nowak 116d984b4e
Rename and cleanup of HTTPExtension (#488)
* 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
2020-11-30 12:11:44 -08:00
vinayada1 47b59b4a97
remove unused field contenttype (#479) 2020-11-19 11:26:27 -08:00
vinayada1 80f2319fe4
Handle rpc exception thrown for operation cancellation (#455)
* 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>
2020-11-19 11:22:33 -08:00
vinayada1 d0786b4f55
removed ActorTypeInformation public constructor (#480) 2020-11-19 10:59:06 -08:00
Dasith Wijesiriwardena f6f434d6e6
Fluent methods for creating and manipulating HTTPExtension (#473)
* HTTPExtension fluent methods

* add tests

Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
2020-11-17 12:58:02 -08:00
Ryan Nowak 721ea4a1be
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>
2020-11-16 13:00:38 -08:00
vinayada1 6ce5e319fd
fix docs (#475) 2020-11-13 14:02:01 -08:00
vinayada1 d8fa3cdcc4
update proto files for rc release (#468) 2020-11-11 09:57:35 -08:00
Ryan Nowak 7d1fa13101
Make ActorId deserializable (#457)
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.
2020-11-05 15:10:38 -08:00
vinayada1 29d0f7c38c
naming convention (#460) 2020-11-04 14:09:50 -08:00
vinayada1 4c926c9469
Rich error model (#432)
* add InvokeMethodRawAsync and InvokeMethodWithResponseAsync
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2020-10-30 13:59:33 -07:00
vinayada1 0ccddf73ff
Logging changes to use ILogger (#453)
* logging changes to use ILogger

Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2020-10-30 13:09:32 -07:00
Ryan Nowak aa682eb462
Remove async void in tests (#447)
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>
2020-10-29 15:54:17 -07:00
Carlos Mendible 3b1538be9f
Fix: --dapr-http-port param is now --port (#451)
Fixing command:  `--dapr-http-port` parameer is now `--port`

Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
2020-10-29 14:20:02 -07:00
Ryan Nowak bf1d83e68e
Add coverlet output to gitignore (#448)
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.
2020-10-28 12:56:35 -07:00
Aaron Crawfis b07675c001
Merge pull request #449 from dapr/docs-updates
Update Dapr docs links
2020-10-26 15:38:18 -07:00
Aaron Crawfis e79cc88dbd Update Dapr docs links 2020-10-23 11:32:11 -07:00
Charlie Stanley 39f3f71445
Merge pull request #443 from wcs1only/code-coverage
Added codecov integration (#436)
2020-10-20 12:15:11 -07:00
Charlie Stanley ab3f45e7e1 Added codecov integration (#436) 2020-10-19 19:06:21 -07:00
Artur Souza 731234e38d
Adds instructions for release notes in issue templates. (#438) 2020-10-16 14:01:37 -07:00
Ryan Nowak cd781248c7 Remove static instance of ActorRuntime
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.
2020-10-15 16:53:32 -07:00
vinayada1 a061b726b6
use Guid to generate unique Actor id (#428) 2020-10-15 14:18:20 -07:00
Nghia Tran 29af055cb1
Merge pull request #430 from tcnghia/no-set-env
Remove set-env due to CVE-2020-15228
2020-10-15 10:52:45 -07:00
Nghia Tran 0ac85274d4
Merge branch 'master' into no-set-env 2020-10-14 11:25:47 -07:00
vinayada1 2d83efb4c9
grpc exception handling sample (#427)
* rpc exception handling
2020-10-14 10:15:42 -07:00
Nghia Tran 63999da568 Remove set-env due to CVE-2020-15228
Fixes https://github.com/dapr/dotnet-sdk/issues/417
2020-10-13 18:45:45 -07:00
Ryan Nowak 701244e367 Update requirements in readme to reflect reality
- 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
2020-10-10 19:04:00 -07:00
Ryan Nowak 36fc6be9af Document dotnet SDK requirements
This is a hint to tools (and the CLI) about what version of the SDK is
required to work with the repo. This is set up to be as flexible as
possible. 3.1.100 is what's in our instructions already and is the
minimum version usable (since we target .NET Core 3.1).
2020-10-10 19:04:00 -07:00
Ryan Nowak 45ced5613f Remove resource file boilerplate
This spooky XML boilerplate was needed on early versions of .NET Core,
but isn't required in modern versions (we require 3.1.1XX of the SDK
because we target .NET Core 3.1).
2020-10-10 19:04:00 -07:00
Ryan Nowak 51ab7ff181 Stop generating docs in samples and tests
Removes generation of documentation files for samples and tests. This is
a vestige from using the older Stylecop tool in this repo, which needs
the doc files to inspect.

The deleterious effect of this is getting warnings about missing
documentation on samples, and forcing contributors and maintainers to
write nonsense comments to workaround the warning.

Also removed references to stylecop, since we no longer use it.
2020-10-10 19:04:00 -07:00
Ryan Nowak aa95b2ffe4 Workaround .NET SDK bug with pipelines package
This is a workaround for https://github.com/dotnet/sdk/issues/14019
which prevents the current prerelease dotnet SDK
`5.0.100-rc.1.20452.10` from successfully building the repo.

Users attempting to build with the bugged release will see a compiler
error related to the `System.IO.Pipelines` assembly.

The explicit reference to `System.IO.Pipelines` is harmless long term,
but can be removed when the underlying bug is fixed and shipped in a GA
release (likely 5.0.100 GA).
2020-10-09 11:53:55 -07:00
Young Bu Park 3bb6165096
Upgrade grpc to 2.32.0 (#413) 2020-10-07 10:35:57 -07:00
vinayada1 caac517d73
Fix github-release version (#407) (#408) 2020-09-30 15:27:02 -07:00
vinayada1 a55a2cdd08
remove some debug statements from sample (#404) 2020-09-28 13:52:38 -07:00
Edwin van Wijk b3aef53d79
Fix use of marker services in DI registration (#403)
* Fix for issue #390

* Fix unit-test naming

Co-authored-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
2020-09-28 10:24:45 -07:00
Mark Fussell 594021cbed
Create CODEOWNERS 2020-09-25 14:28:32 -07:00
Sander Molenkamp 100dbe9794
Send headers as metadata to sidecar (#397)
* Send headers as metadata to sidecar

* Add HTTP headers test

* Allow different kinds of dictionaries
2020-09-24 16:07:44 -07:00
Edwin van Wijk 55e168fac3
Add ability to specify default DaprClient options to AddDapr (#394)
* Add fix for issue 390

* Move JsonSerializer defaults to DaprClientBuilder ctor

* Update samples to reflect changes

* Update unit-tests to reflect latest changes

* Remove obsolete using statements

* Change internal fields to internal properties

* Change internal fields to internal properties
2020-09-24 10:36:47 -07:00
vinayada1 e93357cb9d
State Transaction API changes (#385)
* State Transaction API changes
* Add the optional fields as per API reference
* Fix review comments
* Added transactional state api to sample
2020-09-17 16:12:50 -07:00
Leon Mai bf0354bd39
Add metadata for get/delete state apis (#383)
Co-authored-by: LM <lemai>
2020-09-01 18:27:17 -07:00
vinayada1 20901cebf5
Test change for nuget push (#377) 2020-08-20 12:14:32 -07:00
Leon Mai 11f6ea45e1
Multi pubsub (#374)
* Prepping for multi pubsub

* Add pubsub name, some cleanup

* multi pubsub changes

Co-authored-by: Aman Bhardwaj <amanbha@microsoft.com>
Co-authored-by: LM <lemai>
2020-08-17 13:58:50 -07:00
Yaron Schneider 6671ab020c
Add bulk get to client (#372)
* Add bulk get to client

* change params, return type, class to struct

* change IList to IReadOnlyList, make parallelism nullable

* change GetBulkItem to BulkStateItem
2020-08-17 09:24:35 -07:00
Gokhan Altinoren aa52a5d6a2
Fixing an issue of a null reference exception where the model binder is checked against a null BindingSource (#371) 2020-08-17 08:57:48 -07:00
Aman Bhardwaj 3b5065f283
Determine assembly, nuget versions based on git tags. (#366)
* Use MinVer for assembly, nuget versioning based on git tags.
* restricting nuget push on certain tags
2020-08-10 13:58:27 -07:00
Aman Bhardwaj 845a982648
update docs for arg changes in cli (#367) 2020-08-10 13:10:04 -07:00