Commit Graph

508 Commits

Author SHA1 Message Date
Alessandro (Ale) Segala 99219b6731
SQL Server: case-insensitive matching for `database` in connstring (#2694)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-23 17:34:33 +00:00
MregXN def1dca6c2
Create component metadata for state.postgresql (#2695)
Signed-off-by: MregXN <46479059+MregXN@users.noreply.github.com>
2023-03-23 09:24:16 -07:00
Alessandro (Ale) Segala 3cd727a562
Crypto building block: core parts (#2690)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-23 00:51:27 +00:00
Josh van Leeuwen 76e33137d9
Adds TTL support to SQL Server using SQL Cleanup Strategy (#2682)
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-03-20 20:04:17 +00:00
taenyang 6692168301
Add etcd state store (#2671)
Signed-off-by: taenyang <taenyang@outlook.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-16 16:40:08 +00:00
ItalyPaleAle c20ab76972 Merge branch 'master' of https://github.com/dapr/components-contrib into merge-release-1.10-master
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-03-15 19:25:12 +00:00
MregXN c8df937286
Create component metadata for state.redis (#2669)
Signed-off-by: MregXN <mregxn@gmail.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-03-15 09:57:24 -07: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 85feb7c3d7
Consolidate SQL expired date garbage collector (#2633)
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>
2023-03-09 16:40:58 +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
Bernd Verst 6e588f1a45 Add warning to Redis State Store: Do not use Actor State
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-03-06 14:42:16 -08:00
Josh van Leeuwen acb4418271
Consolidate CockroachDB and PostgreSQL into single internal implementation (#2632)
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-03-06 21:49:49 +00:00
Josh van Leeuwen 4827d5d119
Adds TTL support to the CockroachDB state. (#2618)
Signed-off-by: joshvanl <me@joshvanl.dev>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-03-03 14:36:40 +00:00
ItalyPaleAle 2916e53a72 WIP
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-27 21:28:08 +00:00
Bernd Verst 3a616c5678 Remove Track 1 SDK references
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-02-27 12:44:32 -08:00
Bernd Verst 4068531538
Merge branch 'master' into metadata 2023-02-22 16:46:43 -08: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
Artur Souza 2cbe96ba98
Merge branch 'master' into state-store-ttl-mongodb 2023-02-20 19:44:26 -08:00
joshvanl de038d5080 Fix gofumpt linting errors
Signed-off-by: joshvanl <me@joshvanl.dev>
2023-02-20 11:11:18 +00:00
ItalyPaleAle 55b6a04805 Merge branch 'master' of https://github.com/dapr/components-contrib into newdeps
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 21:20:45 +00:00
Alessandro (Ale) Segala a6c37184c2
Merge branch 'master' into state-store-ttl-mongodb 2023-02-17 20:41:12 +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
ItalyPaleAle bc47aa3049 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 00:59:25 +00:00
ItalyPaleAle a484d7ebc7 Merge branch 'master' of https://github.com/dapr/components-contrib into newdeps
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 23:35:28 +00:00
ItalyPaleAle f9cf54ca6f Merge branch 'master' of https://github.com/dapr/components-contrib into release-1.10
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 23: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
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
ItalyPaleAle a8957062f0 Fixed tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 01:42:05 +00:00
ItalyPaleAle 2a6407d5b2 Updated memcached SDK which contains a Close() method
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 00:27:25 +00:00
ItalyPaleAle 6f30dbf6c6 Updated Azure Event Hubs and Azure Blob Storage SDKs
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-16 00:21:56 +00:00
ItalyPaleAle 643a2abff2 Removed go.uber.org/atomic and github.com/pkg/errors
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-15 19:56:20 +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
Bernd Verst b1c1304a86 Add and update component metadata definition files
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-02-13 17:09:09 -08:00
ItalyPaleAle 9920d53f93 Changed SQLite metadata parsing per review feedback
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-08 23:05:01 +00:00
ItalyPaleAle 9855e94ed8 Fixed test
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-04 00:47:18 +00:00
ItalyPaleAle fd6e7ef1f1 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-04 00:45:31 +00:00
ItalyPaleAle 95aa6fcbf1 Maintain CleanupIntervalInSeconds for backwards-compatibility
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-04 00:43:58 +00:00
ItalyPaleAle c88cec451c Added tests for migrations
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-04 00:13:43 +00:00
ItalyPaleAle 6bee9b6192 Fixed tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 23:34:31 +00:00
ItalyPaleAle 603eaab8ea Fixed: for in-memory DBs, we must use cache=shared
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 23:31:16 +00:00
ItalyPaleAle 12dbd1db6f Working on TTL tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 23:15:15 +00:00
ItalyPaleAle 38f29a6ff2 Use regular transactions
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 22:40:03 +00:00
ItalyPaleAle 89720a909d Fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 22:31:23 +00:00
ItalyPaleAle 42d7309244 Concurrency control for TTL cleanup
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 21:53:50 +00:00
ItalyPaleAle aba965751c Fixed read-only DBS
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 21:04:34 +00:00
ItalyPaleAle e8eec3f4c4 WIP
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 20:09:40 +00:00
ItalyPaleAle 99989cad02 Added metadata table
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 19:21:03 +00:00
ItalyPaleAle 86a6da559d Unit tests for getConnectionString
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 18:48:45 +00:00
ItalyPaleAle 5811cb0dba Metadata options to control journaling and WAL
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 18:19:12 +00:00
ItalyPaleAle 37cee72884 WIP: certification test
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 01:41:02 +00:00
ItalyPaleAle 5aca0aed1b Updated locking used in SQLite
Rather than relying on mutexes which are specific to each process, uses the "native" SQLite locks and transactions

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-03 00:28:22 +00:00
ItalyPaleAle e47772c32e SQlite: do not create an index on expiration_time by default
This makes SQLite behave more like Postgres, where the "expiration_time" column does not have an index by default.

For an explanation on why: https://v1-10.docs.dapr.io/reference/components-reference/supported-state-stores/setup-postgresql/#ttls-and-cleanups

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-30 21:37:40 +00:00
Bernd Verst 60f5c3de32 do not include boolean in exported json
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-01-26 14:20:04 -08:00
Bernd Verst 92b7d60b99 support flexible casing for some properties
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-01-26 14:00:24 -08:00
Bernd Verst fc7e5d7084 GCP Firestore State Store: Add to skip indexing
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-01-26 13:58:56 -08:00
ItalyPaleAle 6f71753c13 New SQLite 3 state store
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-24 17:39:11 -08:00
Bernd Verst 9645d6b223 Update Aerospike statestore dependencies
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-01-23 14:22:52 -08:00
Bernd Verst 7accf82129 Replace deprecated zookeeper library
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-01-23 10:14:11 -08:00
Roberto J Rojas 4f5a9c94ed fixes partition key incorrect implementation
Signed-off-by: Roberto J Rojas <robertojrojas@gmail.com>
2023-01-09 19:26:32 -05:00
Roberto Rojas 0158e438d0
Merge branch 'master' into metada-partition-key-2388 2022-12-30 10:05:47 -05:00
Bernd Verst 3efab74b51
Merge branch 'master' into postgres-pgx 2022-12-29 12:34:21 -08:00
Marcos Candeia b8226c174f Expose parsefilter function
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
2022-12-27 14:56:11 -03:00
Roberto Rojas d47933553a fixes linting
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 17:21:51 -05:00
Roberto Rojas de94416285 adds TestBulkDelete test
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 16:28:18 -05:00
Roberto Rojas 2aa3f602dc adds TestDelete test
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 16:25:41 -05:00
Roberto Rojas af7e1f9bab adds TestBulkSet test
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 16:22:35 -05:00
Roberto Rojas 87e271579f adds TestSet test
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 16:17:39 -05:00
Roberto Rojas 32975d04ad adds metadata field partition key
Signed-off-by: Roberto Rojas <robertojrojas@gmail.com>
2022-12-23 16:07:17 -05:00
Alessandro (Ale) Segala ae48594e7e
Merge branch 'master' into postgres-pgx 2022-12-22 15:39:08 -08:00
ItalyPaleAle b42e70606c 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-22 23:38:55 +00:00
ItalyPaleAle b70a17ed59 DRY
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-22 19:53:27 +00:00
ItalyPaleAle 8a58434660 Make timeout configurable
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-22 19:49:20 +00:00
ItalyPaleAle 80b1bb14b7 Changed postgres state store to use pgx instead of db/sql
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-20 22:45:38 +00:00
ItalyPaleAle 280c35ed58 Workers KV: add TTL support
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-19 18:50:59 +00:00
ItalyPaleAle 135d460b05 Configurable timeouts
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-19 17:46:54 +00:00
ItalyPaleAle 6aa9ccc364 Binding -> CFBinding
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-19 17:39:30 +00:00
ItalyPaleAle 416aa46157 Added provisional links to docs
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-19 17:37:14 +00:00
ItalyPaleAle 2446a698cb Renamed KV -> Workers KV to be consistent with branding
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-19 17:35:53 +00:00
Bernd Verst adc7bd8ca5
Merge branch 'master' into cfqueues-binding
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-12-16 14:46:03 -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
ItalyPaleAle 120f1a437d Comply with the updated interface for state stores
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-14 00:34:06 +00:00
ItalyPaleAle b1cc54f62c Merge branch 'master' of https://github.com/dapr/components-contrib into postgres-ttl
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-13 21:16:57 +00:00
ItalyPaleAle 76ff7a11b6 Merge branch 'master' of https://github.com/dapr/components-contrib into cfqueues-binding 2022-12-13 11:11:15 -08:00
ItalyPaleAle a1c863d7fd Small fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-13 10:11:36 -08:00
ItalyPaleAle 308f3c987c 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-13 10:02:42 -08:00
ItalyPaleAle fabf7fe5a7 No need for the KV namespace name
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-13 02:42:33 +00:00
ItalyPaleAle 47db769066 Add Cloudflare KV state store
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-13 01:52:06 +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
ItalyPaleAle f718462d23 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-06 01:30:29 +00:00
ItalyPaleAle 413ee92d88 We don't need locks when we do things atomically
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-06 01:27:17 +00:00
ItalyPaleAle 64a70c230c Fixed handling of concurrent background cleanups and added cert tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-06 01:24:22 +00:00
ItalyPaleAle d4dcc54e29 Improved concurrency handling for migrations
And added cert test for that

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-05 21:00:31 +00:00
ItalyPaleAle 0b340d11d3 Cleanup interval uses metadata table to avoid multiple executions simultaneously
Also bug fixes

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-01 19:31:23 +00:00
ItalyPaleAle b782b520aa Merge branch 'master' of https://github.com/dapr/components-contrib into postgres-ttl 2022-12-01 19:17:41 +00:00
ItalyPaleAle b52482b394 Use a metadata table for postgres to store migrations
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-30 23:02:58 +00:00
Ryan Lettieri 46fabfa0fe
Creation of Certification Test for CockroachDB (#2222)
* First commit of cockroachDB cert test but it has some errors when stopping/starting container

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Creation of CockroachDB certification test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Removing ping function from cockroachDB deleteValue func

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Spelling mistake and moving Ping function in cockroachDB into Init method

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* First set of updates for cockroachDB cert PR

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* More updates to cockroachDB cert test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Lint fix for cockrochdb

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixes to go.mod and go.som files for cockroachDB

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Renaming variable for number of connection retry attempts

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Removing ttl from cockroach metadata in test

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating go.mod files to master and updating retry in cockroachDB

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Ryan Lettieri <ryanLettieri@microsoft.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-29 09:35:48 -08:00
Bernd Verst efa96b26ed
Merge branch 'master' into postgres-ttl 2022-11-28 17:57:53 -08:00
Bernd Verst b76192b4f7
Merge branch 'master' into azblobbindingtrack2 2022-11-28 16:19:58 -08:00
Ryan Lettieri c736bcc506 Hotfix for StateTransactionRequest with etag crash
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-11-28 15:27:14 -08:00
Bernd Verst 2dc64721e8
Merge branch 'master' into azblobbindingtrack2 2022-11-22 16:14:06 -08:00
Alessandro (Ale) Segala b042e87127
Merge branch 'master' into postgres-ttl
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-21 21:57:57 -08:00
Alessandro (Ale) Segala 4dde34c2d1
Fix state.in-memory and enable conformance tests (#2303)
* Fix state.in-memory and enable conf tests

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

* Fixed unit tests

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>
2022-11-21 21:53:51 -08:00
ItalyPaleAle 15976110c6 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 04:53:24 +00:00
ItalyPaleAle 1c3a0a1ea2 Fixed query
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 03:22:54 +00:00
ItalyPaleAle 2e7d5e7df6 Added garbage collection
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 02:05:07 +00:00
ItalyPaleAle c54286a60d Added TTL support for postgres
TODO: garbage collection
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 00:24:04 +00:00
ItalyPaleAle a6eb406fc2 Extracted common ParseTTL method
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-21 23:43:28 +00:00
ItalyPaleAle ca729de1a9 Add expiredate column to state table
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-21 23:22:57 +00:00
Bernd Verst 23d36a08d7 more refactoring and address code review
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-18 17:56:02 -08:00
Bernd Verst 8811d5e64f AzBlob components: Extract shared code
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-17 21:37:17 -08:00
Bernd Verst 70eb9f3a9c Address code review comments
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-17 20:35:05 -08:00
Bernd Verst 7ccca4def8 AzBlob State: Migrate to Track2 SDK
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-17 19:55:02 -08:00
ItalyPaleAle 1e728597b4 Misc refactorings
- Removed `state.DeleteWithOptions` and `state.SetWithOptions` which were useless at this point (likely a leftover from when there were retries)
- Some improvements in etag handling in postgres
- Other minor refactorings

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-17 16:29:29 +00:00
Bernd Verst b7d56fd7d6 Postgresql: allow custom table table
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-16 20:13:57 -08:00
Bernd Verst 3af0953516 Postgres State Store: Add Support for First-Write concurrency
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-16 20:13:57 -08:00
Bernd Verst 483e8b96bc Add user agent to table storage state store
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-15 16:49:56 -08:00
Bernd Verst 2698482f34 Add user agent back to Cosmos DB state store
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-15 14:55:20 -08:00
Bernd Verst 462e2faadc Upgrade linter and fix linter issues
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-11 13:19:57 -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
ItalyPaleAle f7a01e65b0 Merge branch 'master' of https://github.com/dapr/components-contrib into feature/state_context1021
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-01 21:45:59 +00:00
ItalyPaleAle 5c65015987 Fixed unit tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-01 19:48:28 +00:00
ItalyPaleAle f412ecfbc9 Avoid logging PII
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-01 19:25:57 +00:00
ItalyPaleAle 8c617817a8 Fixed: MySQL was not actually using transactions
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-01 16:53:34 +00:00
ItalyPaleAle c5847890ee Added timeouts to operations
Using new metadata option timeoutInSeconds

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-01 16:43:22 +00:00
ItalyPaleAle 576c62b0f1 Added tests for metadata properties schemaName/tableName
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-01 16:27:16 +00:00
1046102779 d546dbd7b4 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-11-01 09:25:01 +08:00
1046102779 203c6c7757 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-25 07:21:35 +08:00
1046102779 8bc4286cdf feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-24 11:04:48 +08:00
1046102779 1ed4c39d8c feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-24 10:16:21 +08:00
1046102779 614a2d8c65 feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 19:31:18 +08:00
1046102779 5a367b401a feature: add context to state API
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 17:25:14 +08:00
Bernd Verst b9654bd979 upgrade to v5 of jackc/pgx
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-10-10 15:08:07 -07:00
Alessandro (Ale) Segala f15a50581d
Component metadata schema and tools (#2077)
* Component metadata schema and tools

Includes tools to generate and validate components' schema, and a CI check to ensure the schema is always up-to-date.

Also, includes schemas for 4 components as a starter

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

* Changed version as requested

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

* fix workflow

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>
2022-09-27 10:44:54 -07:00
Dapr Bot 33ee68aee6
Merge branch 'master' into memcached_certification_i1929-rebased 2022-09-23 13:56:07 -07:00
Bernd Verst ea219576df
Apply suggestions from code review
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-09-23 13:42:45 -07:00
Ryan Lettieri 02645149b5 Changing greater than symbol to greater than or equals logic in cosmos statestore
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-23 14:27:06 -06:00
Ryan Lettieri 93708273d4 Removing page size option from cosmos statestore
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-23 14:15:41 -06:00
Ryan Lettieri 0b8d937ccd Fixing page limit on cosmosdb
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-23 14:04:15 -06:00
Tiago Alves Macambira 8e4af0a3a4 Certification tests for MemCached State Store component.
* Add network instability tests.
* Fixed gofumpt issues.
* Addresses TTL translation from Dapr and Memcache domains.

    Memcached uses `0` as the non-expiring marker TTL.
    [src](https://github.com/memcached/memcached/wiki/Commands#set).

    On the other hand, Dapr uses `-1` for that.
    [src](https://docs.dapr.io/developing-applications/building-blocks/state-management/state-store-ttl/)

    This PR updates certification and memcached code and tests so Dapr -1 (and negative)
    values are translated to Memcached's `0`.

Closes #1929

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
2022-09-22 18:26:55 -07:00
Ryan Lettieri aa0228becd Cleaning up transactional code in cosmosdb statestore
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-16 15:04:30 -06:00
ItalyPaleAle 3c2e82a0e7 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-09-16 20:49:14 +00:00
ItalyPaleAle cec34b9a95 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-09-16 20:44:40 +00:00
ItalyPaleAle 0ed1a8acf0 Misc fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-09-16 20:32:02 +00:00
ItalyPaleAle fd881e20f7 Use dapr/kit/ptr instead of old ptr
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-09-16 19:41:48 +00:00
Ryan Lettieri 79c039c08d Using helper method to grab partition key or default to empty string
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-16 12:44:06 -06:00
Ryan Lettieri 097737f6cd Adding timeout to transactional batch in comsosdb statestore
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-15 16:58:09 -06:00