* Component metadata schema and tools
Includes tools to generate and validate components' schema, and a CI check to ensure the schema is always up-to-date.
Also, includes schemas for 4 components as a starter
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Changed version as requested
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* fix workflow
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
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>
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>
* 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>
This, which is possible now because of improvements in the upstream SDK, should speed up delete operations significantly (and reducing RU usage).
Also, this should fix potential concurrency issues.
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
This is fixed by upgrading the upstream SDK
Also added a missing handling of throttling in the Delete method
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
These are not included in the compiled app and have no effect (for now). However, we need these tagged together with the release so we can use them in docs.
A separate commit (not slated for 1.7) will use Go embed to actually use these in code
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
These are not included in the compiled app and have no effect (for now). However, we need these tagged together with the release so we can use them in docs.
A separate commit (not slated for 1.7) will use Go embed to actually use these in code
Signed-off-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com>
* state azure blobstorage: fail for invalid account name
Signed-off-by: Tim Burkert <burkert.tim@gmail.com>
* state azure blobstorage: Remove duplicated code and add error check for common entpoint
Signed-off-by: Tim Burkert <burkert.tim@gmail.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
* 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
Follow-up to #1104 to support AD Auth codepath as well.
`NewConfig()` and `NewConfigWithServicePrincipal()` both set the
`Config.IdentificationHydrator` to the `DefaultIdentificationHydrator`
in the underlying a8m/documentdb library. That implementation ends up
calling `reflect.Value.Elem.FieldByName()`, which requires that the
value passed to it is an interface or pointer, otherwise the Elem()
call fails to dereference which causes a panic.
cosmosdb.go passes the input to `UpsertDocument` by value today,
which is eventually passed to the `DefaultIdentificationHydrator`,
so changing the value passed to a pointer resolves the failure.
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
PR #1104 introduced a regression in cosmosdb state component `Init()`
by creating a `NewConfig()` which sets a new DefaultIdentificationHydrator,
which causes a panic later when invoked.
Patch this by restoring the configuration setting to use a struct with
`nil` `IdentificationHydrator`.
* 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>
* 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>
* 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 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>