* Propagates contexts to callers where appropriate.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Updates units tests with new func signature
Signed-off-by: joshvanl <me@joshvanl.dev>
* Fix linting errors
Signed-off-by: joshvanl <me@joshvanl.dev>
* Add atomic gate to alicloud rocketmq close channel.
Signed-off-by: joshvanl <me@joshvanl.dev>
* bindings/aws/kinesis use a separate ctx variable name
Signed-off-by: joshvanl <me@joshvanl.dev>
* binding/kafka: use atomic to prevent closing the channel twice
Signed-off-by: joshvanl <me@joshvanl.dev>
* bindings/mqtt3: use atomic bool to prevent close channel being closed multiple times
Signed-off-by: joshvanl <me@joshvanl.dev>
* bindings/mqtt3: use Background context for handle operations:w
Signed-off-by: joshvanl <me@joshvanl.dev>
* state/cocroachdb: add context to Ping()
Signed-off-by: joshvanl <me@joshvanl.dev>
* bindings/postgres: add comment explaining use of context.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Adds comment header to health/pinger.go
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/aws/snssqs: add waitgroup to wait for all go routines to finish
and block on Close(). Shuts down the subscription if there are no topic
handlers.
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/mqtt3: add atomic bool to prevent multiple channel closes. Add
wait group to block close on all goroutines to finish.
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/rabbitmq: fixes race conditions, uses atomic to prevent multiple
closes, add wait group to block close on all goroutines
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/redis: revert ctx passed when it could be cancelled. Add wait
group wait when closing.
Signed-off-by: joshvanl <me@joshvanl.dev>
* state/postges: pass context in init, and wait group on close.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Update all `Ping()` to `PingContext()` where possible.
Signed-off-by: joshvanl <me@joshvanl.dev>
* state/in-memory: add atomic bool to prevent closing channel multiple
times. Add wait group to block on close()
Signed-off-by: joshvanl <me@joshvanl.dev>
* state/mysql: don't use same ctx variable name
Signed-off-by: joshvanl <me@joshvanl.dev>
* Pass correct loop context to redis go routines
Signed-off-by: joshvanl <me@joshvanl.dev>
* Rename context when creating timeouts in state
Signed-off-by: joshvanl <me@joshvanl.dev>
* Remove state.Features() from requiring a context
Signed-off-by: joshvanl <me@joshvanl.dev>
* Revert wasm request handle Close func to be without context to
implement io.Closer interface. Add 5 second timeout. Add io.Closer
assertion in test.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Remove superfluous go lint vet directive
Signed-off-by: joshvanl <me@joshvanl.dev>
* Change Configuration Init function to take context
Signed-off-by: joshvanl <me@joshvanl.dev>
* Updates input binding interface to include a `Close() error` function. `Close`
blocks until all resources have been released and go routines have returned.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Change `Close() error` in input binding struct to `io.Closer` interface.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Update go.mod files to point to dapr/dapr PR https://github.com/dapr/dapr/pull/5831
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/redis: watch closeCh to shutdown worker instead of init context.
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/aws/snssqs + bindings/kubemq: ensure closeCh is caught so Close
correctly returns
Signed-off-by: joshvanl <me@joshvanl.dev>
* Close kubemq binding client on close. Ensure kafka consumer channel
cannot be closed more than once.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Tweaks
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fixed cert tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* binding/mqtt3: add inline Background context instead of passing to
handleMessage
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/mqtt3: remove context from createSubscriberClientOptions
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/mqtt3: Remove `ResetConnection` func
Signed-off-by: joshvanl <me@joshvanl.dev>
* pubsub/kafka: Don't resubscribe if Subscribe is cancelled.
Signed-off-by: joshvanl <me@joshvanl.dev>
* binding/mqtt3: don't use context to control establishing connection
Signed-off-by: joshvanl <me@joshvanl.dev>
* bindings/mqtt3: Fix linting errors
Signed-off-by: joshvanl <me@joshvanl.dev>
---------
Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.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>
* 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 is aimed at addressing issue #2047.
In the [Secret API Documentation](https://docs.dapr.io/reference/api/secrets_api/#response-body) it is stated:
> If a secret store has support for multiple keys in a secret, a JSON payload is returned with the key names as fields and their respective values.
>
> In case of a secret store that only has name/value semantics, a JSON payload is returned with the name of the secret as the field and the value of the secret as the value.
There are two classes of secret stores but there isn't a way to tell them apart at run-time. This limits the ability of conformance tests to verify the behavior of secret stores supporting multiple keys.
We address this by augmenting SecretStores with the ability to advetise `Features`. This is similar
to what PubSub and StateStores do. Feature `MULTIPLE_KEY_VALUES_PER_SECRET` was added and is
advertised by Hashicorp Vault (default behaviour) and by Local File SecretStore (depending on its configuration).
Updated tests to account to new method and ensure expected behavior.
Fixes#2047
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.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>