Commit Graph

30 Commits

Author SHA1 Message Date
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
Shivam Kumar 7d24bfa000
Update Go SDK version in certification tests (#2825)
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
2023-05-02 16:09:20 +00:00
Shivam Kumar 20edac1b82
Internal redis component in config store (#2807)
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-04-28 14:43:19 -07:00
Tiago Alves Macambira 5128594307
Add component metadata YAML for bindings.redis. (#2796)
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Co-authored-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-04-24 21:59:05 +00:00
Tiago Alves Macambira e9af969b48
Add component metadata YAML for configuration.redis. (#2793)
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
2023-04-18 16:51:08 -07: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
Bernd Verst 2266e7ad44
Standardize metadata parsing in configstores and lockstore (#2710)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-03-25 22:34:48 +00:00
Shivam Kumar 997e6f49d5
Certification test for redis config store (#2431)
Signed-off-by: shivam <shivamkm07@gmail.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Bernd Verst <github@bernd.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-03-14 00:23:23 +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
Shivam Kumar ef0090b6c0
Update configuration/redis/redis.go
Co-authored-by: Pravin Pushkar <ppushkar@microsoft.com>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
2023-01-16 15:04:03 +05:30
shivam d1aeb1dfc4 Updating unit tests
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-10 09:54:26 +05:30
shivam 874c11ac2a Adding redisDB metadata
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-10 09:54:23 +05:30
shivam c0504b422f Removing operation from Updatevent
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-09 20:43:41 +05:30
shivam aa3ca47ffc Modifying unit test case for non-existent key
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-09 10:47:13 +05:30
shivam e9d9449a2c Handling non-existing key scenario in get
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-09 10:47:13 +05:30
shivam 256cd8915e Fix linter errors
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-09 10:47:13 +05:30
shivam bad0c3c83d Handling delete event in redis config store
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-09 10:47:13 +05:30
shivam 3e51c9ceb4 Fix Redis: Correctly stopping all goroutines at unsubscribe
Signed-off-by: shivam <shivamkm07@gmail.com>
2023-01-09 10:47:13 +05:30
Bernd Verst ede060959a
Refactors all state store to standardize metadata parsing (#2257) 2022-11-05 15:36:44 -07:00
Pravin Pushkar 443a9d6b1b fix redis subscribe all keys
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-10-06 17:05:27 +05:30
Pravin Pushkar 23acfa50ca
Azure Appconfig configuration store - Subscribe and Unsubscribe impl (#2088) 2022-09-28 10:52:12 -07:00
Alessandro (Ale) Segala b566232f67
Remove recover from Redis config store (#2124)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-09-23 21:59:50 -07:00
Ian Luo b4ac2406c0
fix: Converting configuration API response from an array to dictionary (#1771)
* fix: Converting configuration API response from an array to dictionary #1770

Signed-off-by: Ian Luo <ian.luo@gmail.com>

* fix compilation error in unit test

Signed-off-by: Ian Luo <ian.luo@gmail.com>

* fix lint issue

Signed-off-by: Ian Luo <ian.luo@gmail.com>

* Also update appconfig configuration store to return dict

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

* temporarily pin custom dapr/dapr

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

* modtidy-all

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

* remove embedded stream request body option

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

* pin custom go-sdk with config dict change

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

Signed-off-by: Ian Luo <ian.luo@gmail.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Loong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-25 13:35:02 -07:00
Marcos Candeia 8964d8bf41
Define common metadata across components (#1994)
* Add base metadata for all components

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Fix lint issues on consul and mysql tests

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Pin candeia/dapr runtime version

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Add replace directive to use mcandeia/dapr on all go submodules

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

* Fixed runtime config instantiation

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>

Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
2022-08-25 10:10:53 -07:00
Laurence e0ea27f2c1
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>
2022-05-07 14:15:07 -07:00
Laurence 41a5a08894
Fix: unsubscribe by id (#1483)
* Fix: unsubscribe by id

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

* fix: linter

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

* fix: UnSubscribe to Unsubscribe

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

* fix: mod tidy all

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

* Fix: change uuid repo

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

* Fix: mod tidy

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

Co-authored-by: Looong Dai <long.dai@intel.com>
2022-02-17 06:41:36 -08:00
Laurence 2bf7f68e0c
Fix: add configuration unsubscribe api (#1440)
Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
2022-01-20 22:18:57 -08:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Laurence 53c6ed7636
fix: add config subscription gr done (#1315)
* fix: add config subscription gr done

* unexpected comments

* fix comment

Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-11-29 11:54:00 -08:00
Laurence a21897bc81
add config api (#1113)
* add config api

* fix: add ut

* fix: linter

* fix

* fix: some pr comments

* fix: go mod tidy

* fix: ut

* Update redis_value.go

* Update redis_value_test.go

* Update redis_test.go

* Update requests.go

* Update responses.go

* Update redis_value.go

* Update redis_value_test.go

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Long Dai <long.dai@intel.com>
2021-10-19 13:55:38 -07:00