Commit Graph

278 Commits

Author SHA1 Message Date
Yaron Schneider 2a85a7bb6a
set minTLS version (#473)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-11-02 09:30:34 -07:00
Yaron Schneider 29bf88b1b0
adjust test to check for non-tls option failure (#472)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-11-02 08:46:42 -07:00
Yaron Schneider 5eecffa4fa
return block to client (#471)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-11-02 08:27:54 -07:00
Yaron Schneider e920fd9dd9
Add tls support, remove reminder rename tests (#470)
* add tls support, remove reminder rename tests

Signed-off-by: yaron2 <schneider.yaron@live.com>

* update sdk version

Signed-off-by: yaron2 <schneider.yaron@live.com>

---------

Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-11-02 08:07:15 -07:00
Yaron Schneider aa7abc06d9
change sdk-version (#464)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-10-11 16:20:27 -07:00
Yaron Schneider add6b1c6b5
add release version (#459)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2023-10-05 09:35:47 -07:00
Mike 5779353f7a
migrate protos (#439)
* remove clean command for protos

Signed-off-by: mikeee <hey@mike.ee>

* delete internal protos

Signed-off-by: mikeee <hey@mike.ee>

* migrate refs to 1.11.1-rc.2

Signed-off-by: mikeee <hey@mike.ee>

* migrate metadata pb import

Signed-off-by: mikeee <hey@mike.ee>

* bump imports (dapr 1.12.0-rc.4)

Signed-off-by: mikeee <hey@mike.ee>

* fix wait test to allow more than one "client"

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2023-09-26 09:20:08 -07:00
kruthika04 e16e0350a5
Enhance workFlow to add git mod tidy (#458)
Signed-off-by: kruthika04 <km80974@usc.edu>
2023-09-22 13:33:24 -07:00
Sam 5a105f09ac
fix(config): go mod tidy (#448)
Signed-off-by: Samantha Coyle <sam@diagrid.io>
2023-09-14 12:26:07 -07:00
Mike 5e2f457f63
Implement metadata api access to the sidecar (#442)
* Add metadata grpc interface

Signed-off-by: mikeee <hey@mike.ee>

* use errors package

Signed-off-by: mikeee <hey@mike.ee>

* remove allocations and explicitly populate returns

Signed-off-by: mikeee <hey@mike.ee>

* remove examples

Signed-off-by: mikeee <hey@mike.ee>

* lint

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2023-09-11 08:42:44 -07:00
Mike 6c9a8c29c8
Upgrade to golangci-lint to 1.54.2 and updates depguard config interface (#443)
* bump golangci version

Signed-off-by: mikeee <hey@mike.ee>

* refactor depguard config

Signed-off-by: mikeee <hey@mike.ee>

* exclude unused options

Signed-off-by: mikeee <hey@mike.ee>

* remove locale option

Signed-off-by: mikeee <hey@mike.ee>

* reassign iterated variables inside the loops

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2023-09-08 16:33:30 -07:00
Mike 710492a89c
fix actor serialization (#441)
* substitute json encoder with serializer

Signed-off-by: mikeee <hey@mike.ee>

* substitution for custom serializer

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
2023-09-08 16:31:28 -07:00
Daniel_Idoko ad25580bcf
Update Readme.md (#433)
Readme.md file will now contain installation guide for easier usage

Signed-off-by: Daniel_Idoko <info.idoko@gmail.com>
2023-07-31 08:28:54 -07:00
Aaron Crawfis f13a84f883
Add cascading metadata (#435)
Signed-off-by: Aaron Crawfis <Aaron.Crawfis@microsoft.com>
2023-07-31 08:25:15 -07:00
Hannah Hunter fcf9c297d2
add bulk publish back (#419)
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
2023-07-10 09:50:08 +08:00
Hannah Hunter 0a1bb0fa90
[docs] Add query state and actors examples (#431)
* add some examples - need review

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* attempt to add go examples for query state and actors

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* move to a different branch

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

* add back crypto

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>

---------

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
2023-07-10 09:49:21 +08:00
Jabar Asadi 04dc71fc57
chore: update NewClientWithAddressContext doc block (#417)
Signed-off-by: Jabar Asadi <jasadi@d2iq.com>
2023-07-06 06:10:20 -07:00
hunter007 d2cbfe3ce5
Fix useragent to 'dapr-sdk-go/v1.8.0' (#421)
* Upadte version tag

Signed-off-by: hunter007 <wentao79@gmail.com>

* Fix: trim blank in SDKVersion

Signed-off-by: hunter007 <wentao79@gmail.com>

* FIx

Signed-off-by: hunter007 <wentao79@gmail.com>

---------

Signed-off-by: hunter007 <wentao79@gmail.com>
2023-07-06 06:08:37 -07:00
Alessandro (Ale) Segala 4afb8314b9
Fixed: do not require a Content-Length header (#424)
* Fixed: do not require a Content-Length header

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Make getData private

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-07-03 10:44:11 -07:00
hunter007 effc2f0d3c
Add example for dapr grpc proxy mode (#414)
* Add example for dapr grpc proxy mode

Signed-off-by: hunter007 <wentao79@gmail.com>

* Modify README.md

Signed-off-by: hunter007 <wentao79@gmail.com>

---------

Signed-off-by: hunter007 <wentao79@gmail.com>
2023-06-06 12:00:37 +08:00
Hannah Hunter 10b832f741
add cryptography examples (#396)
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
2023-06-05 17:42:25 -07:00
Josh van Leeuwen df5bd08997
Add note about Actor State `WithTTL` being feature preview. (#408)
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-05-29 09:59:51 +08:00
Josh van Leeuwen 942dcb8512
Update protos from dapr/dapr master (#409)
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-05-26 10:11:31 -07:00
Alessandro (Ale) Segala 92c23df717
[Crypto] Implement support for high-level crypto APIs (#387)
* Updated generated protos

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Added encrypt method

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Add Decrypt method

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Working on tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Added unit tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Sync protos

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated protos

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

---------

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-05-26 07:58:35 -07:00
hunter007 b14253b0fe
Pass HTTP headers to ServiceInvocationHandler (#405)
* Pass HTTP headers to ServiceInvocationHandler

Signed-off-by: hunter007 <wentao79@gmail.com>

* unit test

Signed-off-by: hunter007 <wentao79@gmail.com>

* gofmt -s

Signed-off-by: hunter007 <wentao79@gmail.com>

* update go.mod

Signed-off-by: hunter007 <wentao79@gmail.com>

* update go.mod

Signed-off-by: hunter007 <wentao79@gmail.com>

---------

Signed-off-by: hunter007 <wentao79@gmail.com>
2023-05-24 23:06:34 -07:00
Pim Merks b2275e7556
Allow setting own gRPC server when calling `NewService` (#400)
* Add `NewServiceWithGrpcServer` to gRPC service

Signed-off-by: pimmerks <pimmerks@users.noreply.github.com>

* Apply suggestion of not creating new variable

Signed-off-by: pimmerks <pimmerks@users.noreply.github.com>

---------

Signed-off-by: pimmerks <pimmerks@users.noreply.github.com>
2023-05-20 08:01:14 -07:00
hunter007 3929306e36
Update go version to 1.19 (#403)
* update go version to 1.19

Signed-off-by: hunter007 <wentao79@gmail.com>

* add timeout for golangci-lint

Signed-off-by: hunter007 <wentao79@gmail.com>

* fix golangci-lint

Signed-off-by: hunter007 <wentao79@gmail.com>

* use revive instead of goliint in .golangci.yml

Signed-off-by: hunter007 <wentao79@gmail.com>

* if-return: redundant if ...; err != nil check, just return error instead.

Signed-off-by: hunter007 <wentao79@gmail.com>

* fix

Signed-off-by: hunter007 <wentao79@gmail.com>

* update golangci-lint from v1.50.1 to v1.52.2

Signed-off-by: hunter007 <wentao79@gmail.com>

---------

Signed-off-by: hunter007 <wentao79@gmail.com>
2023-05-20 07:36:37 -07:00
hunter007 f6dccfd559
Fix env variable GOVER to "1.20" in validate_examples.yaml (#399)
Signed-off-by: hunter007 <wentao79@gmail.com>
2023-05-18 06:03:03 -07:00
hunter007 678b222072
Update protos and client's configuration methods with stable config api (#391)
* Update protos

Signed-off-by: zhaowentao <wentao79@gmail.com>
Signed-off-by: hunter007 <wentao79@gmail.com>

* update client's configuration methods with stable config api

Signed-off-by: hunter007 <wentao79@gmail.com>

* rename alpha1 to rsp

Signed-off-by: hunter007 <wentao79@gmail.com>

* update go.mod

Signed-off-by: hunter007 <wentao79@gmail.com>

* Update proto

Signed-off-by: hunter007 <wentao79@gmail.com>

* Fix document for examples

Signed-off-by: hunter007 <wentao79@gmail.com>

* base64ed data

Signed-off-by: hunter007 <wentao79@gmail.com>

* Revert "base64ed data"

This reverts commit 0f3b82fe45.

Signed-off-by: hunter007 <wentao79@gmail.com>

* validate configuration

Signed-off-by: hunter007 <wentao79@gmail.com>

* update DAPR_REF in workflows to fix examples

Signed-off-by: hunter007 <wentao79@gmail.com>

* update GOVER from 1.18 to 1.20 in validate_examples.yaml because of dapr/dapr/master branch

Signed-off-by: hunter007 <wentao79@gmail.com>

---------

Signed-off-by: zhaowentao <wentao79@gmail.com>
Signed-off-by: hunter007 <wentao79@gmail.com>
2023-05-17 22:40:52 -07:00
dependabot[bot] 6e75626d37
Bump golang.org/x/net from 0.5.0 to 0.7.0 in /examples/configuration (#362)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 12:27:35 +08:00
dependabot[bot] f3b444df6e
Bump golang.org/x/net from 0.5.0 to 0.7.0 in /examples/hello-world (#361)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 12:26:45 +08:00
Hannah Hunter d485c1775c
add some examples - need review (#386)
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
2023-04-27 16:02:19 -07:00
Taction 9d3e975bc9
use lock instead of once to create default client (#341)
Signed-off-by: zhangchao <zchao9100@gmail.com>
2023-04-27 15:34:22 -07:00
Josh van Leeuwen d58007df4d
Actor state client `SetWithTTL` (#383)
* Adds context to rest of funcs, so context can always be propagated.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Use separate interface for structs with context funcs

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update proto to include actor state transaction metadata

Signed-off-by: joshvanl <me@joshvanl.dev>

* Adds `SetWithTTL` to actor state store manager

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update actor client to support sending metadata. Supports `ttlInSeconds`

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update actor example to use SetWithTTL with note that it should always
be used

Signed-off-by: joshvanl <me@joshvanl.dev>

* Update go modules

Signed-off-by: joshvanl <me@joshvanl.dev>

* Ignore deprecated use of `actor.Server` in `ActorContainer` interface

Signed-off-by: joshvanl <me@joshvanl.dev>

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
2023-04-27 15:31:36 -07:00
Shivam Kumar 99dc3e31d5
update config subscribe method (#389)
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
2023-04-27 15:07:16 -07:00
dependabot[bot] 78a1fe63ea
Bump golang.org/x/net from 0.5.0 to 0.7.0 in /examples/pubsub (#372)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-31 15:24:46 +08:00
Shubham Sharma b48e8ade5b
Add support for bulk publish (#384)
* Initial implementation

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add a response type and more tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Change logic and add more tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add example

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add docs

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix lint

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* gofumpt

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

---------

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2023-03-31 14:57:57 +08:00
Josh van Leeuwen 0cc2c4ce7a
Create `xxxContext` functions for ones which are missing a caller context. (#358)
* Adds context to rest of funcs, so context can always be propagated.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Adds `//nolint:interfacebloat` to StateManager interface due to new
`xxxContext` methods.

Signed-off-by: joshvanl <me@joshvanl.dev>

* Use separate interface for structs with context funcs

Signed-off-by: joshvanl <me@joshvanl.dev>

* Adds more locks to actor functions

Signed-off-by: joshvanl <me@joshvanl.dev>

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
2023-03-29 07:40:51 -07:00
jackycsl 8ba232d2a2
[service/http]switch from Gorilla Mux to Chi (#357)
Signed-off-by: Jacky CSL <jcslmu@gmail.com>
2023-03-21 12:11:22 +08:00
Roberto Rojas 3f795a2171
Fixes SDK_VERSION workflow check condition (#369)
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
2023-02-24 15:21:53 -08:00
Joni Collinge 7c5ecee155
Allow setting grpc options on grpc server (#366)
Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2023-02-24 14:43:32 -08:00
Roberto Rojas 6484b1b7f7
updates sdk version to v1.7.0 (#367)
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
2023-02-23 13:26:37 -08:00
Roberto Rojas d02f9524d9
V1.10 Update Protos & Go Modules (#356)
* updates grpc proto for v1.10

Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>

* updates go mod tidy for v1.10

Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>

---------

Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
2023-02-01 08:35:20 -08:00
longshine cae6fc0130
Return err as nil when replying with DROP status (#349)
Signed-off-by: longshine <longxianghe@gmail.com>

Signed-off-by: longshine <longxianghe@gmail.com>
2023-01-22 16:08:23 -08:00
Sam 4288f414a6
docs: fix link and add periods/spacing (#354)
Signed-off-by: Samantha Coyle <sam@samcoyle.me>

Signed-off-by: Samantha Coyle <sam@samcoyle.me>
2023-01-22 16:07:14 -08:00
Alessandro (Ale) Segala c5377994aa
Various fixes and cleanups (#346)
* Various fixed and cleanups

1. Fixed SDK not compiling and tests failing
2. Increased minimum Go version to 1.18
3. Removed `github.com/pkg/errors` and `go.uber.org/atomic` - replaced with the standard library instead (the old packages have been added to the "depguard" linter)
4. Upgraded all dependencies
5. Upgraded golangci-lint to support Go 1.18+

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Do not wrap error if nil

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Run CI on Go 1.18 and 1.19

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Restore compatibility with Go 1.18

Looks like the newer methods were added in Go 1.19 only

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Should fix validate_examples CI

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated (most) deprecated Actions

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fix helm repo

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Determine latest Dapr version in a better way

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fix validate.sh

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-09 10:38:37 -08:00
Alessandro (Ale) Segala 718044ad12
Report SDK version to Dapr as User-Agent (#328)
* Report SDK version to Dapr

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fixed typos

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fixes

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Making the linter happy-maybe

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Update linter to support go:embed comments

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-16 11:16:10 -08:00
wXwcoder 014b4d6836
fix #326 Differentiating between actor state key not found vs. unexpected error (#333)
* return the specific error type of the actor state, caused by empty key or unmarshal fail

Signed-off-by: wangxw <996268132@qq.com>

* Update state_async_provider.go

change log level of state load

Signed-off-by: wXwcoder <996268132@qq.com>

Signed-off-by: wangxw <996268132@qq.com>
Signed-off-by: wXwcoder <996268132@qq.com>
2022-11-14 13:19:34 +08:00
Tiago Alves Macambira c2dfec6abf
Add wait() method to block until Sidecar is up. (#329)
* Add wait() method to block until Sidecar is up.

App might depend on sidecar right away. This PR adds a Wait() method to
enable app to wait for sidecar to be up before invoking the first call.

GRPC client creation on Dapr Go SDK is blocking, so waiting for client
readiness  is less of a problem here than on SDKs where client
connection establishment is async.

Closes #287

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Move Wait its own file.

If anything, this will make testing and the change more localized.

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Adding unresponsive TCP and Unix servers and tests

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Remove comments, clean code up

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Remove a bit of code duplication on tests

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Fix Wait and test server setup.

* Multiple state changes can happen for a single GRPC Connection.
  previous code assume a single one and was failing miserably. Fixed.
* The logic for the test server's tear down was lacking. Fixed

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Rename on aux. method

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Add link to gRPC documentation about connectivity semantics

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Fixing lint errors

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

* Fixing more lint errors

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
2022-11-02 10:21:15 -07:00
Yaron Schneider b465b1fa07
update protos (#327)
Signed-off-by: yaron2 <schneider.yaron@live.com>

Signed-off-by: yaron2 <schneider.yaron@live.com>
2022-10-04 10:58:45 -07:00