Commit Graph

191 Commits

Author SHA1 Message Date
Shubham Sharma fc726adbbb
Fix ordering in transaction API for MySQL (#1523)
* fix transaction API ordering

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* refactor to an idiomatic way

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update transaction API to execute sequentially

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix MySql unit tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-03-14 16:39:32 -07:00
Shubham Sharma eecb3015c7
Update transaction API to execute sequentially (#1542) 2022-03-09 11:37:28 -08:00
Shubham Sharma 794e42225a
Fix ordering in transaction API for PostgreSQL (#1524)
* fix transaction API ordering

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update postgres transaction API and refactor tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Remove commented tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add more tests

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix govet issue

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix goimports

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Fix golangci issues

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2022-03-08 21:46:32 -08:00
Shubham Sharma db670d26b9
Fix transaction API for Azure Cosmos DB (#1518)
* Fix cosmos transaction API to respect ordering

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* refactor to an idiomatic way

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update storedproc caller to pass list of operations

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update storedproc to operate sequentially

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Add doc

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update storedproc

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update storedproc to not throw error on delete failure due to missing document

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
2022-03-08 21:13:55 -08:00
Wim baada23d0d
Added TTL to state store binding for DynamoDB (#1512)
* Added TTL to state store binding for DynamoDB

Signed-off-by: wimvc <wim.vdc@hotmail.com>

* gofumpt dynmodb statestore files

Signed-off-by: wimvc <wim.vdc@hotmail.com>

* Fixed some godot issues

Signed-off-by: wimvc <wim.vdc@hotmail.com>

* Fixed typos and refactored IF in Get

Signed-off-by: wimvc <wim.vdc@hotmail.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-03-04 08:18:33 -08: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
Shubham Sharma acde0fb899 Update doc
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-02-21 16:19:57 +05:30
Shubham Sharma a056a30e93 Refactor documentation
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-02-21 15:54:25 +05:30
Shubham Sharma 487e8bc089 Change BulkDelete error handling in transaction
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-02-21 15:40:58 +05:30
Shubham Sharma e703874f42 Add logic to fix transaction ordering
Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
2022-02-21 12:41:03 +05:30
Gehhilfe 80c2bbe284
Jetstream KV state store component (#1501)
* Add support for nats jetstream kv state store

Add tests for jetstream state store

Update go mod

Signed-off-by: Tim Burkert <burkert.tim@gmail.com>

* Fix lint errors

Signed-off-by: Tim Burkert <burkert.tim@gmail.com>

* Mod tidy

Signed-off-by: Tim Burkert <burkert.tim@gmail.com>

* Mod tidy all

Signed-off-by: Tim Burkert <burkert.tim@gmail.com>

* Mod tidy all

Signed-off-by: Tim Burkert <burkert.tim@gmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
2022-02-17 10:19:03 -08:00
Looong Dai 0b1ba25e7f
Merge branch 'master' into postgres_state_store_set_with_etag_1497 2022-02-14 09:38:05 +08:00
Dmitry Shmulevich 7fdebda09b
state store query API: remove preceding '.' in key names (#1500)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-02-11 15:00:43 -08:00
Phil Kedy d5b2ce5377 Bump version of github.com/jackc/pgx/v4 to v4.15.0.
Signed-off-by: Phil Kedy <phil.kedy@gmail.com>
2022-02-11 15:53:31 -05:00
Phil Kedy e4ad31d36c Postgres state: Convert etag to uint32 instead of int to fix conversion error
Signed-off-by: Phil Kedy <phil.kedy@gmail.com>
2022-02-11 08:49:21 -05:00
Dmitry Shmulevich 1cb659c0b8
update conformance tests (#1492)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-02-09 17:58:48 -08:00
Dmitry Shmulevich eaecd4cb34
statestore query API: remove 'value' prefix from key names in query JSON object (#1491)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-02-09 17:17:47 -08:00
Lucas Jellema 625f955fee
Introducing Oracle Database backed state store component (#1454)
* Introducing Oracle Database backed state store component

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Implement Ping method with proper database ping

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* adding results from make modtidy-all - updated go.sum files
Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* etag only applied when first write policy requested - applied in integration test and component

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-02-08 12:00:34 -08:00
Lucas Jellema a383697ef5
Add config file authentication to oci object storage state store (#1430)
* Improving testing - verify expected methods are invoked

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Adding support for composite keys (mapped to directories in buckets)

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Adding support for TTL - expired elements are not returned in Get

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* fixing linting issues

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* fixing linting issue

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* adding support for TTL == -1 (never expire)

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* fix linting issue

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* introducing Instance Principal authentication for OCI client

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* fix linting issue

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* adding support for oci config file based authentication for OCI bjectStorage state store

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* expand ~ to user home directory in config file path; fix linting findings

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* gofumpt file because of linting issue

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Do not allow config file path to start with ~/

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* introducing integration test for oci objectstorage state store

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Fixing linting issues in integration test

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Fixing linting issues in integration test

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-02-06 19:27:31 -08:00
Ricardo Corrêa 8297fc929b
Query StateStore API implementation for PostgreSQL StateStore (#1457)
* query state integration with dbaccess (postgresql)

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

* query state integration with postgresql component

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

* query state for postgresql

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

* fix: linter error 'rowserrcheck'

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

* query state integration with dbaccess (postgresql)

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

* query state integration with postgresql component

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

* fix: linter error 'rowserrcheck'

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

* fix: linter error 'goimports -ed with -local github.com/dapr/'

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

* performance improvementt in PosgreSQL Query API

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

* added conformance test for PostgreSQL Query API

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

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-02-02 18:14:18 -08:00
Jigar 9078f11985
Added ContentType to pubsub/binding/state request-response (#1376)
Signed-off-by: jigargandhi <jigarr.gandhi@gmail.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2022-01-28 10:17:04 -08:00
Gehhilfe 44199ca4dc
Fix #1351 Fail with useful error message when an invalid account name is used (#1403)
* 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>
2022-01-13 09:02:07 -08:00
Lucas Jellema a013b58d6c
Implement State Store for OCI ObjectStorage service (#1401)
* Implement State Store for OCI ObjectStorage service

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* add go.mod and go.sum with dependencies on OCI SDK

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Removed dependency in unit test on OCI account

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Adding extensive unit test (coverage) using mock-OCI client

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

* Correcting linting issues and review requests

Signed-off-by: lucasjellema <lucasjellema@gmail.com>

Co-authored-by: Looong Dai <long.dai@intel.com>
2022-01-04 23:18:50 -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 175b09ea40
Adds retry on CosmosDB Init in case of TooManyRequests error (#1329)
* 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
2021-11-29 12:05:43 -08:00
Dmitry Shmulevich 3c52b73608
fixed typo in Query JSON (#1344) 2021-11-29 09:44:28 -08:00
Simon Leet dfe52cf88f
Remove Cloudstate component (#1303)
- Remove cloudstate state store component
- Update state/Readme.md

Fixes #1297

Co-authored-by: Long Dai <long.dai@intel.com>
2021-11-18 15:30:40 -08:00
Dmitry Shmulevich daf99fd3c2
add README for State Query API (#1258) 2021-11-02 16:46:03 -07:00
Dmitry Shmulevich ad9ebba204
update package name (#1267) 2021-11-02 15:47:07 -07:00
Artur Souza c4303d55db
Revert "Merge pull request #1143 from jigargandhi/content-type" (#1239)
This reverts commit e373b95489, reversing
changes made to 8505c1a1db.
2021-10-27 11:41:25 -07:00
Long Dai 67185db54e
Merge branch 'master' into content-type 2021-10-26 09:35:23 +08:00
Bernd Verst aa4f949838 Adds Dapr User Agent for Cosmos DB components 2021-10-25 17:59:34 -07:00
jigargandhi a5bb76bcfa fixing newline lint issue 2021-10-25 15:27:32 +05:30
jigargandhi 63f87f0641 Merge branch 'content-type' of github.com:jigargandhi/components-contrib into content-type 2021-10-25 15:13:50 +05:30
jigargandhi 54e2c1e01a Fix linting issues 2021-10-25 15:13:40 +05:30
Long Dai 89e6291d71
Merge branch 'master' into content-type 2021-10-25 09:31:29 +08:00
Dmitry Shmulevich 72754c6036
add missing license (#1226) 2021-10-22 10:39:56 -07:00
jigargandhi a09c7ade7b Added test for blob storage 2021-10-22 18:02:01 +05:30
Ian Luo e003319566
support json in mysql state #1168 (#1194)
* support json in mysql state #1168

* fmt, fix lint issue

* fix lint issue

* fix unit test failure

* add test against 'isbinary'

* fix lint issue

* enhance assertEquals

* remove unused 'expectedReadResponse' to fix lint issue

* go fmt to fix lint issue

* fix lint issue

Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-10-21 15:05:39 -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
Jigar Gandhi 34c20b0c0f removed nil check 2021-10-21 18:32:48 +05:30
Jigar 1acb76ee1c
Merge branch 'master' into content-type 2021-10-21 12:10:08 +05:30
Dmitry Shmulevich f96a71e4d7
add metadata to query request/response (#1215) 2021-10-20 17:22:42 -07:00
Dmitry Shmulevich e369fec17e
Add StateStore query API (#1153)
Add StateStore query API implementation for MongoDB, CosmosDB
2021-10-18 13:55:26 -07:00
Bernd Verst 317db02783
version stored procedure due to previous changes made (#1176) 2021-09-29 18:16:16 -07:00
Simon Leet 9a075cb43a
Fix existing integration tests (#1173)
* Fix servicebusqueues_integration_test.go compile errors

* Fix postgresql_integration_test.go deleteItemThatDoesNotExist expectations

* Fix mysql_integration_test.go deleteItemThatDoesNotExist expectations

* Fix mysql_integration_test.go for bindings

* Increase TTL in ServiceBusQueues tests for stability
2021-09-28 19:17:44 -07:00
TheoneFx e41acc494c
Add state alicloud.tablestore (#1116)
* state alicloud.tablestore

* some bug fix

* gofumpt

* add unit test

* gofumpt

* golangci-lint

* code refactor

* goimports

* goimports

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Long Dai <long0dai@foxmail.com>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-27 17:27:20 -07:00
Bernd Verst ac85ba2a8e
Add dapr user agent for Azure Components (#1152)
* Add dapr useragent for Service Bus and EventHubs

* Add useragent for tablestorage

* send dapr useragent

* more user agents

* formatting
2021-09-27 17:04:27 -07:00
Bernd Verst 905cbc028d restructure code and add comments per code review 2021-09-22 15:51:15 -07:00