* Adding in track2 SDK support for CosmosDB Bindings
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Removing non needed ID check
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
* Addressing container read operation
Signed-off-by: Ryan Lettieri <67934986+RyanLettieri@users.noreply.github.com>
* Updating linting
Signed-off-by: Ryan Lettieri <67934986+RyanLettieri@users.noreply.github.com>
Co-authored-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* binding.eventhub: use same name schema for storage leases like on pubsub.eventhub
Signed-off-by: Christian Leinweber <christian.leinweber@maibornwolff.de>
* binding.eventhub: rename AzureEventshub local var
Signed-off-by: Christian Leinweber <christian.leinweber@maibornwolff.de>
This is the last part of the "shutdown sequence fix": it allows shutting down input bindings before output ones.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Improvements to bindings.dingtalk.webhook
Spin-off from PR adding contexts to input bindings
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Should not have been added
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@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>
Ensure context propagation in PutItem and other minor changes
Spin-off from PR adding contexts to input bindings
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* improve log of kafkaf components cert test
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* add close() method to kafka binding component to fix the consumer rebalance bug
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Moved ASB subscription code to a shared package
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Moved ASBQ binding to use the shared ASB implementation
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Updating Azure Service Bus SDK version
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Make Service Bus attempt to reconnect forever in case of issues
With exponential back-off configurable between min and max time. Fixes#1612
Also includes fixes:
- Binding: make sure it actually retries to connect forever
- Binding: add delay (exponential backoff) before reconnecting
- PubSub: better handling of failures such as topics disabled or other non-connection issues
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Added warning for deprecated metadata options
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Updated sendgrid binding to add the option to add names for the to and from addresses. This commit relates to #1749
Signed-off-by: Adam Rahja <adam@resolve.com>
* Updated sendgrid binding from code suggestion.
Signed-off-by: Adam Rahja <adam@resolve.com>
This commit is related to dapr/dapr#4624. As noted there, we have an issue in the runtime where all components are shut down after the grace period, when the app is likely already stopped. Because of that, certain input components (the subscribe part of pubsub and the input part of bindings - the latter not in scope of this PR), can continue bringing new work when it's known to fail.
In order to fix the issue linked above properly, we need to implement a way for PubSub components to have the "publish" part closed before the "subscribe" one (and in the future that will need to be done for input bindings too).
This commit achieves precisely that by adding a context in the Subscribe method. When that context is canceled (which can be at any time), the subscription is removed.
PS: This API change was implemented so it can one day be used for dapr/dapr#814 too, as it allows canceling individual subscriptions by using a different context. Although that's not possible today because it requires more work on the runtime, it does implement everything that's needed in the pubsub components already.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Tweaks for ASB pubsub:
1. Do not attempt to reconnect when context was canceled
2. Message finalization uses a background context and not the running ctx, in case the app is shutting down
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* ASB: abandoned messages shouldn't be retried right away
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Ported fixes to servicebusqueues binding too
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Use a different approach to limit the number of messages processed in case of error
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Added maxRetriableErrorsPerSec to servicebusqueues binding too
Incl other improvements
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Do not reconnect to ASB every time we retrieve a message.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* ⚙️
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Updated to Go 1.18
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Updated Azure SDKs that are on track2
Includes some minor refactoring of auth code
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Updated Service Bus components to track2 SDK
Co-authored-by: halspang <halspang@microsoft.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Initial Certification test for eventhubs binding [incomplete] (#1670)
* certification test for eventhubs binding
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* modified go.mod and go.sum
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* Add connection string testing
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* iothub testing
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* address feedback and run test
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* Install Azure CLI IOT hub extension
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* make modtidy-all
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* covering all eventhubs test cases
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
* dependency changes after go modtidy-all
Signed-off-by: tanvigour <tanvi.gour@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Use revive instead of golint (#1685)
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Updated to Go 1.18 (#1697)
* Updated to Go 1.18
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
* Added go.work file
With Go 1.18, this allows gopls (the Go language server used for example in VS Code) to work inside test apps too.
See: https://go.dev/doc/tutorial/workspaces
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Removed go.work
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* 💄 & 🧹
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* Add metadata property to configure Batching in Pulsar (#1707)
* Add metadata property to configure BatchingMaxSize&batchingMaxMessages in Pulsar
Signed-off-by: saberwang <saberwang@hotmail.com>
* sort field
Signed-off-by: saberwang <saberwang@hotmail.com>
* [pubsub]fix unit test bug
Signed-off-by: saberwang <saberwang@hotmail.com>
* remove unrelated changes
Signed-off-by: saberwang <saberwang@hotmail.com>
* Delete hard coded Metadata
Signed-off-by: saberwang <saberwang@hotmail.com>
* remove .history
Signed-off-by: saberwang <saberwang@hotmail.com>
* restore .gitignore
Signed-off-by: saberwang <saberwang@hotmail.com>
* Hard coding default values and adding 'BatchingMaxPublishDelay' metadata
Signed-off-by: saberwang <saberwang@hotmail.com>
* fix code format
Signed-off-by: saberwang <saberwang@hotmail.com>
* formatting code
Signed-off-by: saberwang <saberwang@hotmail.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* This test can't work with track2 SDKs
The methods to create a message with a body are not exported
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* 🧹
Signed-off-by: Alessandro Segala (ItalyPaleAle) <43508+ItalyPaleAle@users.noreply.github.com>
* There's such thing as too much logging
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Refactored subscription.go
This greatly simplifies certain parts of the code, reducing the number of goroutines and likely improving performance.
Performance for end-users improves too as there's no need anymore to pause for 2 seconds every time that we reach `maxActiveMessages`.
Additionally, with this change the config options `prefetchCount` and `maxActiveMessagesRecoveryInSec` are removed as unnecessary anymore.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fixed pubsub tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* These packages should have never been upgraded
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Ensuring we don't fetch 1 message more than max active
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Adding configurable timeout for servicebusqueues operations
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Persistent connection for invoking SB queues
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Reverted Event Hub SDK update
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Revert "Reverted Event Hub SDK update"
This reverts commit 212220aba0.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fix Azure deploy for users with a first.last email
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Added some sleep that should help reduce flakiness in eventhubs binding cert test
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Changed servicebusqueue cert test
In case of a failure in the handler (ie. users' code), the message should be correctly re-enqueued, which means that messages will be re-delivered later and won't be in order.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: halspang <halspang@microsoft.com>
Co-authored-by: tanvigour <60332928+tanvigour@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Wang Bing <wangbing.adam@gmail.com>
Co-authored-by: saber-wang <45062099+saber-wang@users.noreply.github.com>
* feat(bindings/mqtt): add data incoming topic to metadata
Signed-off-by: lotuc <lotu.c@outlook.com>
* feat(bindings/mqtt): support user defined topic on create action
Signed-off-by: lotuc <lotu.c@outlook.com>
* chore(bindings/mqtt): add integration test and topic response check test
Signed-off-by: lotuc <lotu.c@outlook.com>
* fix(bindings/mqtt): ignore misspell linting error for word mosquitto
Signed-off-by: lotuc <lotu.c@outlook.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
* refactory kafka pubsub code to extract common kafka code for reuse
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* fix lint;add unit test for subscribeAdapter
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* move topics filed from internal kafak struct to pubsub kafka struct, since in input binding the topics will confiured in metadata
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* reuse internal kafka code for bindings
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* add redis standalone_test back which is delete by mistaken
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* small code improvement to trigger test
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* add license headers
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* try to set disbaleTls to true to verify the kafka connection fail
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* don't enable consum retry in kafka binding component;if authenticaion is disabled, need not set TLSDisable at the same time;
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
* fix lint
Signed-off-by: Sky Ao <aoxiaojian@gmail.com>
Co-authored-by: Loong Dai <long.dai@intel.com>
* Support custom queueEndpoint in Azure Storage Queues
Signed-off-by: Janusz Dziurzynski <janusz@corechain.tech>
* run gofmt
Signed-off-by: Janusz Dziurzynski <janusz@corechain.tech>
* Add "Url" to JSON field name for clarity
Suggested by @msfussell in dapr/docs#2424
Signed-off-by: Janusz Dziurzynski <janusz@corechain.tech>
* Updated to Go 1.18
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
* Added go.work file
With Go 1.18, this allows gopls (the Go language server used for example in VS Code) to work inside test apps too.
See: https://go.dev/doc/tutorial/workspaces
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Removed go.work
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Upgrade nacos version
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Run go mod tidy all
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* Add MaxSize to settings
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
* binding kafka: check if topics are not empty before reading
Signed-off-by: Tim Burkert <burkert.tim@gmail.com>
* binding kafka: log warning instead of returning error
Signed-off-by: Tim Burkert <burkert.tim@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* add S3ForcePathStyle support for s3 binding
Signed-off-by: rainfd <rainfd@live.cn>
* add S3ForcePathStyle unit test
Signed-off-by: rainfd <rainfd@live.cn>
* Adds retry on CosmosDB Init in case of TooManyRequests error
* Use backoff v4
* missed some permanent errors
* clean up go.mod
* fix error type casting
* Add constant for HTTP 429
* Move Service Bus Pubsub/Binding to common auth
Both the pubsub and input/output binding for Azure Service Bus were
connecting via a connection string. This is still supported but will
now fallback to using AAD from the common auth library. This is also
the recommended auth pattern going forward.
* Move AMPQ specific auth and fix linter issues
* Make conn string and namespace mutually exclusive
* Move resourceName to a constant
* Update auth_amqp.go
* Update auth.go
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
There is an internal race condition in MQTT client Publish method when
configured with autoreconnect (default) where the call can fail if the
connection is broken right after the outgoing event is queued but before
the dead connection is blocked.
This change mitigates that on the Dapr side with a limited retry loop
3 times at fixed 200ms interval as a patch before the Dapr resiliency
feature is introduced that exposes more generalized retry controls to
the dev.
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* Authentication for new Azure SDK
* Updated keyvault to use new Azure SDK
* 🙈
* Update authentication/azure/auth.go
* Update authentication/azure/auth.go
* Update authentication/azure/auth.go
* Reintroduce changes from PR 1132 without updating ASB
* Lint 💄
* Marking contexts as TODO as they'll need a timeout
As per conversation with @berndverst
* Update certification tests with no auth libraries
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Fix warning in smtp binding when user and password are set
* Remove nolint comment
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
This fixes a problem with the body of e-mail messages sent by the
SMTP binding.
When the SMTP binding was invoked over GRPC it would not translate the
data of the request to the right format in the e-mail. Instead it would
send an empty body. When the SMTP binding was invoked over HTTP it would
correctly unquote the data of the request.
Update bindings.mqtt component to avoid deadlocking on Close() when the
app-provided message handler is blocked.
- Run the app-provided message handler in a separate goroutine so that
the wrapper handler function it passes to the mqtt library can be
canceled.
- Cancel the read context to terminate any in flight message handling
before calling Disconnect() in Close()
We reconnect/retry forever now in Azure Service Bus Queue binding
while reading. We have to reconnect for every error because the
errors that surface from the client involve connection issues.
* cosmosdb binding - not as flexible as I'd like
conformance tests now pass
* add tests for new UUID injection logic
* Use nested property as partition key value
* avoid repeated string constants
* Disable Identification Hydrator to avoid struct requirement
* Remove struct
* Simplify PR
* Add comments ofor code maintenance
Azure Service Bus Queue names are case-insensitive. When one is
created it will always be forced to lowercase. If a queue with a
non-lowercase is provided, it will be created but can never be
matched causing the next Init to fail.
https://github.com/dapr/components-contrib/issues/1185
* Adding `initialOffset` option to Kafka binding and pubsub components
* Only allow oldest and newest
* Fix tests
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Support Azure AD auth for Cosmos DB
* Fixed linting errors
* Tidying go.sum
* Removed the need for nolint:shadow
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
- Update azure-event-hubs-go dependency to currently supported v3 with
IoT Hub SystemProperties.
- Write Event.SystemProperties to ReadResponse.Metadata for EventHubs
input binding.
- Write Event.SystemProperties to NewMessage.Metadata for EventHubs
pubsub.
* fix: Mysql should support more data types. #923
* go fmt
* fix lint issue
* revise according to the review comment
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Update Zeebe to version 1.0
* Fix lint error regarding import
* Don't panic on error
* Log error as string
* Pass reason msg to process engine on fail job command
* Pass job specific variables as headers to a worker
* Fix formatting issue
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Move pubsub redis client to internal
* Add failover for common redis. Refactor state redis.
* refactor binding redis
* fix lint
* Refactor to setting partten
* fix db and lint
* fix lint
* for backward compatibility
* Using a type alias to handle decoding duration values of -1 for Redis.
* Linter fixes
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
* mqtt: implement Close
Signed-off-by: Long Dai <long0dai@foxmail.com>
* feedback
Signed-off-by: Long Dai <long0dai@foxmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Add bindings dingtalk-webhook
* Fix lint
* Fixing logger dependency
* Updated tests
* Tweaks to use the "settings pattern"
* Make webhooks global again
* Update sync.map to built-in map and RWMutex
* Fixing linter errors
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Add bindings rocketmq
* Fix lint
* Update parseMetadata
* Update logger import
* Tweaks to use "the settings pattern"
* Add back off policy configuration
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* no message
* Switching over usages of retry to the new package and making use of the DecodeConfig function
* Added decoding configuration using settings with a specific prefix
* Linter fixes
* Fixing linter error
* time.Sleep is the enemy
* Fix typo in comment
* Moving config to a pointer parameter so that the component can pass in the config with default values that make sense for that component.
* Renamed config struct
* Fix comment
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* master:
add handle timeout to cancel req for it would be redelivered (#832)
Add optional metadata param maxLen for redis stream PubSub component (#835)
Implement bindings for the Zeebe workflow engine (#806)
Automerge in contrib. (#849)
# Conflicts:
# go.mod
# go.sum
# pubsub/redis/redis.go
* Implement bindings for the Zeebe workflow engine
* Fix PR suggestion regarding error handling
* Refactor cancel_instance test to not use a mocking library
* Refactor all tests to not use a mocking library
* Use error vars
* Fix linting error regarding ineffective error assignment
* Check for mandatory jobType
* Remove double method call
* Fix suggestion regarding mock client instantiation
* Check if either bpmnProcessId or workflowKey is given for workflow instantiation
* Changed logger module to dapr/kit. Misc tweaks.
* Fix go.mod
* Fixing some lint errors
* Ignoring linter false positive
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
resolve conflict
* master:
Increasing overall test timeout to allow for conformance tests to run (#834)
Improve SMTP binding performance (#782)
add redis cluter mode for pubsub (#823)
downgrade the verbosity of lock renewal errors from warn to debug. This error is expected when messages are processed before beingrenewed (#803)
Improve pulsar publisher performance. (#827)
optimze(state/redis): output detail redis error (#825)
Consul nameresolution component (#750)
Add DNS name resolver. Add unit tests. (#743)
Azure Service Bus: Changed log level of error on close to info (#830)
Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807)
Update state/blobstorage.go to add metadata. (#786)
Azure Service Bus publishing retries when server is "too busy" (#821)
# Conflicts:
# bindings/redis/redis.go
# go.mod
# go.sum
# pubsub/redis/redis.go
* Introduced localstorage binding
* Code cleanup
* Linter cleanup
* Linter cleanup
* Now using ioutil.ReadAll() as io.ReadAll() fails to build on Windows
* Renamed metadata field
* Now returning the filename on create
* Now only generating a UUID filename for creates
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Introduced localstorage binding
* Code cleanup
* Linter cleanup
* Linter cleanup
* Now using ioutil.ReadAll() as io.ReadAll() fails to build on Windows
* Renamed metadata field
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* no message
* Removing HTTP input binding from conformance test
* Moving // nolint: noctx
* Fixed linter issue
* Tweaks
* Tweak
* Setting request headers from metadata
* More comments and handling of non-200 response codes
* Fixing conformance test for HTTP
* Temporarily bumping up redis timeouts
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Charlie Stanley <charlie.stanley@microsoft.com>
* mysql outbinding support
* fix lint issues
* use time duration string instead of number of seconds
* correct typo
* use 'addr' instead of 'server' and 'port' in order to align with url in dsn format
* simplify configuration, and allow PEM configurable
* jsonfy the query result
* add more unit test for mysql binding
* add unit test to verify timestamp
* add type verify in integration test
* add test to verify BOOLEAN
* update comment
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Create Apple Push Notification Output Binding
I created the apns package and created apns.go to implement the output
binding to send push notifications to Apple devices using the Apple Push
Notification Service.
* Refactor Code
I refactored and cleaned up the source code in apns.go. I made the code
easier to read and understand. I split out the JWT generation into
authorization_builder.go. I split out the create operation code into
create_operation.go and refactored it to follow a pipeline pattern.
I created doc.go and added documentation for how to use the APNS binding
to send push notifications to Apple devices.
* Fix Lint Issuer
I corrected issues reported by golangci-lint in the pull request. I ran
gofumpt against the test cases for the APNs binding. I fixed a naming
error in create_operation.go.
* Address Review Comment
I revised extractKeyID in apns.go to address a readability concern in
the code. I simplified the if/else block to make the logic easier to
understand.
* Add License Header to APNs Binding
I added the standard Microsoft copyright and MIT license header to the
source files for the APNs binding. This was requested from the PR
review.
* Revise APNS.extractTeamID for Readability
Per a PR comment, I revised the APNS.extractTeamID function to make the
function more readable.
* Revise APNS Create Operation
I revised the APNS create operation based on discussions in the PR
(#481). I deleted create_operation.go and merged the code back into the
main APNS type to simplify the code.
* Fix Linter Errors
I fixed linter errors reported in apns.go.
* Fix Code Review Comments
I switched from using encoding/json for JSON encoding and decoding to
using jsoniter.
I updated authorization_builder.go to define the expiration period as a
constant and provided a comment describing the need for and use of the
expiration period.
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Mark Chmarny <mchmarny@users.noreply.github.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
* rethinkdb state store
* added actor state change binding
* updated db record
* reconnect
* passing lint
* updated binding repsonse keys
* rethinkdb load test
* lint validated tests
* updated comments
* updates TransactionalStateRequest
* parameterized table
* correct error message
Co-authored-by: Young Bu Park <youngp@microsoft.com>
* update logger form nats-io's to dapr's
* run go mod tidy and go mod delete the nats-io gnatsd
* update rabbitmq prefetch feature because want to set each instance the number of messages could hold in once until ack.
* update for parse int
* update parseMetadata of rabbitMQ to read prefetchCount by string.
* [update rabbitMQ binding parseMetadata] Make error clear
* [in rabbitMQ metadata parse] fix the bug of golint
* update rabbitMQ with a new parseMetadata way.
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Change Kubernetes client to official go-client in the events binding.
* Change adding flags to init
* go mod tidy
* Proper call for handler
* Remove commented out code
* Refactor indentation
* Use shared sqs auth package
* Goimports-ed files
* Added support for endpoint param in aws credentials abstraction, since the sqs-sns pubsub module required it
* Added endpoint support for all aws things
* Updated tests
* Use implicit creds by default, explicit if specified
* Remove log lines
* Support implicit region as well
* gofmt-ed file
* removed a newline
* Use a separate package for aws auth stuff
* Rename + alias imports
* gofmt
* goimportsed file
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* event grid udpates
* Initial event grid input binding
* Added Write() support to EventGrid component
* Updated eventgrid binding to use fasthttp instead of net/http
* Fixed linting issue in EventGrid binding
* Tidy up go.mod
* Added handshakePort to allow custom port for EG callback
* Now properly throwing an http 500 on handler err
* Updated event grid sdk for cloud event 1.0 support
Added support for all event grid sources via scope
Now validating required metadata on read/write
* Updated tests
* Fixed linting issue
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* event grid udpates
* Initial event grid input binding
* Added Write() support to EventGrid component
* Updated eventgrid binding to use fasthttp instead of net/http
* Fixed linting issue in EventGrid binding
* Tidy up go.mod
* Added handshakePort to allow custom port for EG callback
* Now properly throwing an http 500 on handler err
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Added first cut of SendGrid binding
* Removed some junk
* tidy up based on PR review comments
Removed duped line, and logging, normalised error messages
* Silly mistakes on emailTo and subject checks
* Moving to new twilio folder structure
* adds BCC and CC, better error handling
* microscopic comment typo
* linter was complaining
* removing my accidental docs commit
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
* Add message ttl for Azure Service Bus/Storage Queue
and RabbitMQ
* Rename metadata key to ttlInSeconds
Move defaultQueueTTL to RabbitMQ metadata
* Move integration tests to own files
* Add +build integration_test tag
* Remove integration test skip
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
* Object storage implementation for AliCloud
* linting fixes
* fixed comments and ran "go mod tidy" based on the feedback
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
* Need to change the AppResponse struct to have the store name and state requests separately to support multiple state stores support in Dapr.
This is needed to support this requirement : dapr/dapr#636
* Putting the state in a separate struct
* Reverting the last commit - and keeping the things simple, just adding the storeName in the struct
* folders and files
* boilerplate added
* write queue done
parse metadata done
* refactor of init and write
* All done
* lint updates
* Additional lint fixes
* lint simplifications
* UPdated to make testable
Make read blocking
* working tests
* linting fix
* Added backoff so we dont eat CPU
* go mod tidy to fix error
* fixed test failures
* Fixed lint error
* Add Azure SignalR binding
* Fixes from go lint
* Go lint
* Use "github.com/dgrijalva/jwt-go" for jwt
Fix bug parsing connection string
Normalize usage of len vs == in strings
* Consistent usage of http header Set
Changing the names of the packages directory so to be consistent with name of the company .
It is to be noted that package name can not have hyphen "-" in the name.
So changing the directory names and putting under company names.
For example - dynamodb package would be
dapr/components-contrib/bindings/aws/dynamodb
* Initial commit
* Fixed all linting error
* Used prepared query instead of string format
* Enabled linter for test
Enabled below linters
- gochecknoglobals
- gochecknoinits
* Enabled below linters
- godox
- interfacer
- maligned
* Revert name change for StateStore in pkg state
* Incorporate review comments
* Cleanup the github ci
* Correct typo
* Add golangci-lint version in github ci step
* Update Readme.md