* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* Add Features list to Tencent SSM
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* pin custom dapr in cert tests for bindings context change
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* feature(secretstore): add context to api and tencent/ssm
Signed-off-by: 1046102779 <seachen@tencent.com>
* optimize(middleware): Middleware to middleware.Middleware API
Signed-off-by: 1046102779 <seachen@tencent.com>
* fix pinning of custom dapr in cert tests
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Update cassandra cert test with new secretstore context
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* modtidy again
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: 1046102779 <seachen@tencent.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
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>
* Add base metadata for all components
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Fix lint issues on consul and mysql tests
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Pin candeia/dapr runtime version
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Add replace directive to use mcandeia/dapr on all go submodules
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Fixed runtime config instantiation
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Go 1.19 support and linter fixes
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Update workflows for Go1.19 and new linter version
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Remove unnecessary space in nolint directive
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* disable additional linters which aren't used because of Go generics
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* enable gosec linter again
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Update bindings/zeebe/command/publish_message_test.go
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Update bindings/output_binding.go
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Use prepared statement for mysql table creation
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Ping is not ping
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* c'mon linter
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Fix MySQL gosec issue
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* revert mysql to be fixed later
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
This is the last part of the "shutdown sequence fix": it allows shutting down input bindings before output ones.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
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>
* Added test for multiple pubsub handlers
This patch adds conformance tests for PubSub with multiple handlers, each listening on a different topic.
It's meant to catch issues such as #1709
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Added missing go.mod for storagequeues binding test
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 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>
* - 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>
* 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>
* 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
* 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
- 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.
* 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.
* 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.
* add `Ping` operation.
* add `Ping` implementation of GA components
* add context to an argument for Ping
* add `Ping` implementation of blobstorage
* fix error string for passing lint
* Update blobstorage.go
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Add ETag operation to statestore conformance test
ETags are used to enable concurrency guarantees and are part of the
statestore specification. Not all stores need to use them, however
if the store chooses to, it should be part of the certification
process. This commit adds a simple ETag test scenario that verifies
the basic behaviors of ETags.
https://github.com/dapr/components-contrib/issues/711
* Update tests.yml
* Error on mongodb when etag does not match on delete.
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Refactored the conformance tests to use a new config package
Removed dependency on k8s apimachinery sets
* Comment tweak
* Renamed kit package to internal
* 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>
* Add conformance test for kafka pubsub + quickfix for Kafka error handling.
* Adding backoff/retry logic to the Kafka pub/sub component
* Add logic to return if error from backoff in kafka.
* Addressing PR comments and lint.
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
* Add state transaction conf test.
* Does not return error for key not found in mongodb.
* Rewrite state conf test.
* Handle []byte in cosmosdb state txn (#664)
Fixes: dapr/dotnet-sdk#579
The issue here is that we had missed the case of pre-marshaled bytes in
the state transaction code path, which would result in the encoding/json
package doing it's normal thing and base64 encoding the data as a JSON
string.
The fix is to use json.RawMessage to avoid that. Turns out this code can
be simplified a bit.
* Fix cosmosdb handling of byte[].
* Fix lint.
* Fix UT for cosmosdb.
* Remove config from state store conf test.
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* no message
* Removing HTTP input binding from conformance test
* Moving // nolint: noctx
* Fixed linter issue
* Tweaks
* Tweak
* Setting request headers from metadata
* More comments and handling of non-200 response codes
* Fixing conformance test for HTTP
* Temporarily bumping up redis timeouts
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Charlie Stanley <charlie.stanley@microsoft.com>
The http server required for the http binding tests was not up
before the tests began to execute. This change adds a channel to
allow the server to block until it's ready.
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* 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>
* Fix running output bindings with errors
Refactor tests to make it simpler for go test filtering.
Add get operation for blobstorage binding.
* remove unused code
* Add azure service bus conformance tests
Bubble up error on required env var not set
* Update common.go
* Fix running output bindings with errors
* update readme
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Tests MongoDB statestore
* Increase test timeout a bit
* Increase durations even more.
* Clarify the mongodb and redis version
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>