Commit Graph

59 Commits

Author SHA1 Message Date
Alessandro (Ale) Segala b10ce96b49
State stores: expose TTL as a feature (#2987)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-04 09:38:22 -07:00
Alessandro (Ale) Segala d067c13350
Update some dependencies (#2996)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-07-18 23:10:53 +00:00
Alessandro (Ale) Segala ec05809ee6
[Metadata] Update validator and some other fixes (#2984)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-07-17 22:17:22 +00:00
Alexandre b242ef9ec6
feat: close mongo db (#2954)
Fixes #2949
Signed-off-by: Alexandre <alexandreliberato@mailfence.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-30 07:34:34 -07:00
Josh van Leeuwen ff06ae6b33
MongoDB return ttlExpiryTime in GetResponse (#2888)
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2023-06-06 15:18:06 +00:00
Bernd Verst 1d6d90cea6 fix mongo data type json marshaling
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-05-24 22:16:52 -07:00
Alessandro (Ale) Segala 1f27fd0e8b
Add conformance tests for etags in Bulk operations (#2843)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2023-05-17 16:28:29 -07:00
Alessandro (Ale) Segala e30d140479
Remove native/transactional BulkSet/BulkDelete from state stores (#2834)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-05-17 14:56:34 -07:00
Alessandro (Ale) Segala 4f94da95cf
Refactor state store bulk operations (#2747)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-07 19:19:47 +00:00
Bernd Verst cfbac4d794
Refactor of Metadata parsing in Bindings (#2720)
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
Signed-off-by: spike <hello@spike.wiki>
Signed-off-by: zhangchao <zchao9100@gmail.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Signed-off-by: handlerww <handlerww@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Roberto Rojas <robertojrojas@gmail.com>
Co-authored-by: spike <39330606+SpikeWong@users.noreply.github.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Co-authored-by: Yiwen Chen <handlerww@gmail.com>
2023-04-05 22:19:08 +00:00
ItalyPaleAle 2a395395dd Ensure that Params, if set, start with ?
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-04-01 15:16:02 -07:00
ItalyPaleAle 24ff1b6175 MongoDB: Detect replica sets to improve error reporting and bulk operations
Changes the MongoDB state store to detect if it's connected to a replica set.

- When performing BulkSet or BulkDelete operations and connected to a replica set, uses a transaction to perform the operations more correctly (atomically) and faster
- When performing transactions, return an error if not connected to a replica set (the operation would fail, but this short-circuits the effort)

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-31 20:01:05 +00:00
Bernd Verst 575567e30f
Add `connectionString` metadata option for MongoDB (#2659)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-03-14 16:40:17 +00:00
Josh van Leeuwen 4be795d812
Remove `context.TODO()`s with passed context. (#2650)
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-03-08 17:53:02 +00:00
joshvanl 6e1efe2cc9 Use operator `$add` instead of `$addDate` to have compatibility with
older mongodb versions.

Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-22 13:09:47 +00:00
joshvanl 2b3374bd4b Remove `_dapr` prefix from mongodb state store ttl field name
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-21 18:31:24 +00:00
joshvanl de038d5080 Fix gofumpt linting errors
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-20 11:11:18 +00:00
joshvanl db56a28581 Don't case extra allocations. Revert 70s state wait for ttl deletion
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-17 17:46:15 +00:00
Alessandro (Ale) Segala 974d2acd4e
Merge branch 'master' into state-store-ttl-mongodb 2023-02-17 17:37:01 +00:00
joshvanl 9cef173fe6 Fix go vet errors
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-17 15:04:18 +00:00
Josh van Leeuwen d098e38d6a
Propagate context from caller to appropriate places in the code (#2474)
* Propagates contexts to callers where appropriate.

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

* Updates units tests with new func signature

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

* Fix linting errors

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

* Add atomic gate to alicloud rocketmq close channel.

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

* bindings/aws/kinesis use a separate ctx variable name

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

* binding/kafka: use atomic to prevent closing the channel twice

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

* bindings/mqtt3: use atomic bool to prevent close channel being closed multiple times

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

* bindings/mqtt3: use Background context for handle operations:w

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

* state/cocroachdb: add context to Ping()

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

* bindings/postgres: add comment explaining use of context.

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

* Adds comment header to health/pinger.go

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

* pubsub/aws/snssqs: add waitgroup to wait for all go routines to finish
and block on Close(). Shuts down the subscription if there are no topic
handlers.

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

* pubsub/mqtt3: add atomic bool to prevent multiple channel closes. Add
wait group to block close on all goroutines to finish.

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

* pubsub/rabbitmq: fixes race conditions, uses atomic to prevent multiple
closes, add wait group to block close on all goroutines

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

* pubsub/redis: revert ctx passed when it could be cancelled. Add wait
group wait when closing.

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

* state/postges: pass context in init, and wait group on close.

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

* Update all `Ping()` to `PingContext()` where possible.

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

* state/in-memory: add atomic bool to prevent closing channel multiple
times. Add wait group to block on close()

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

* state/mysql: don't use same ctx variable name

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

* Pass correct loop context to redis go routines

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

* Rename context when creating timeouts in state

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

* Remove state.Features() from requiring a context

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

* Revert wasm request handle Close func to be without context to
implement io.Closer interface. Add 5 second timeout. Add io.Closer
assertion in test.

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

* Remove superfluous go lint vet directive

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

* Change Configuration Init function to take context

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

* Updates input binding interface to include a `Close() error` function. `Close`
blocks until all resources have been released and go routines have returned.

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

* Change `Close() error` in input binding struct to `io.Closer` interface.

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

* Update go.mod files to point to dapr/dapr PR https://github.com/dapr/dapr/pull/5831

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

* pubsub/redis: watch closeCh to shutdown worker instead of init context.

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

* pubsub/aws/snssqs + bindings/kubemq: ensure closeCh is caught so Close
correctly returns

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

* Close kubemq binding client on close. Ensure kafka consumer channel
cannot be closed more than once.

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

* Tweaks

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

* Fixed cert tests

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

* binding/mqtt3: add inline Background context instead of passing to
handleMessage

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

* pubsub/mqtt3: remove context from createSubscriberClientOptions

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

* pubsub/mqtt3: Remove `ResetConnection` func

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

* pubsub/kafka: Don't resubscribe if Subscribe is cancelled.

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

* binding/mqtt3: don't use context to control establishing connection

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

* bindings/mqtt3: Fix linting errors

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

---------

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2023-02-16 14:18:35 -08:00
joshvanl 1a3e267d5d Adds review comments. Filter on TTL when getting documents. Add test to
ensure data is deleted.

Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-16 18:18:23 +00:00
joshvanl 7402ff5cf9 Add TTL support to mongodb state store
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-15 16:43:27 +00:00
1046102779 2dd7433a59 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-12-08 15:56:51 +08:00
Bernd Verst ede060959a
Refactors all state store to standardize metadata parsing (#2257) 2022-11-05 15:36:44 -07:00
Alessandro (Ale) Segala ca3e80b76b
Updated depguard linter config (#2245)
* Updated depguard linter config

1. Add older (pre-v4) versions of `github.com/cenkalti/backoff` to the denylist
2. Add `github.com/agrea/ptr` to the denylist (use `github.com/dapr/kit/ptr` instead)
3. Fixed error messages for denied deps

Port of dapr/dapr#5438

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

* ⚙️🧹

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

* Remove some github.com/pkg/errors

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

* make modtidy-all after rebase

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-11-03 22:19:21 -07:00
1046102779 5a367b401a feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 17:25:14 +08:00
Alessandro (Ale) Segala bcea284c7b
Components' init functions should return interfaces (#1997)
* Components' init functions should return interfaces

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

* 💄

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

* pin latest berndverst contrib fork

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fixed component registration in tests

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

* Updated all cert tests

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

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-25 18:27:45 -07:00
Bernd Verst e87cd5e4cb
Go 1.19 support and linter fixes (#1975)
* Go 1.19 support and linter fixes

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update workflows for Go1.19 and new linter version

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Remove unnecessary space in nolint directive

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* disable additional linters which aren't used because of Go generics

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* enable gosec linter again

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/zeebe/command/publish_message_test.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Update bindings/output_binding.go

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Use prepared statement for mysql table creation

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Ping is not ping

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* c'mon linter

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Fix MySQL gosec issue

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* revert mysql to be fixed later

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-18 00:45:23 -07:00
Pravin Pushkar 3f85dd6702
adding query api to the feature list (#1775)
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-06-07 08:38:02 -07:00
Eddie 785ed60ef4
GH-1609 : Fix for MongoDB Atlas conn strings (#1698)
* Update readme of bindings (#1690)

Signed-off-by: pigletfly <wangbing.adam@gmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Fixing includedHeaders problem with spaces (#1610)

Signed-off-by: Ben Kotvis <kotvisbj@gmail.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Simplify vault token read (#1560)

* Simplify vault token get

Signed-off-by: zhangchao <zchao9100@gmail.com>

* fix lint

Signed-off-by: zhangchao <zchao9100@gmail.com>

* update tests

Signed-off-by: zhangchao <zchao9100@gmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: Eddie <eddie@wassef.com>

* GH-1609 : Fix for MongoDB Atlas conn strings

Added recommended fix in the issue

Signed-off-by: Eddie <eddie@wassef.com>

* updating the comment based on PR feedback

Signed-off-by: Eddie <eddie@wassef.com>

* Initial Certification test for eventhubs binding [incomplete] (#1670)

* certification test for eventhubs binding

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* modified go.mod and go.sum

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* Add connection string testing

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* iothub testing

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* address feedback and run test

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* Install Azure CLI IOT hub extension

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* make modtidy-all

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* covering all eventhubs test cases

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

* dependency changes after go modtidy-all

Signed-off-by: tanvigour <tanvi.gour@gmail.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Use revive instead of golint (#1685)

Signed-off-by: pigletfly <wangbing.adam@gmail.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Updated to Go 1.18 (#1697)

* Updated to Go 1.18

Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>

* Added go.work file
With Go 1.18, this allows gopls (the Go language server used for example in VS Code) to work inside test apps too.
See: https://go.dev/doc/tutorial/workspaces

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

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

* Removed go.work

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

* 💄

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

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Add metadata property to configure Batching in Pulsar (#1707)

* Add metadata property to configure BatchingMaxSize&batchingMaxMessages in Pulsar
Signed-off-by: saberwang <saberwang@hotmail.com>

* sort field
Signed-off-by: saberwang <saberwang@hotmail.com>

* [pubsub]fix unit test bug
Signed-off-by: saberwang <saberwang@hotmail.com>

* remove unrelated changes
Signed-off-by: saberwang <saberwang@hotmail.com>

* Delete hard coded Metadata
Signed-off-by: saberwang <saberwang@hotmail.com>

* remove  .history

Signed-off-by: saberwang <saberwang@hotmail.com>

* restore .gitignore

Signed-off-by: saberwang <saberwang@hotmail.com>

* Hard coding default values and adding 'BatchingMaxPublishDelay' metadata

Signed-off-by: saberwang <saberwang@hotmail.com>

* fix code format

Signed-off-by: saberwang <saberwang@hotmail.com>

* formatting code

Signed-off-by: saberwang <saberwang@hotmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Fix 4529: Ignore Subscribe/Get wrong redis configuration type keys. (#1693)

* fix: 4529

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* Fix: add test does not throw error for wrong type during get all test case of redis configuration

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Ian Luo <ian.luo@gmail.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Signed-off-by: Eddie Wassef <eddie@wassef.com>

Fixing leading newline in linter error

Signed-off-by: Eddie <eddie@wassef.com>

* Implment a secret store based on Huawei CSMS (#1710)

Signed-off-by: Chen Cong <chock-cong.chen@outlook.com>

Co-authored-by: Chen Cong <chock-cong.chen@outlook.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Add yet another missing secret to eventhub binding cert test (#1713)

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Support custom queueEndpoint in Azure Storage Queues (#1692)

* Support custom queueEndpoint in Azure Storage Queues

Signed-off-by: Janusz Dziurzynski <janusz@corechain.tech>

* run gofmt

Signed-off-by: Janusz Dziurzynski <janusz@corechain.tech>

* Add "Url" to JSON field name for clarity

Suggested by @msfussell in dapr/docs#2424

Signed-off-by: Janusz Dziurzynski <janusz@corechain.tech>
Signed-off-by: Eddie <eddie@wassef.com>

* Refactory kafka binding to reuse the kafka common code extracting from kafka pubsub component (#1696)

* refactory kafka pubsub code to extract common kafka code for reuse

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* fix lint;add unit test for subscribeAdapter

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* move topics filed from internal kafak struct to pubsub kafka struct, since in input binding the topics will confiured in metadata

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* reuse internal  kafka code for bindings

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* add redis standalone_test back which is delete by mistaken

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* small code improvement to trigger test

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* add license headers

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* try to set disbaleTls to true to verify the kafka connection fail

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* don't enable consum retry in kafka binding component;if authenticaion is disabled, need not set TLSDisable at the same time;

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

* fix lint

Signed-off-by: Sky Ao <aoxiaojian@gmail.com>

Co-authored-by: Loong Dai <long.dai@intel.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Add topic metadata for mqtt input binding and support user defined topic for mqtt output binding (#1674)

* feat(bindings/mqtt): add data incoming topic to metadata

Signed-off-by: lotuc <lotu.c@outlook.com>

* feat(bindings/mqtt): support user defined topic on create action

Signed-off-by: lotuc <lotu.c@outlook.com>

* chore(bindings/mqtt): add integration test and topic response check test

Signed-off-by: lotuc <lotu.c@outlook.com>

* fix(bindings/mqtt): ignore misspell linting error for word mosquitto

Signed-off-by: lotuc <lotu.c@outlook.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: Eddie <eddie@wassef.com>

* Expire -> ExpiryInSeconds (#1721)

Signed-off-by: seeflood <349895584@qq.com>
Signed-off-by: Eddie <eddie@wassef.com>

* running gofmt -s -w state/mongodb/mongodb.go

Signed-off-by: Eddie <eddie@wassef.com>

* Update mongodb.go

Co-authored-by: Wang Bing <wangbing.adam@gmail.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Ben Kotvis <kotvisbj@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: tanvigour <60332928+tanvigour@users.noreply.github.com>
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: saber-wang <45062099+saber-wang@users.noreply.github.com>
Co-authored-by: Laurence <45508533+LaurenceLiZhixin@users.noreply.github.com>
Co-authored-by: Ian Luo <ian.luo@gmail.com>
Co-authored-by: Chock Chen <46557936+ChenCong0207@users.noreply.github.com>
Co-authored-by: Chen Cong <chock-cong.chen@outlook.com>
Co-authored-by: Janusz Dziurzynski <janusz@forserial.org>
Co-authored-by: Sky Ao <aoxiaojian@gmail.com>
Co-authored-by: lotuc <lotu.c@outlook.com>
Co-authored-by: seeflood <349895584@qq.com>
2022-05-13 16:13:13 -07:00
Mukundan Sundararajan 80fda909e8 fix conf tests.
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-03-25 21:26:21 +05:30
Bernd Verst 8a3cd8446c fix mongodb get request
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-03-24 18:27:45 -07:00
Mukundan Sundararajan 83914e8eed marshall mongodb bson into relaxed json
Signed-off-by: Mukundan Sundararajan <msundar.ms@outlook.com>
2022-03-16 02:21:53 +05:30
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Dmitry Shmulevich e369fec17e
Add StateStore query API (#1153)
Add StateStore query API implementation for MongoDB, CosmosDB
2021-10-18 13:55:26 -07:00
Bernd Verst ac85ba2a8e
Add dapr user agent for Azure Components (#1152)
* Add dapr useragent for Service Bus and EventHubs

* Add useragent for tablestorage

* send dapr useragent

* more user agents

* formatting
2021-09-27 17:04:27 -07:00
Long Dai 988fed05ab
ci: standard linter config (#1102)
* ci: standard linter config

Signed-off-by: Long <long.dai@intel.com>

* Update utils.go

* fix pulsar issue

Signed-off-by: Long <long.dai@intel.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-21 15:21:59 -07:00
Long Dai 10a2e5ee85
state: correct FIRST_WRITE (#995)
* state: correct FIRST_WRITE

Signed-off-by: Long Dai <long0dai@foxmail.com>

* add a test case

Signed-off-by: Long <long0dai@foxmail.com>
2021-08-03 17:26:45 -07:00
Dmitry Shmulevich 1ac87d93c5
Add more tests for MongoDB state store component (#948) 2021-06-16 13:51:35 -07:00
Dmitry Shmulevich 1580e4ab04
Add 'server' field to MongoDB metadata to support DNS seedlist connection format. (#947)
*  for non-empty `server` field, the connection URI is set to 'mongodb+srv://<server>/'

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-06-16 11:32:22 -07:00
문찬용 b387fcdff3
add Ping operation to`store` interface. (#757)
* add `Ping` operation.

* add `Ping` implementation of GA components

* add context to an argument for Ping

* add `Ping` implementation of blobstorage

* fix error string for passing lint

* Update blobstorage.go

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-05-25 23:48:46 -07:00
Phil Kedy 688df9bda4
Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807) 2021-04-19 12:06:10 -07:00
Artur Souza 931048aa60
Add Feature list for state store. (#744)
* Add Feature list for state store.

* List Transactional as a feature for state store.

* Fixing comments about etag.
2021-03-05 14:55:23 -08:00
Phil Kedy a15c616bb0
Make state.GetResponse ETag to a *string (#733)
* Make state.GetResponse ETag to a *string

* Small fixes post merge of #716

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-03-03 13:28:59 -08:00
halspang cb3c881d39
Add ETag operation to statestore conformance test (#716)
* Add ETag operation to statestore conformance test

ETags are used to enable concurrency guarantees and are part of the
statestore specification. Not all stores need to use them, however
if the store chooses to, it should be part of the certification
process. This commit adds a simple ETag test scenario that verifies
the basic behaviors of ETags.

https://github.com/dapr/components-contrib/issues/711

* Update tests.yml

* Error on mongodb when etag does not match on delete.

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-03-03 12:27:10 -08:00
Artur Souza a8de09faf4
Adds etag support to MongoDB. (#729)
* Adds etag support to MongoDB.

* Addressing PR comments.

* Remove empty etag check.
2021-03-01 15:02:28 -08:00
Artur Souza 2562908dee
Conf state trx + Change mongodb get result for key not found + Fix byte[] in cosmosdb (#680)
* Add state transaction conf test.

* Does not return error for key not found in mongodb.

* Rewrite state conf test.

* Handle []byte in cosmosdb state txn (#664)

Fixes: dapr/dotnet-sdk#579

The issue here is that we had missed the case of pre-marshaled bytes in
the state transaction code path, which would result in the encoding/json
package doing it's normal thing and base64 encoding the data as a JSON
string.

The fix is to use json.RawMessage to avoid that. Turns out this code can
be simplified a bit.

* Fix cosmosdb handling of byte[].

* Fix lint.

* Fix UT for cosmosdb.

* Remove config from state store conf test.

Co-authored-by: Ryan Nowak <nowakra@gmail.com>
2021-02-10 18:15:59 -08:00
Yaron Schneider 3ef025c604
change headers (#679) 2021-02-09 18:57:55 -08:00
Sky/敖小剑 5dc3587f7d
Add bulk get in state store - Plan B (#532)
* add BulkGet method on state store

* add a bool value in bulk get method to tell dapr if this store supports bulk get or not

* add  BulkGetResponse for bulk get; rollback GetResponse to remove new added filed key

* update to use BulkGetResponse for bulk get

* fix lint issues

* fix lint issues

* fix lnit issues
2020-11-26 23:07:27 -08:00