Commit Graph

20 Commits

Author SHA1 Message Date
Josh van Leeuwen d8ac01bc76
Update go -> 1.24.1 & golangci-lint -> 1.64.6 (#3699)
Signed-off-by: joshvanl <me@joshvanl.dev>
2025-03-12 13:50:32 -07:00
Elena Kolevska dae321130c
Merge 1.14 into master (#3579)
Signed-off-by: Samantha Coyle <sam@diagrid.io>
Signed-off-by: Elena Kolevska <elena@kolevska.com>
Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: Artur Souza <asouza.pro@gmail.com>
Signed-off-by: Anton Troshin <anton@diagrid.io>
Co-authored-by: Sam <sam@diagrid.io>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: yaron2 <schneider.yaron@live.com>
Co-authored-by: Anton Troshin <troll.sic@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2024-10-24 16:52:48 -07:00
Bernd Verst b656b0d5d5
Adds EntraID auth support to all Redis Components (#3470)
Signed-off-by: Bernd Verst <github@bernd.dev>
2024-07-01 17:20:29 -07:00
Bernd Verst 9095b0e7e7
Switch to Go 1.21, Updates linter, updates workflows, adds sarama 1.42.1 (#3251)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-11-28 18:13:09 -08:00
Alessandro (Ale) Segala 934e86c4f7
Rename folder "internal" to "common" (#3225)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-11-14 11:36:38 -08:00
Alessandro (Ale) Segala 94cb843d79
Some fixes for Redis Lock component (#3044)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-08-07 16:03:16 -07: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
Bernd Verst a7ac906757
Fix Redis metadata parsing and reporting (#2803)
Signed-off-by: Bernd Verst <github@bernd.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>
Co-authored-by: Tiago Alves Macambira <tmacam@burocrata.org>
2023-04-23 06:28:22 +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
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
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
seachen 5dda098868 feature: add context to lock&pubsub API
Signed-off-by: seachen <seachen@tencent.com>
2022-12-19 09:11:53 +08:00
Bernd Verst 3e08736911
Add support for Redis 7 in all Dapr Components (#2228)
* Add support for Redis 7

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

* Add Redis 7 to conformance tests

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

* automatically detect redis version, make redis7 state conformant

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

* Additions for REDIS without JSON support

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

* Return helpful query API error when missing redis-json

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

* Change Redis 7 port for conformance test

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

* Fix nil reference

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

* Update Redis7 port

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

* Enable ContextTimeoutEnabled for Redis v9 client

Co-Authored-By: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Add timeouts, address code review

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

* Add another timeout

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

* Redis: so much more context

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

* modtidy

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

* fix issue from latest merge

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

* modtidy

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

* Add generic redis nil error

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

* fix redis version check

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

* upgrade redis v9 client

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

* Remove flaky redis v7 pubsub conformance test

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

* modtidy

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

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-16 14:12:11 -08:00
seachen e59dfd63c0 feature: add context to lock&pubsub API
Signed-off-by: seachen <seachen@tencent.com>
2022-12-14 19:37:24 +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
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
Tiago Alves Macambira 2050bb9514
Update code to reflect renaming on UnlockResponse.Status (#1958)
PR dapr/dapr#4989 (issue dapr/dapr#4988) updated the names of some
enums in `UnlockResponse.Status` ProtoBuff definition:

* `LOCK_UNEXIST` became `LOCK_DOES_NOT_EXIST `
* `LOCK_BELONG_TO_OTHERS`  became `LOCK_BELONGS_TO_OTHERS`

Code implementing Distributed Lock component in components-contrib
needs to be updated to account for this modification.

This PR accomplishes this by updating contants mapping back to the
two enums above to match their new names.

Fixes components-contrib#1950

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

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Co-authored-by: Loong Dai <long.dai@intel.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-12 17:49:48 -07:00
seeflood 8f04d5d15d
must have `redisHost` (#1814)
Signed-off-by: seeflood <349895584@qq.com>
2022-06-23 17:06:20 -07:00
seeflood 9bb86a08a6
Expire -> ExpiryInSeconds (#1721)
Signed-off-by: seeflood <349895584@qq.com>
2022-05-12 04:13:21 -07:00
seeflood dc849d40a0
feat: lock component (#1574)
* feat: lock store.
Signed-off-by: seeflood <349895584@qq.com>

* make modtidy-all

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

* lock/redis/standalone.go

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

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-04-24 18:11:13 -07:00