Commit Graph

156 Commits

Author SHA1 Message Date
Ryan Lettieri 50473bfccf Addressing more review comments from workflows building block review
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-12 15:19:32 -06:00
Ryan Lettieri 855f54404e Updates to workflows to be compatible with pluggable components changes
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-12 13:32:05 -06:00
Ryan Lettieri d3bdfa5281
Merge branch 'master' into workflow-dev
Signed-off-by: Ryan Lettieri <67934986+RyanLettieri@users.noreply.github.com>
2022-09-12 10:27:18 -06:00
Ryan Lettieri 1205859e3e Addressing review comments for workflow building block API
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-09-08 16:17:19 -06:00
Tiago Alves Macambira b84adbf03a Conformance tests for Hashicorp Vault.
This PR adds conformance tests for Hashicorp Vault secret store component.
This will help brining this component to stable status.

This addresses (but does not fix) #1926.

Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
2022-08-29 21:26:51 -07:00
Bernd Verst 587156bead
Enable conformance tests for rethink db. Make it Beta. Remove Etag feature. (#2015)
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-26 09:04:19 -07:00
amulyavarote aad920f307
Added certification tests for azure service bus pubsub (#1937)
* Added certification tests for azure service bus

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changed connection string to the key name

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* go mod tidy diff check

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added network interruption and corrected README

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changed config file

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changed topic name

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added default topic

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changes based on the review comments

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Executed go mod tidy

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Enabled the test

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Enabled the test

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Seperate flows for the tests

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Added network interruption case

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Changed a couple of test cases

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Infrastructure change to include service bus namespace

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* go mod tidy fix

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>

* Update .github/infrastructure/conformance/azure/setup-azure-conf-test.sh

* Update .github/workflows/certification.yml

* Grant test service principal access to service bus

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

* Remove unnecessary replacement of OTEL library

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

* Update tests/certification/pubsub/azure/servicebus/go.mod

Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-22 17:26:04 -07:00
Bernd Verst e818de3590
Enable conformance test for memcached state store (#1949) 2022-08-09 16:12:33 -07:00
Ryan Lettieri 7233fefcb3 Initial creation of workflows building block
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
2022-08-01 11:55:01 -06:00
ItalyPaleAle 15f99b0b61 Do not hardcode specific testTopicName
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-07-01 18:51:08 +00:00
ItalyPaleAle 0c40dccd07 pubsub.mqtt: re-enqueue messages when they fail
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-06-27 20:47:16 +00:00
Bernd Verst 9d7f4867b4
Infra changes for Azure Table Storage Certification tests (#1795)
Signed-off-by: GitHub <noreply@github.com>

Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
2022-06-20 10:03:37 -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
Bernd Verst 76bc9acd57
Add additional Event Hub topics for certification tests (#1767)
* Add additional Event Hub topics for certification tests

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

* Apply EventHubs changes for pubsub and binding cert tests

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

* Remove partitions from EHs because we don't want to pay for premium

Signed-off-by: GitHub <noreply@github.com>
2022-06-08 10:26:23 -07:00
Alessandro (Ale) Segala 704f4dd730
Add contexts to pubsub.Subscribe to allow early cancelation (#1756)
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>
2022-06-02 15:06:36 -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
Surender Singh Malik 37e4e8a44a
Certify Azure Event Hubs as Stable in pubsub (#1623)
* First iteration for the eventhubs certifications tests

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Fixing typos,  adding more description and publishing with multiple partitions

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Moved the secret reference in components definition to secretstore.local.env

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* moving to latest dapr/dapr github.com/dapr/dapr@v1.7.0-rc.2

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* updating go.mod

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* changes in infra and workflow for cert eventhubs

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* typo fix in local secret store type

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* correcting the typo in policyName

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* bug fixes

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* publish to a topic with no subscriber fix

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* delete azure eventhub that got created as part of test run

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* updated readme

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* removed dummy sidecar and leveraged connectionstring at namespace level for multi topic operations

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* go mod changes and nit fixes

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* fixing iot device issue

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* NIT : CR fixes

* Enabled iothub test and a bit of code refactoring

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* delete the checkpoint container for the temp eventhub

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Revert "NIT : CR fixes"

This reverts commit 260f5ed686.

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* First iteration for the eventhubs certifications tests

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Fixing typos,  adding more description and publishing with multiple partitions

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Moved the secret reference in components definition to secretstore.local.env

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* moving to latest dapr/dapr github.com/dapr/dapr@v1.7.0-rc.2

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* updating go.mod

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* changes in infra and workflow for cert eventhubs

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* typo fix in local secret store type

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* correcting the typo in policyName

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* bug fixes

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* publish to a topic with no subscriber fix

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* delete azure eventhub that got created as part of test run

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* updated readme

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* removed dummy sidecar and leveraged connectionstring at namespace level for multi topic operations

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* go mod changes and nit fixes

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* fixing iot device issue

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* NIT : CR fixes

* Enabled iothub test and a bit of code refactoring

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* delete the checkpoint container for the temp eventhub

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Revert "NIT : CR fixes"

This reverts commit 260f5ed686.

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

* Fix eventhub pubsub certification test infra provisioning

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

* Fixing the scoping issue for role assignment on eh

Signed-off-by: Surender Singh Malik <surenderssm@users.noreply.github.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-04-23 23:27:41 -07:00
Bernd Verst 0cd8d77ff4 Fix infra provisioning script
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: GitHub <noreply@github.com>
2022-03-30 20:47:47 +00:00
Ricardo Corrêa 4d44c2f04f
StateStore API implementation for CockroachDB (#1559)
* statestore for CockroachDB

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* Upgrade nacos sdk version to meet compliance (#1547)

* 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>
Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* conformance tests for CockroachDB

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* fix comment for internalNew func (CockroachDB)

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* remove metadata from log (CockroachDB)

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* removed unnecessary nil fields from GetResponse

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* Fix ordering in transaction API for CockroachDB

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* fix non-deterministic etag error (CockroachDB)

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

* fix error message for delete operation without key (CockroachDB)

Signed-off-by: Ricardo Corrêa <r.c.correa@outlook.com>

Co-authored-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
2022-03-22 08:24:14 -07: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
Alessandro (Ale) Segala a813308846 Pin Apache Pulsar container to 2.8.2
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-03-14 15:01:12 -07:00
Dmitry Shmulevich f819b290f7
redis state store: implement state query API (#1488)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-03-02 10:51:09 -08: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
Amit Mor 736730e55a
conformance tests for AWS pubsub SQS SNS (#1394)
* conformance tests

Signed-off-by: Amit Mor <amit.mor@hotmail.com>

* latest localstack. snssqs to conformance list

Signed-off-by: Amit Mor <amit.mor@hotmail.com>

Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-01-07 11:34:44 -08:00
Dmitry Shmulevich c7adb917f3
update license to Apache v2.0 (#1406) 2022-01-04 19:53:31 -08:00
mbimbij 1389ae5937
Fix cassandra statestore error - "Bind variables cannot be used for table names" - Introduce `fmt.Sprintf` where applicable (#1388)
* - Introduce `fmt.Sprintf` where applicable
- Add conformance test for cassandra component.

Signed-off-by: mbimbij <joseph.mbimbi@gmail.com>

* Start cassandra via docker-compose for its conformance test

Signed-off-by: mbimbij <joseph.mbimbi@gmail.com>

* Apply `go fmt` on `tests/conformance/common.go` as part of PR correction

Signed-off-by: mbimbij <joseph.mbimbi@gmail.com>
2021-12-26 21:35:02 -08:00
Bernd Verst 9dbdaee296
Cosmos DB Output Binding - Authentication tests (#1373)
* Adds CosmosDB Binding authentication tests

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

* Enable Cosmos DB Binding Conformance test

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

* Initial cosmosdb binding certification plan WIP

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

* Go mod tidy

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

* Update library and go mod tidy

Signed-off-by: GitHub <noreply@github.com>
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>

* CosmosDB Binding test plan details

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2021-12-13 15:08:07 -08:00
Bernd Verst dbb18e4d77
Fix test infrastructure setup script (#1366)
* Fix test infrastructure setup script

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

* use more unique ACR resource name

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

Co-authored-by: Looong Dai <long.dai@intel.com>
2021-12-08 17:34:12 -08:00
Bernd Verst f6e6bd8120
Adds missing ACR resource definition for test infrastructure (#1359)
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-12-06 12:01:18 -08:00
Simon Leet 0fdeb429c6
Address flakiness in Azure SQL conformance test (#1219)
* Add script to update Azure SQL firewall rules from GitHub meta API

* Update state.azure.sql test to use unique DB names

- Add use of `databaseName` metadata to state.azure.sql test.
- Add dynamic generation of test `databaseName` to conformance.yml to
  avoid multiple test instances from racing.
- Add wait before clean-up of Azure SQL DB instance in conformance.yml
  to prevent test flakiness and accumulation of undeleted DBs.
- Remove dynamic Azure SQL firewall rule injection from conformance.yml.
- The workflow relies on IPs used by GitHub Actions to be provisioned
  in the firewall rules already.
- Update documentation for managing Azure SQL and testing instructions.

Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-10-27 13:38:48 -07:00
Ian Luo 117408f76d
add state conformance test for postgresql #1117 (#1118)
* add state conformance test for postgresql #1117

* make postgresql pass comformance test

* include postgresql to github's workflow

* add newline at end of file for Linux text file

* enhance return

* add newline at end of file for valid Linux text file

* fix lint issue

* handle byte[] in special way so that to stick to json type in DB

* use jsonb instead of json

* fix lint issue

* doesn't allow "", a special case

* enhance assertEquals

* remove unused 'expectedReadResponse' to fix lint issue

* go fmt to fix lint issue

* fix lint issue

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-10-21 14:56:14 -07:00
Simon Leet c668479f43 Update setup-azure-conf-test.sh
- Add removal of AKV_SPAUTH_SP to generated teardown script.
- Fix extraction of `clientId` and `clientSecret` from provided
  credentials without line breaks.
2021-10-20 19:37:09 +00:00
Bernd Verst c3b2219235 Add additional info statement 2021-10-19 18:14:01 -07:00
Bernd Verst 93e3b5ddc9 enable akv serviceprincipal auth conformance test 2021-10-19 17:39:36 -07:00
Bernd Verst 342fbde8cd Integration test setup for AKV 2021-10-19 17:39:36 -07:00
Bernd Verst fec0e24a10 Limit Identity's access to Key Vault to read only 2021-10-18 14:28:18 -07:00
Bernd Verst 316bcc67eb Change IoT Hub Tier to S1 so we can have multiple in one subscription 2021-10-18 14:22:09 -07:00
Bernd Verst 4e2598eed3 simplify query output parsing 2021-10-18 12:08:35 -07:00
Bernd Verst 03ab731a12 Fix managed identity commands 2021-10-18 11:51:50 -07:00
Bernd Verst 96133cf832 Adds support for managed identity and container instances to conf test infra 2021-10-15 17:58:30 -07:00
Simon Leet 9f77037de2
Add state.sqlserver conformance test against Azure SQL (#1182)
* Add Azure SQL to setup-azure-conf-test.sh

* Add state.sqlserver conformance test on Azure SQL

Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-10-06 12:33:50 -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 c911f89fd8
Support using setup-azure-conf-test.sh with existing Service Principal (#1158)
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-24 13:55:49 -07:00
Ian Luo b208d80055
Add mysql conformance test (#1124)
* Add mysql conformance test and fix mysql state to make it pass the test #1122

* remove unused code

* add newline at end of Linux text file

* enhance setValue and relevant unit tests

* fix lint issue

* fix lint issue
2021-09-11 08:00:25 -07:00
Simon Leet 9bcf71d62a
Add conformance test for influx bindings (#1115)
- Add `OutputData` property to bindings conformance test `TestConfig`.
  This is necessary to accommodate bindings like influx, cosmosdbgraph,
  alibaba.table and other bindings that require a specific data format.

- Add docker-compose definition and conformance test configuration for
  influx binding.

- Add influx bindings to conformance test workflow matrix.
2021-09-02 09:28:58 -07:00
Simon Leet ec6021304d
Update EventHubs conformance tests (#1095)
* Fix parameters flag typo in setup-azure-conf-test.sh

* Update Event Hubs conformance tests

- Separate containers and consumer groups used for EventHub pubsub and
  bindings conformance tests.
- Update setup-azure-conf-test.sh to reflect new naming targets.
2021-08-26 15:38:51 -07:00
Bernd Verst 059dc8c0d2
Conformance tests & bugfixes for SQLServer (#1078)
* enable sqlserver conformance test

* Update SQL Server conformance test setup

* Fix sqlserver bug introduced in Go 1.16

* sqlserver almost conformant

* Fix conformance tests and stored procedure

* all sqlserver tests passing

* Minor touchup

* lint

* Remove unnecessary condition

* Add conformance test to GitHub workflow

* remove env variable

* Update stored procedure

* Simplify error handling

* Update state/sqlserver/sqlserver.go

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>

* Update state/sqlserver/sqlserver.go

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>

Co-authored-by: Bernd Verst <me@bernd.dev>
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-08-19 17:47:56 -07:00
Simon Leet ce0674fb48
Patch cosmosdb first-write without etag state test (#1069)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-08-17 15:47:28 -07:00
Simon Leet dc7ee55e2a
Add Event Hubs pubsub and bindings conformance tests (#1040)
* Add conformance test for EventHubs bindings

* Update EventHubs pubsub to pass conformance tests

- Add conformance tests for Azure EventHubs PubSub component
- Add retry & backoff handling on subscriber handling error to EventHubs
  PubSub component for conformance tests.
- Add cancellation context to Azure EventHubs and update Close() to
  invoke cancel prior to closing the hub, which cleans up both senders
  and receivers.
2021-08-02 18:03:24 -07:00
Simon Leet 9c84bd202c
Add automation for deploying Azure conformance test resources (#1001)
* Add automation for deploying Azure conformance test resources

- Add .bicep definitions for Azure deployment of conformance test resources.
- Add setup-azure-conf-test.sh script for deploying .bicep definition and
  configuring other assets needed for the Azure conformance tests:
   - Creates the appropriate service principals and their credentials
     for the test.
   - Populates the key vault with the test parameters and secrets used by
     the GitHub conformance.yml test workflow.
   - Generates a .rc file that can be invoked with `source` to configure
     the local environment variables and secrets for running conformance
     tests described in tests/conformance/README.md.
   - Generates a teardown script that can be used to dispose of the
     deployed Azure resources when done.

* Move setup-azure-conf-test under azure/ subfolder

* Add documentation for Azure conformance test automation

- Add README.md to .github/infrastructure/conformance/azure describing
  use of automation script.
- Update tests/conformance/README.md with reference to Azure
  conformance test infrastructure automation.
- Fix spelling and issues in tests/conformance/README.md reported by
  markdownlint.
2021-07-28 10:06:14 -07:00
Phil Kedy a1a0ad2c25
Adding RabbitMQ to the conformance tests (#739)
* Initial pass at adding RabbitMQ to the conformance tests

* Fixing unit tests
2021-03-04 11:56:35 -08:00
Phil Kedy 44d64598b8
Added Hazelcast to conformance tests and retry to prevent message loss (#724) 2021-03-03 13:08:58 -08:00
Phil Kedy e8efbca072
Add MQTT pubsub to the conformance tests (#721)
* Add MQTT pubsub to the conformance tests

* Making the MQTT pubsub component conformance test against multiple brokers
2021-02-25 18:16:23 -08:00
Phil Kedy 4a0011bcbd
Improve conformance tests and add pulsar (#702)
* Improve conformance tests and add pulsar

* Fix linter error

* Fix linter errors

* Tweaks to pulsar pubsub per PR

* Switching uuid import

* Using Stringer interface to print message keys as base64 in logger

* Disabling some checks w/ Redis pubsub until the component can be enhanced

* Adding comment to eventually remove the simulateErrors option

* Add comment asBase64String to explain what it does

* Adding redelivery (reclaims) to the Redis pubsub component
Removed the temporary simulateErrors flag now that Redis is passing

* Fixing linter issues

* using a wait group instead of a sleep to wait for processing to complete

* More comments and refactoring

* comment tweaks

* Tweaks per PR

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-02-23 13:31:52 -08:00
Artur Souza 13051e2197
Adds conf test for natsstreaming. (#690) 2021-02-12 08:09:50 -08:00
halspang 6f31e9f14f
Add http input/output bindings test (#637)
* Refactor bindings and introduce input bindings

This commit adds Kafka output bindings tests and refactors the
general bindings tests to include input and output bindings in
the same set of tests. Azure Storage Queues are used as the
first input binding.

* Add http input/output bindings test

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-01-29 13:00:09 -08:00