Commit Graph

65 Commits

Author SHA1 Message Date
ItalyPaleAle 8c7ae10f4c 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-02-17 00:02: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
ItalyPaleAle 8d679f06f9 Working on upgrading from track1 SDKs
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 16:59:27 +00: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 7bcaa46f33 Adding operation field in updatevent
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
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
Pravin Pushkar 7ee92e8f74 address review comments
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-11-18 00:07:59 +05:30
Pravin Pushkar 2fdb1f3e90 address review comments
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-11-15 17:23:54 +05:30
Pravin Pushkar a64a45d208 Address review comments
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-11-15 00:00:43 +05:30
Pravin Pushkar 7295b3acc1 azappconfig incorporate OnlyIfChanged flag from sdk
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-11-11 23:49:23 +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
ItalyPaleAle 65e2dbc363 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-09-23 18:28:38 +00:00
akhilac1 5e58fa4efe change to uuid.NewRandom to avoid panic
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-23 23:20:11 +05:30
akhilac1 fd0d789fe7 Review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-23 23:00:27 +05:30
akhilac1 d013c7505e changed row iteration to use generic method from pgxv5
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-23 17:30:09 +05:30
akhilac1 d569c1776d fixed wrapping error from %s to %w
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-23 14:16:46 +05:30
akhilac1 925e8f32a0 updated timeout
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-22 20:17:41 +05:30
akhilac1 f13fcf1ef3 Merge branch 'postgresql_config_store' of https://github.com/akhilac1/components-contrib into postgresql_config_store 2022-09-22 15:05:35 +05:30
akhilac1 5a06d2d980 fixed review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-22 15:04:50 +05:30
Mukundan Sundararajan 2817724483
Merge branch 'master' into postgresql_config_store 2022-09-22 13:41:16 +05:30
akhilac1 1243970b63 fixed init comment
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-21 21:26:40 +05:30
akhilac1 fff6c5c061 closing review comments on error message text and loop optimization in unsubscribe method
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-21 21:16:56 +05:30
akhilac1 b03c77f2d6 check for maxTimeout to be positive
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-21 14:10:04 +05:30
akhilac1 3408067248 fixed assertion in postgres_test.go
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-20 23:11:20 +05:30
akhilac1 b8574c0ce9 correcting name from trigger to channel to match with standard postgres terminology
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-20 22:54:45 +05:30
akhilac1 37fffb8f89 renamed trigger to channel
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-20 20:28:57 +05:30
Pravin Pushkar 3b19b16d77 fix lint error
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-09-20 18:11:29 +05:30
Pravin Pushkar 1aebaeaa9b Fix getAll configuration Api for azure app config
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
2022-09-20 17:41:55 +05:30
akhilac1 6746680568 fixing review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-20 17:16:03 +05:30
akhilac1 367ed0fb89 fixing review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-20 15:30:54 +05:30
akhilac1 6ddc42d3bd fixed review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-20 15:20:25 +05:30
akhilac1 b14100eb4e change sync.Map to map
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-19 23:25:05 +05:30
akhilac1 bebe2c63e0 removed dead code
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-19 23:03:28 +05:30
akhilac1 724e529b95 Fixing Commits
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-19 16:44:01 +05:30
akhilac1 c3d9e844a7 fixed SQL injection review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-16 14:08:15 +05:30
akhilac1 3935f058db fixed errors identified during functional testing
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-16 14:08:15 +05:30
akhilac1 1e5c5a4ba8 fixed errors identified during functional testing
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-16 14:08:15 +05:30
akhilac1 584c80a667 fixing lint errors
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-16 14:08:15 +05:30
akhilac1 cf413bf8fc updating review comments
Signed-off-by: akhilac1 <chetlapalle.akhila@gmail.com>
2022-09-16 14:08:15 +05:30