Commit Graph

3297 Commits

Author SHA1 Message Date
Javier Vela a3ad87f04e
smtp allow use smtp server without auth (#1083) 2021-08-17 15:17:23 -07:00
Amit Mor 284d74488f
pubsub/aws/snssqs to support SQS dead-letter queue (#1066)
* bugfix for sns topic deletion upon termination

* Revert "bugfix for sns topic deletion upon termination"

This reverts commit bcaa9bb562.

* wip on normalizing queue/topic names

* sanitize queue and topic names

* sanitized names. bugfix for close

* # This is a combination of 4 commits.
# This is the 1st commit message:

Improve error message in case of missing property (#1012)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
# This is the commit message #2:

Remove vestigial pubsub/nats code (#1024)

The pubsub/nats component was replaced by pubsub/natsstreaming as part
of https://github.com/dapr/dapr/pull/2003, but the corresponding code
in dapr/components-contrib was not removed, so this change removes it.
# This is the commit message #3:

bugfix for sns topic deletion upon termination

# This is the commit message #4:

Revert "bugfix for sns topic deletion upon termination"

This reverts commit bcaa9bb562.

* removed debug message

* raw string abort

* merge issues solved

* wip

* gofmt+remove regex and use byte iter

* wip. first impl of dead-letters queue config

* wip. refactor and fallback values

* integration test wip

* wip integration test

* wip integration

* wip on testing

* wip

* still buggy but wip!

* bugfix in dlq creation

* working. still bug in subscription clean up

* Update snssqs_integ_test.go

* golangci-lint fixes

* golangci-lint refactoring

* trying to skip running integrations for snssqs

* testing

* skip integration test if no AWS related envvars are set (skip in CI)
* parallel testing in unittests

* code review fixes

* not using implicit maxReceives
* maxReceives renamed
* unittest refactor

* Update snssqs.go

* integ removed, renaming back of const

Co-authored-by: Maarten Mulders <mthmulders@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-13 19:02:25 -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
Javier Vela 405ba37eb8
added binding AWS SES (#1021)
* added binding AWS SES

* binding AWS SES: removed unused code

* binding AWS SES: fix lint

* binding AWS SES: fix parse session token

* binding AWS SES: support multiple email && fix cc / bcc parse error

* binding AWS S3: add TODO configuration set

* binding AWS SES: handle error on unquote req.Data

* binding AWS SES: fix lint errors

* binding AWS SES: reuse SES instance

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-08-13 17:24:00 -07:00
Artur Souza 7aac0ab38c
Disabled CGO in contrib test run. (#1077) 2021-08-13 17:05:10 -07:00
Artur Souza 1042314c63
Add binding alicloud.tablestore (#1076)
* add binding alicoloud.tablestore

* Fix lint.

Co-authored-by: theonefx <chenxilzx1@gmail.com>
2021-08-13 10:03:14 -07:00
Javier Vela 203da8b2ca
biinding smtp: fix multiple recipients (#1074) 2021-08-12 13:13:30 -07:00
weibubli 4d3e4ebee5
rename (#1061)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-08-10 16:24:15 -07:00
Alessandro (Ale) Segala d0816e32a8
Updated to use common Azure auth logic (#972)
* Common Azure auth logic
- Currently implemented on secretstores/azure/keyvault and state/azure/blobstorage
- Supports Azure AD via service principal (client credentials, client certificate, MSI) - based on the previous authorizer for AKV
- Allows using other Azure clouds (China, Germany, etc)
- For Blob Storage state, supports using custom endpoints (like emulators like Azurite)

* Add environment variable aliases

* Address linter warnings

* another lint thing

* Fixed typo in method description

* Updated metadata key names so they're more consistent

* Fix test

* Some more linter things

Co-authored-by: Bernd Verst <me@bernd.dev>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Bernd Verst <berndverst@users.noreply.github.com>
2021-08-10 15:06:24 -07:00
Bernd Verst aa7d2ee1dd
Adds Default TTL Option for Redis State Store (#1059)
* Adds Default TTL Option for Redis State Store

* Add additional tests

* Parse correct property key

Co-authored-by: Bernd Verst <me@bernd.dev>
2021-08-09 18:06:59 -07:00
Amit Mor 253ef854c5
SNS and SQS topic/queue names + SNS subscription deletion bugfix (#1035)
* bugfix for sns topic deletion upon termination

* Revert "bugfix for sns topic deletion upon termination"

This reverts commit bcaa9bb562.

* wip on normalizing queue/topic names

* sanitize queue and topic names

* sanitized names. bugfix for close

* # This is a combination of 4 commits.
# This is the 1st commit message:

Improve error message in case of missing property (#1012)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
# This is the commit message #2:

Remove vestigial pubsub/nats code (#1024)

The pubsub/nats component was replaced by pubsub/natsstreaming as part
of https://github.com/dapr/dapr/pull/2003, but the corresponding code
in dapr/components-contrib was not removed, so this change removes it.
# This is the commit message #3:

bugfix for sns topic deletion upon termination

# This is the commit message #4:

Revert "bugfix for sns topic deletion upon termination"

This reverts commit bcaa9bb562.

* removed debug message

* raw string abort

* gofmt+remove regex and use byte iter

Co-authored-by: Maarten Mulders <mthmulders@users.noreply.github.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-08-06 16:31:50 -07:00
Artur Souza 38de30533e
Supports bot assignment via /assign. (#1058) 2021-08-06 16:17:52 -07:00
Phil Kedy b73d817582
Merge changes from Release 1.3 to master (#1038)
* Fixing the handling of detach errors (#1030)

* Improve error message in case of missing property (#1012)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>

* Remove vestigial pubsub/nats code (#1024)

The pubsub/nats component was replaced by pubsub/natsstreaming as part
of https://github.com/dapr/dapr/pull/2003, but the corresponding code
in dapr/components-contrib was not removed, so this change removes it.

* Fixing the handling of detach errors

Co-authored-by: Maarten Mulders <mthmulders@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>

* Revert "Fixing the handling of detach errors (#1030)" (#1031)

This reverts commit 54840c2b83.

* Fixing the handling of detach errors (#1032)

Co-authored-by: Maarten Mulders <mthmulders@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
2021-08-06 10:46:31 -07:00
Simon Leet 6c28306b10
Customize sleep in EventGrid bindings conformance test between read and publish (#1050)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-08-04 14:38:50 -07:00
Donovan Brown 5f8cb50306
Darquewarrior issue798 (#819)
* Reduced cyclomatic complexity of Multi
There was a lint warning on this function.

* Reduced cyclomatic complexity of Init

* Updated existing unit tests.
Added test for default table and database names.
And invalid database name.

* Got all Integration tests passing after refactor.

* All tests passing.

* Increasing code coverage

* Creating db in sqlserver state store is complete.

* Fixing gofumpt issues

Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
2021-08-04 14:05:18 -07:00
Javier Vela 71c5b2088c
Add priority option in SMTP binding. It will allow select email priority (#1018)
* binding smtp add priority option

* binding SMTP add priority: fix lint

* binding SMTP add priority: added a priority metadata support

* binding SMTP add priority: lowest and hight priority as const

* binding SMTP add priority: handle error on unquote req.Data

* binding SMTP add priority: lowest and hight priority as const (msg error)

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-08-04 10:39:20 -07:00
Long Dai 7496adf110
fix build error on Arm 32-bit (#1045)
Signed-off-by: Long <long0dai@foxmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-08-03 19:24:38 -07:00
Simon Leet 0bb8afd8da
Upload conformance test logs as GitHub workflow artifacts (#1044)
Align test log reporting with dapr/dapr E2E tests so that maintainers
can start applying the same analytics tools to the test results across
Dapr projects.

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-08-03 19:09:19 -07:00
Long Dai 10a2e5ee85
state: correct FIRST_WRITE (#995)
* state: correct FIRST_WRITE

Signed-off-by: Long Dai <long0dai@foxmail.com>

* add a test case

Signed-off-by: Long <long0dai@foxmail.com>
2021-08-03 17:26:45 -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
Christian Kaps be88343a5b
Fix Go extension for devcontainer (#1023)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-30 12:16:56 -07:00
Long Dai 4440167df8
Add SECURITY.md (#1027)
Signed-off-by: Long Dai <long0dai@foxmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-30 11:49:56 -07:00
Long Dai 4d916c712e
ci: add stale bot (#986)
* ci: add stale bot

Signed-off-by: Long Dai <long0dai@foxmail.com>

* feedback

Signed-off-by: Long Dai <long0dai@foxmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-28 11:19:34 -07:00
Simon Leet f84a8b8914
Fix Kafka pubsub use of AuthRequired metadata (#1015)
Kafka pubsub component was not setting `k.authRequired` property based
on parsed `meta.AuthRequired` value, so would not correctly configure
Kafka producer or consumer with appropriate credentials when specified
by the author.

- Fix assignment of `meta.AuthRequired` to `k.authRequired` consumed by
  Subscribe().
- Fix initialization of `SyncProducer` to use copy of config with the
  authorization credentials added.

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-28 10:24:35 -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
Simon Leet f58e0ca26d
Remove vestigial pubsub/nats code (#1024)
The pubsub/nats component was replaced by pubsub/natsstreaming as part
of https://github.com/dapr/dapr/pull/2003, but the corresponding code
in dapr/components-contrib was not removed, so this change removes it.
2021-07-19 17:46:32 -07:00
Maarten Mulders 0968aca6d4
Improve error message in case of missing property (#1012)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-18 18:44:38 -07:00
Bernd Verst 7df53a1d76
Adds support for TTL in Redis State Store (#990)
* Adds support for TTL in Redis State Store

* return explicit errors

* Refactor Redis TTL

* reduce nestedness

* Changing if logic for ttl to fit lint

* Ignore lint for nestif

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-14 16:37:51 -07:00
Bernd Verst c930c973e9
Adds support for TTL in Memcached State Store (PR Fixup) (#1011)
* Adds support for TTL in Memcached State Store

* parseTTL return error

* memcached parseTTL return value changed int to int32

* Update state/memcached/memcached.go

Co-authored-by: Bernd Verst <berndverst@users.noreply.github.com>

* Update state/memcached/memcached.go

Co-authored-by: Bernd Verst <berndverst@users.noreply.github.com>

* Fix up memcache TTL PR

Co-authored-by: Umut <umut-776@hotmail.com>
Co-authored-by: Umut <umut.comlekcioglu@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-14 16:17:51 -07:00
Bernd Verst a072ff36b0
Adds support for TTL in Cassandra State Store (#996)
* Adds support for TTL in Cassandra State Store

* Update cassandra.go

* Update cassandra_test.go

* Update cassandra.go

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-14 16:02:19 -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
Bernd Verst 37309935ca
Adds support for TTL in CosmosDB State Store (#991)
* Adds support for TTL in CosmosDB State Store

* return explicit errors

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-13 19:38:19 -07:00
Taction abac56b082
Delete unused code and update test (#924)
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>
2021-07-13 18:41:21 -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
Christian Kaps cb9a510d16
Implement E2E tests for zeebe (#973)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-12 11:40:38 -07:00
Long Dai c3cf138c6d
rebase (#982)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-07-12 11:26:59 -07:00
Aaron Crawfis 534c2d9783
Update CODEOWNERS (#987)
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-08 22:19:32 -07:00
Long Dai 264005d531
ci: add test skip case (#922)
Signed-off-by: Long Dai <long0dai@foxmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-08 21:58:06 -07:00
Ian Luo 0777a6a943
fix: Mysql should support more data types. #923 (#926)
* 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>
2021-07-08 10:57:18 -07:00
Ian Luo 7d2bc9bbdf
fix: Dapr runtime panic when handle Pub/Sub (dapr#3281) (#967)
* fix: Dapr runtime panic when handle Pub/Sub (dapr#3281)

* use uuid to generate Id when Id is missing

* skip default value for id and content-type

Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: beiwei.ly <beiwei.ly@alibaba-inc.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-08 10:54:36 -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 7076d6742c
secretstores: support more format of azure key vault (#944)
Signed-off-by: Long Dai <long0dai@foxmail.com>

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-07-08 10:43:17 -07:00
Taction 61e07bca0e
Optimize vault secret component error output (#909)
* Optimize vault secret component error output

* add debug log

* fix lint

Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
2021-07-08 10:39:20 -07:00
Simon Leet b9ede271ba
Convert AZURE_KEYVAULT in conformance.yml a GitHub secret (#1002) 2021-07-08 10:25:59 -07:00
Simon Leet 830f6ee3ed
Use AzureKeyVaultName param for Azure Keyvault conformance test (#975)
Unlike the other conformance tests, the azure-keyvault.yaml config hardcodes the name of the
target resource which creates an issue for contributors wanting to set up their own test
environments. For example, different users sharing an Azure subscription may not be able
to manage the permissions on the target key vault individually, and will need to edit the
yaml to retarget against their own keyvault instance.

- Add `AzureKeyVaultName` environment variable as the value for `vaultName` in azure-keyvault.yaml
- Update conformance.yml github workflow to require AzureKeyVaultName secret.
2021-07-07 12:04:50 -07:00
Phil Kedy ff65172407
Removing internal config and retry packages that were moved to dapr/kit. (#988)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-02 20:17:52 -07:00
Long Dai 5e146311b9
update deps (#980)
Signed-off-by: Long Dai <long0dai@foxmail.com>

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-07-02 20:05:32 -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