Commit Graph

95 Commits

Author SHA1 Message Date
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 f4e73b0e65
Update dapr/kit (#3205)
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-11-02 16:20:56 -07:00
Shivam Kumar 7a5397f05a
bulk subscribe support in azure eventhubs (#3011) 2023-08-14 23:36:28 -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
Alessandro (Ale) Segala cef854fab6
Some linting in metadata.yaml files (#2977)
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-07-11 01:53:58 +00:00
Arturo Trenard ef4780beaa
Pubsub pluggable component bulkpublish (#2931)
Signed-off-by: arturo <jarturotrenard@gmail.com>
Signed-off-by: arturo <ajt@ptytechnologies.com>
Signed-off-by: Arturo Trenard <jarturotrenard@gmail.com>
Co-authored-by: arturo <ajt@ptytechnologies.com>
2023-06-22 15:14:18 +00:00
Yash Nisar 75239e051e
Add component metadata YAML for Azure Event Hubs pubsub (#2788)
Signed-off-by: Yash Nisar <yashnisar@microsoft.com>
Co-authored-by: Bernd Verst <github@bernd.dev>
2023-04-24 10:04:43 -07:00
Bernd Verst 2b89d78a2d
Refactor Metadata Parsing of all PubSub Components (#2759)
Signed-off-by: Bernd Verst <github@bernd.dev>
2023-04-09 18:21:56 +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 232c8d813f Working on binding
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-21 19:28:00 +00:00
ItalyPaleAle 857a865e4e Moved implementation to shared package
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-21 01:14:04 +00:00
ItalyPaleAle ab7f9aa509 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 23:20:58 +00:00
ItalyPaleAle a0251482c2 Create the storage container if it doesn't exist (to preserve compatibility with old SDK's behavior)
Also fixes to tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 23:09:48 +00:00
ItalyPaleAle c76526c805 Fixed unit tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 21:34:55 +00:00
ItalyPaleAle 827c949c99 Address review comments
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 21:34:03 +00:00
ItalyPaleAle d97dac3b98 Fixes for Azure AD auth
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 20:37:59 +00:00
ItalyPaleAle c83919a49d Removed vendored conn library
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 19:34:01 +00:00
ItalyPaleAle 0649d5fae9 Updated tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 19:00:15 +00:00
ItalyPaleAle 462d7a95be Remove old file
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 18:10:40 +00:00
ItalyPaleAle 7153e75549 Do not.... crash twice
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 17:53:38 +00:00
ItalyPaleAle 2c98c8ef25 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 17:50:05 +00:00
ItalyPaleAle fcfcbe9d87 Handle smooth upgrade from Track 1 SDKs
(If you consider crashing Dapr on purpose "smooth" 🤣)

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 17:46:38 +00: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
ItalyPaleAle 01e7d4167b Do not retry forever by default
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 04:24:35 +00:00
ItalyPaleAle 885fb5a2d4 Re-implemented BulkPublish
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 04:15:18 +00:00
ItalyPaleAle 9729c155c1 Retry failed messages + other fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 00:47:24 +00:00
ItalyPaleAle c10173b29f Added entity management
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-20 00:18:22 +00:00
ItalyPaleAle 4c12f40534 WIP
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-19 22:33:50 +00:00
ItalyPaleAle 445f2e4940 Receiving events
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-19 21:36:20 +00:00
ItalyPaleAle 093669e8a8 WIP
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-19 20:12:00 +00:00
ItalyPaleAle 48dd1dabef Working on subscribing
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-19 01:27:48 +00:00
ItalyPaleAle 0157bf0b72 WIP
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-19 00:12:10 +00:00
ItalyPaleAle 9ef0bb9441 mapstructure fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-10 20:41:50 +00:00
ItalyPaleAle eaa74d77d9 Metadata parsing
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2023-01-10 18:51:50 +00:00
Bernd Verst e794fb9529
Merge branch 'master' into master 2022-12-28 16:42:34 -08:00
Mukundan Sundararajan cff6d7b6b1 Merge remote-tracking branch 'upstream/master' into optimize-bulkpubres-struct 2022-12-20 23:04:19 +05:30
mecoding1 6237f4eada
Fix lint issues for eventhubs_integration_test.go
Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com>
2022-12-20 18:56:10 +05:30
mecoding1 64b1a599ca
Fix lint issues across the file
Fix lint issues across the file

Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com>
2022-12-20 12:37:41 +05:30
Bernd Verst a7d1e9e250
Merge branch 'master' into master 2022-12-19 15:02:32 -08:00
mecoding1 0f6aedfd1c
Fix linting issue
Fix linting issue

Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com>
2022-12-19 14:44:04 +05:30
Bernd Verst 16e1be02d1
Merge branch 'master' into master 2022-12-16 11:54:51 -08:00
Mukundan Sundararajan 0841b3d846 Merge branch 'master' into optimize-bulkpubres-struct 2022-12-15 23:00:34 +05:30
seachen 1ea2cff9fd feature: add context to lock&pubsub API
Signed-off-by: seachen <seachen@tencent.com>
2022-12-15 09:53:32 +08:00
Bernd Verst 64a2c3aad1 Revert "revert amqp changes, eventhubs library update"
This reverts commit b236279d81.
2022-12-14 16:19:06 -08:00
Bernd Verst b236279d81 revert amqp changes, eventhubs library update
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-12-14 15:05:56 -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
Bernd Verst fce17f592e Update SDKs again
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-12-13 12:27:40 -08:00
Mukundan Sundararajan 72695529f6 optimize bulk pub response to contain only failed entries
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
2022-12-13 11:49:04 +05:30
mecoding1 71d7acb506
Fix lint issue for eventshub.go
Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com>
2022-11-23 10:48:59 +05:30