Commit Graph

178 Commits

Author SHA1 Message Date
Alessandro (Ale) Segala cedaacbb7c
Make metadata keys uniform for Azure Storage components (#1837)
* Make metadata keys uniform for Azure Storage components

By using aliases we are preserving backwards-compatibility

Fixes #1832

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

* Updated bindings.azure.storagequeues too

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

* Updated state.azure.tablestorage too

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>

Co-authored-by: Loong Dai <long.dai@intel.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-07-01 12:05:11 -07:00
Alessandro (Ale) Segala 1010f9c7ee
Ensure context propagation in signalr Invoke (#1827)
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>
2022-06-30 18:37:29 -07:00
ItalyPaleAle 14a9103bec Improvements to blobstorage binding
Spin-off from PR adding contexts to input bindings

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-06-29 19:55:02 +00:00
Alessandro (Ale) Segala a08988c25e
Shared implementation for Azure Service Bus subscriptions for binding and pubsub (#1791)
* 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>
2022-06-17 15:12:15 -07:00
Bernd Verst f25b26fc0c
Upgrade to Azure Table Storage Track 2 SDK in State Store and add CosmosDB Table API support (#1792)
* Upgrade to Azure Table Storage Track 2 SDK in State Store

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>

* don't panic

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

* fix error parsing

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

* Adds support for empty rowKeys again

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

* Pin aztables v1.0.1

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

* Add support for Cosmos DB Table API

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

* Add Azure Table Storage CosmosDB conformance test

Signed-off-by: GitHub <noreply@github.com>

* Address code review

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

* Create Table Storage State store subtests

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

* Address linter issue

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

* context instead of ctx

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

* load state store in conf tests

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

* use cosmosDB mode in cosmosDB test

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

* Add Azure AD support for Table Storage

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

* remove shadow declaration

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

* make accountKey optional

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

* Add options to skip table creation

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-06-17 14:04:53 -07:00
Alessandro (Ale) Segala 98aed5c571
Make Service Bus attempt to reconnect forever in case of issues (#1783)
* 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>
2022-06-10 15:54:46 -07:00
Alessandro (Ale) Segala ca9fbf690e
Fixed Kafka PubSub to allow multiple handlers for different topics (#1755)
* Fixed Kafka PubSub to allow multiple handlers for different topics

With this, tests from #1743 are passing

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

* Removed read lock (for now)

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

* Updated as requested by @skyao

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

* Use interface type everywhere

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

* Fixed panic

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

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-06-01 15:31:11 -07:00
Alessandro (Ale) Segala e1b6b01223
Tweaks for ASB pubsub (#1729)
* 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>
2022-05-17 22:33:34 -07:00
Alessandro (Ale) Segala e5e9011655
Update Azure Service Bus components to track2 SDK (#1702)
* 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>
2022-05-13 16:52:22 -07:00
Janusz Dziurzynski 62c5a2b3d1
Support custom queueEndpoint in Azure Storage Queues (#1692)
* 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>
2022-05-10 12:27:10 -07:00
Wang Bing db99b43068
Use revive instead of golint (#1685)
Signed-off-by: pigletfly <wangbing.adam@gmail.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-05-06 12:55:17 -07:00
pigletfly 5673b28b13 Add context in bindings interface
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
2022-04-25 14:16:15 +08:00
Alessandro (Ale) Segala 9a28bb2f70 Added retry logic and back-off to Cosmos DB components
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2022-03-24 22:32:05 +00:00
Bernd Verst 40aadba329
Adds Azure Active Directory support to the Azure EventHubs Binding (#1572)
* Adds AAD support for Event Hubs Binding

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

* Update test infra

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

* EventHubs AAD permissions

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

* WIP

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

* EventHubs Binding AAD working with integration test

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

* Update certification test role assignments

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

* fix linter issues

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

* rename validate function

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

* Update commented out code for ACR resource.

Signed-off-by: Artur Souza <artursouza.ms@outlook.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2022-03-18 14:46:49 -07:00
Bernd Verst 0f2398670a
Certification tests for Azure Blob Storage Binding (#1435)
* initial blobstorage output binding certification

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

* More blobstorage tests

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

* Rename some remnants from copy paste

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

* Blobstorage Binding - test file upload

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

* Blobstorage Output Binding Remove Pascal case

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

* Blobstorage Output Binding: Remove list from conf test

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

* Azure Blobstorage Binding - include name upon creation

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

* blobstore binding - verify encoding option

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

* go mod tidy

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

* Additional test cases

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

* list blob tests WIP

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

* More stable certification tests for AzBlob Binding

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

* Remaining Blob Storage Binding certification tests

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

* Lint blob storage certification tests

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

* update go.mods

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

* Fix license header

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

* use byte string instead of file

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

* Run make modtidy-all again

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

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2022-01-13 18:06:39 -08:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
Simon Leet 9ab218a393
Update azure-sdk-for-go to v59.3.0 for EventGrid (#1325)
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-12-08 17:19:43 -08:00
Bernd Verst 175b09ea40
Adds retry on CosmosDB Init in case of TooManyRequests error (#1329)
* 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
2021-11-29 12:05:43 -08:00
halspang d5a68041c9
Move Service Bus Pubsub/Binding to common auth (#1201)
* 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>
2021-11-22 18:20:11 -08:00
Alessandro (Ale) Segala 3eafb8bcd4
Azure SDK "track 2": authentication and secretstore/azure/keyvault (#1290)
* 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>
2021-11-16 10:59:51 -08:00
halspang f5d8317c41 Revert "Bumping ASB version and fixing test for azure auth (MSI_ENDPOINT) (#1132)" (#1291) 2021-11-12 11:59:35 -08:00
Hossam Kandil 399d1230d0
rename CosmosGraphDB binding component to CosmosDBGremlinAPI #1246 (#1276) 2021-11-04 09:35:32 -07:00
Long Dai 925773dd21
Merge branch 'master' into add_amqp_properties 2021-10-27 10:14:38 +08:00
Simon Leet cdb2c6167e
Merge branch 'master' into service_queue 2021-10-26 17:18:42 -07:00
Long Dai 77bf26a676
Merge branch 'master' into add_amqp_properties 2021-10-26 09:29:57 +08:00
Bernd Verst aa4f949838 Adds Dapr User Agent for Cosmos DB components 2021-10-25 17:59:34 -07:00
Hal Spang ce4ab8f40f Move to atomics instead of locks 2021-10-25 16:06:30 -07:00
Hal Spang 3d3f142c19 Reconnect forever in ASB Queue Binding
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.
2021-10-25 16:06:30 -07:00
Simon Leet 2006bcccb0 Support message-id in Event Hubs components 2021-10-25 18:12:16 +00:00
Bernd Verst 2bd3d22b91
Cosmos DB Output Binding - Conformance & Progress towards GA (#1180)
* 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
2021-10-12 10:47:36 -07:00
Javier Vela 32bba35bb2
azure storage queue fix double quotation (#1156)
* azure storage queue fix double quotation

* Trigger checks

* Trigger checks

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-10-07 13:54:20 -07:00
halspang 0fe6a98874
Force lowercase name for Azure Service Bus Queue (#1186)
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
2021-10-06 11:40:43 -07:00
Simon Leet a9cf218c04
Support setting up Azure IoT Hub for integration testing with EventHubs components (#1174)
* Add IoT Hub config to setup-azure-conf-test.sh

* Add EventHubs bindings integration test for IoT device event properties

* Add consumer group for IoT Hub events for pubsub EventHubs testing

* Add EventHubs pubsub integration test for IoT device event properties
2021-10-01 16:17:53 -07:00
Simon Leet 9a075cb43a
Fix existing integration tests (#1173)
* Fix servicebusqueues_integration_test.go compile errors

* Fix postgresql_integration_test.go deleteItemThatDoesNotExist expectations

* Fix mysql_integration_test.go deleteItemThatDoesNotExist expectations

* Fix mysql_integration_test.go for bindings

* Increase TTL in ServiceBusQueues tests for stability
2021-09-28 19:17:44 -07:00
Bernd Verst ac85ba2a8e
Add dapr user agent for Azure Components (#1152)
* Add dapr useragent for Service Bus and EventHubs

* Add useragent for tablestorage

* send dapr useragent

* more user agents

* formatting
2021-09-27 17:04:27 -07:00
Long Dai 988fed05ab
ci: standard linter config (#1102)
* ci: standard linter config

Signed-off-by: Long <long.dai@intel.com>

* Update utils.go

* fix pulsar issue

Signed-off-by: Long <long.dai@intel.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-21 15:21:59 -07:00
Phil Kedy 45f577e137
Bumping ASB version and fixing test for azure auth (MSI_ENDPOINT) (#1132)
Co-authored-by: Bernd Verst <berndverst@users.noreply.github.com>

Co-authored-by: Bernd Verst <berndverst@users.noreply.github.com>
2021-09-13 11:06:04 -07:00
Alessandro (Ale) Segala a992cd19f0
Support Azure AD auth for Cosmos DB (#1104)
* 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>
2021-09-01 12:44:05 -07:00
Simon Leet 6591b0de68
Add Close() method to EventHubs bindings (#1093)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-08-26 15:56:15 -07:00
Simon Leet 796df4dd61
Add Close() function to Azure ServiceBusQueues binding (#1052)
* Add Close() conformance test

* Add Close() to AzureServiceBusQueues binding

* Accept nil on bindings Read Close() test

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-08-13 18:15:39 -07:00
Christian Kaps 80f0110fa8
Return blob metadata and add list operation (#999)
* Return blob metadata if configured

* Enhance error msg

* Add list functionality

* Fix linting issues

* Finalize list implementation

* Fix linting errors

* Add backward compatibility and align code to be more consistent

* Add tests

* Fix linting errors

* Rename properties

* Fix max result logic

* Fix linting error

* Fix PR suggestions

* Add comments for constants

* Run go mod tidy

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-14 09:17:48 -07:00
Hossam Kandil 13f96c42a6
Added new output binding for Cosmos Graph DB - Gremlin (#885)
* Added new output binding for Cosmos Graph DB - Gremlin

* applying gofumpt on cosmosdbgraphdb

* removed unnecessary conversion from cosmosgraphdb

* removed unwanted comments from cosmosgraphdb

* resolving gomod confilicts

* resolving go mod conflict

* resolve conflicting error messages

* change Gremlin query to req.data.

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-14 08:49:40 -07:00
Simon Leet 3877f5c793
Return SystemProperties on events from EventHubs bindings and pubsub (#1009)
- 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.
2021-07-13 16:04:22 -07:00
Long Dai a538b80452
switch to golang-jwt (#993)
Signed-off-by: Long Dai <long0dai@foxmail.com>

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-08 10:49:44 -07:00
Fabian Steinbach 4412ba019f
unmarshal getBlobRetryCount as int (#919)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-08 10:45:52 -07:00
Long Dai 4281cb2ea1
deps: upgrade dgrijalva/jwt-go (#981)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-07-02 19:55:17 -07:00
Phil Kedy 688df9bda4
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) 2021-04-19 12:06:10 -07:00
Yaron Schneider 192461889c
Add app response to input binding event (#764)
* add app response to input binding event

* lint
2021-03-18 14:22:14 -07:00
Fabian Steinbach 3a3998bb60
add delete to blob storage binding (#705)
* add delete to blob storage binding

* adjust linting

* make deletesnapshotsoption configurable

* update linting

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-03-09 00:20:43 -08:00
Yaron Schneider 3ef025c604
change headers (#679) 2021-02-09 18:57:55 -08:00
Artur Souza ac28629cb0
Increase timeout for conf test + more logging for EventGrid. (#663) 2021-02-05 19:10:44 -08:00
Artur Souza 795b62417e
Add verbosity to conf tests. More debug logging in eventgrid binding. (#662) 2021-02-05 17:41:06 -08:00
Artur Souza e6dadfab6c
TTL in PubSub. (#565)
* TTL in PubSub.

* Handle message TTL only if component cannot handle it.

* Removig dead code for overflow check in pubsub expiration.
2020-12-29 14:28:52 -08:00
Yaron Schneider d260ec85e6
add access level to azure blob storage (#549) 2020-12-05 07:38:13 -08:00
Yaron Schneider 01f90bdbc8
Fix azure blob storage json payload (#516)
* fix azure blob storage json payload

* handle non-json strings
2020-11-03 10:05:30 -08:00
halspang f647d9eedb
Upgrade golang lint to 1.31 (#490)
Upgrade golang lint to 1.31.0

https://github.com/dapr/components-contrib/issues/439
2020-10-12 12:54:15 -07:00
Yaron Schneider 1e92e0e8e1
Add blob url to azure blob create (#474)
* add blob url to azure blob create

* add missing err statement
2020-09-23 17:42:46 -07:00
Yaron Schneider b91469732c
Add get operation for azure blob storage binding (#473)
* add get operation for azure blob storage binding

* fix retry count

* make retry configurable, add default
2020-09-23 15:00:34 -07:00
Mohammad Taghavi e5a50cb2da
add decodeBase64 option to azure blob storage component (#393)
* add decodeBase64 option to azure blob storage component

* fix lint error

* Apply suggestions from code review

some code improvements (apply review suggestion)

Co-authored-by: Nghia Tran <tcnghia@gmail.com>

* add comment to help assure the reader (resolve review comment)

Co-authored-by: Mohammad Taghavi <Mohammad.Taghavi@plan-b-gmbh.com>
Co-authored-by: Nghia Tran <tcnghia@gmail.com>
Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-09-22 13:44:36 -07:00
Nils Schmidt 4007ba3622
Handle errors in AzureEventHubs.Read (#371) 2020-06-30 07:16:36 -07:00
Yaron Schneider e82164f4e7
Add bi-directional bindings support (#350)
* add bi-directional bindings

* added invoke response

* added explicit types

* change operationtype to operationkind
2020-05-26 23:32:20 -07:00
Ben Coleman e97529a4a8
Unescape azure blob data (#313)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-04-30 08:15:18 -07:00
Lynn Orrell 8480a29c18
EventGrid Component Updates (#319)
* 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>
2020-04-29 08:02:22 -07:00
Lynn Orrell 8827c58e78
Added Azure Event Grid Bindings (#290)
* 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>
2020-04-28 12:50:13 -07:00
Sivamuthu Kumar fd531b006f
Cosmos - Nested PartitionKey Support (#296)
* Nested partition key in cosmosdb bindings

* fix lint

* Lookup values by iterating

* fix lint

Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
2020-04-15 10:29:43 -07:00
Francisco Beltrao 75fcd7accf
Add message time to live in RabbitMQ, Azure Service Bus/Storage Queue bindings (#298)
* 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>
2020-04-15 10:07:16 -07:00
Young Bu Park 0489fb17f3
Fix linter errors (#293) 2020-04-01 17:22:15 -07:00
Ricardo Niepel 934ef7a7ba
Add metadata support to Azure Blob binding (#281)
* add metadata support to AzBlobBinding

* change to tabs

* fix lint error

* improve error message

* uncap error message
2020-03-21 16:33:35 -07:00
Carlos Landeras 22717373ca
[Azure Storage Queue Binding] Add option to decode base64 payloads #232 (#251)
* [Azure Storage Queue Binding] Add option to decode base64 payloads

* Fix tests

* Fix linting

* Fix wrong assertion

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
2020-03-20 03:47:00 -07:00
Sivamuthu Kumar f21a0e93e1
eventhub read and write from same partition (#269) 2020-03-19 12:31:10 -07:00
Abhishek Gupta cf077cca65
Updated Event Hubs bindings implementation to use EPH (#253)
* update implementation to use EPH

* fixed minor lint error

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-03-09 22:07:52 -07:00
Young Bu Park ee97c3c56a
Use dapr logger (#238)
* Use dapr logger

* skip linter false alarm
2020-02-28 15:49:49 -08:00
Abhishek Gupta 9323c44ecf check etag for etcd update and delete ops (#175) 2020-01-09 12:33:23 -08:00
Marcin Kosieradzki 3db863cac6 Changed schema to be consistent with blobstorage (#166)
* Changed schema to be consistent with blobstorage

* Updated tests to match the updated schema
2019-12-27 10:35:28 -08:00
thinkerou a2f4b4c510 upgrade logrus to v1.4.2 (#150)
* fix conflict

* upgrade logrus to v1.4.2

* fix lint error

error: `depguard  `github.com/sirupsen/logrus` is in the blacklist`
2019-12-12 09:34:39 -08:00
stather 744880306f Azure storage queue binding implementation (#146)
* 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
2019-12-03 21:31:46 -08:00
Francisco Beltrao f89682397b Add Azure SignalR binding (#148)
* 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
2019-12-03 09:08:53 -08:00
Shalabh Mohan Shrivastava 8c9a3bd806 [Commit - Bindings Package names]
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
2019-11-18 15:33:13 -08:00