Commit Graph

281 Commits

Author SHA1 Message Date
Simon Leet 52bac7be17
Fix parseErr return in blobstorage Init() (#1108)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-09-01 13:05:32 -07:00
Alessandro (Ale) Segala a992cd19f0
Support Azure AD auth for Cosmos DB (#1104)
* 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>
2021-09-01 12:44:05 -07:00
Bernd Verst 059dc8c0d2
Conformance tests & bugfixes for SQLServer (#1078)
* enable sqlserver conformance test

* Update SQL Server conformance test setup

* Fix sqlserver bug introduced in Go 1.16

* sqlserver almost conformant

* Fix conformance tests and stored procedure

* all sqlserver tests passing

* Minor touchup

* lint

* Remove unnecessary condition

* Add conformance test to GitHub workflow

* remove env variable

* Update stored procedure

* Simplify error handling

* Update state/sqlserver/sqlserver.go

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>

* Update state/sqlserver/sqlserver.go

Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>

Co-authored-by: Bernd Verst <me@bernd.dev>
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>
2021-08-19 17:47:56 -07:00
Simon Leet ce0674fb48
Patch cosmosdb first-write without etag state test (#1069)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2021-08-17 15:47:28 -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
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
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
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
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
Dmitry Shmulevich 1ac87d93c5
Add more tests for MongoDB state store component (#948) 2021-06-16 13:51:35 -07:00
Dmitry Shmulevich 1580e4ab04
Add 'server' field to MongoDB metadata to support DNS seedlist connection format. (#947)
*  for non-empty `server` field, the connection URI is set to 'mongodb+srv://<server>/'

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-06-16 11:32:22 -07:00
Phil Kedy a28587ed98
Resolving gofumpt issues (#932) 2021-06-09 15:18:50 -07:00
Taction 464d53d94b
Move the common Redis code to internal (#859)
* Move pubsub redis client to internal

* Add failover for common redis. Refactor state redis.

* refactor binding redis

* fix lint

* Refactor to setting partten

* fix db and lint

* fix lint

* for backward compatibility

* Using a type alias to handle decoding duration values of -1 for Redis.

* Linter fixes

Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
2021-06-06 23:24:36 -07:00
Long Dai 95cc3f9b81
fix a typo (#910)
Signed-off-by: Long Dai <long0dai@foxmail.com>
2021-06-04 12:08:40 -07:00
문찬용 b387fcdff3
add Ping operation to`store` interface. (#757)
* 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>
2021-05-25 23:48:46 -07:00
Jony4 2892d6abfa
add BulkGetResponse comments (#845)
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-05-13 23:10:09 -07:00
Charlie Stanley b4e5569c24 Update Aerospike to v4.5.0 2021-05-10 18:40:33 +00:00
zhangchao 69b24d0394 fix lint 2021-04-23 22:32:26 +08:00
zhangchao b1c81523c2 fix add add a ctx context variable in the Redis struct. And implement `Close() error` function. 2021-04-23 22:15:33 +08:00
zhangchao 5190fe4e7d Merge branch 'master' into upgrade_redis_client_to_v8
resolve conflict

* master:
  Increasing overall test timeout to allow for conformance tests to run (#834)
  Improve SMTP binding performance (#782)
  add redis cluter mode for pubsub (#823)
  downgrade the verbosity of lock renewal errors from warn to debug. This error is expected when messages are processed before beingrenewed (#803)
  Improve pulsar publisher performance. (#827)
  optimze(state/redis): output detail redis error (#825)
  Consul nameresolution component (#750)
  Add DNS name resolver. Add unit tests. (#743)
  Azure Service Bus: Changed log level of error on close to info (#830)
  Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807)
  Update state/blobstorage.go to add metadata. (#786)
  Azure Service Bus publishing retries when server is "too busy" (#821)

# Conflicts:
#	bindings/redis/redis.go
#	go.mod
#	go.sum
#	pubsub/redis/redis.go
2021-04-22 09:13:01 +08:00
yellow chicks 2320824409
optimze(state/redis): output detail redis error (#825)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-04-21 10:43:05 -07:00
Phil Kedy 688df9bda4
Removed dependency on dapr/dapr in favor of dapr/kit. Fixed go mod dependencies afterwards. Go 1.16 in go.mod. Removed accidental log dependency. (#807) 2021-04-19 12:06:10 -07:00
Daniel Beall a35a715f9c
Update state/blobstorage.go to add metadata. (#786)
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
2021-04-15 21:40:09 -07:00
Phil Kedy 814145dca3
Merge branch 'master' into upgrade_redis_client_to_v8 2021-04-12 19:52:16 -04:00
zhangchao 3ec4b336a9 upgrade go-redis/redis to v8, and use context in pubsub/redis to cancel redis request. 2021-04-10 23:41:58 +08:00
Syuparn 760a4caccc fix password config for redis sentinel state 2021-03-27 19:21:45 +09:00
Artur Souza aed9b583d9
Merge branch 'master' into fix_cosmosdb_contenttype 2021-03-17 23:27:25 -07:00
yellow chicks c3b161ed83
fix(typo): state redis log (#761) 2021-03-17 23:14:56 -07:00
Artur Souza 683246700e Add error check for required fields in cosmosdb. 2021-03-16 15:21:13 -07:00
Artur Souza 4f8e7f3358 Defaults to application/json for cosmosdb in init() 2021-03-16 15:10:40 -07:00
Artur Souza 0d44da776c Fix cosmosdb state store to handle content-type, with JSON as default. 2021-03-16 12:39:16 -07:00
Artur Souza 931048aa60
Add Feature list for state store. (#744)
* Add Feature list for state store.

* List Transactional as a feature for state store.

* Fixing comments about etag.
2021-03-05 14:55:23 -08:00
Phil Kedy a15c616bb0
Make state.GetResponse ETag to a *string (#733)
* Make state.GetResponse ETag to a *string

* Small fixes post merge of #716

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-03-03 13:28:59 -08:00
halspang cb3c881d39
Add ETag operation to statestore conformance test (#716)
* 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>
2021-03-03 12:27:10 -08:00
Artur Souza a8de09faf4
Adds etag support to MongoDB. (#729)
* Adds etag support to MongoDB.

* Addressing PR comments.

* Remove empty etag check.
2021-03-01 15:02:28 -08:00
Artur Souza 2562908dee
Conf state trx + Change mongodb get result for key not found + Fix byte[] in cosmosdb (#680)
* 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>
2021-02-10 18:15:59 -08:00
Yaron Schneider 3ef025c604
change headers (#679) 2021-02-09 18:57:55 -08:00
Trond Hindenes 83975462bf
State:Dynamodb - Dont require access key/secret (#652)
* Dont require access key/secret

* Validate table name

* Fixed test issues

* Fix failing tests....?

* gofmt-ed files

* Remove unneeded fmt statement
2021-02-03 11:19:32 -08:00
Donovan Brown 5368d25951
Adding MySQL State Component (#612)
* Adding MySQL State Component

* Fixing File is not `gofumpt`-ed (gofumpt)

I believe the issue was No empty lines before a simple error check

* Fixing final lint errors that only showed up in CI

* gofumpt-ed in test files.

* Changing error for affected rows.
Want to distinguish database errors from application errors.

* The database (schema) can now be created for you.

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-01-26 12:29:57 -08:00
Yaron Schneider 99256e6bec
Provide distinction between missing and empty etags (#600)
* provide distinction between missing and empty etags

* linter

* linter 2
2021-01-14 10:41:38 -08:00
Yaron Schneider 37815ad9a5
export etag error kind (#585) 2021-01-11 12:40:35 -08:00
Yaron Schneider f44673c311
add missing error checks for etag errors (#584) 2021-01-11 10:15:47 -08:00
Yaron Schneider 4d3e1be105
Treat etag errors across all state stores (#579)
* treat etag errors across all state stores

* linter

* linter
2021-01-08 18:59:42 -08:00
Yaron Schneider 10b3dc16fe
fix couchbase serialization (#552) 2020-12-07 09:43:46 -08:00
Sky/敖小剑 5dc3587f7d
Add bulk get in state store - Plan B (#532)
* add BulkGet method on state store

* add a bool value in bulk get method to tell dapr if this store supports bulk get or not

* add  BulkGetResponse for bulk get; rollback GetResponse to remove new added filed key

* update to use BulkGetResponse for bulk get

* fix lint issues

* fix lint issues

* fix lnit issues
2020-11-26 23:07:27 -08:00
Trond Hindenes 8d6978372f
Various AWS improvements (#525)
* Support sessiontoken

* Fixed tests and other components

* Fixed tests and things

* fmt

* Fix lint errors

* gofmt

* Fixed lint bugs

* Remove unneeded parameter

* gofmt

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-11-23 13:21:29 -08:00
Aaron Crawfis a27e486ef9
Update docs with new docs links (#513) 2020-10-26 11:52:20 -07:00
Sky/敖小剑 4e77594a4d
remove etcd state store to prepare to update grpc to new version (#499)
* remove etcd state store to prepare to update grpc to new version

* update go.mod

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-10-15 09:53:49 -07:00
halspang f647d9eedb
Upgrade golang lint to 1.31 (#490)
Upgrade golang lint to 1.31.0

https://github.com/dapr/components-contrib/issues/439
2020-10-12 12:54:15 -07:00
Jack M 1a5a72e4a9
Fixed #488 - Update state store list in readme. (#489)
Co-authored-by: Jack M <root@exegete.me>
2020-10-06 11:16:44 -07:00
Artur Souza ab1ff1055a
Fixing bug where trx del in redis fails without etag. (#482) (#484) 2020-09-26 18:24:12 -07:00
Mark Chmarny fbc3a3dd87
RethinkDB state store support (#423)
* rethinkdb state store

* added actor state change binding

* updated db record

* reconnect

* passing lint

* updated binding repsonse keys

* rethinkdb load test

* lint validated tests

* updated comments

* updates TransactionalStateRequest

* parameterized table

* correct error message

Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-09-24 16:19:14 -07:00
Nghia Tran e51cff7fec
Use concurrency control in Multi() (#466)
Change Multi() to use same setQuery and delQuery mechanisms as Set() and Delete().
2020-09-22 15:13:39 -07:00
Mukundan Sundararajan d2ee3200cd
Properly handle serialization deserizliation for redis transaction api. (#460)
* Properly handle serialization deserizliation for redis, postgres transaction api.

* Convert marshaler to a utils function.

* Add license comment

* init error inline
2020-09-15 12:54:29 -07:00
AbserAri 2b1103ec9f
Redis failover feature (#459)
* update logger form nats-io's to dapr's

* run go mod tidy and go mod delete the nats-io gnatsd

* update rabbitmq prefetch feature because want to set each instance the number of messages could  hold in once until ack.

* update for parse int

* update parseMetadata of rabbitMQ to read prefetchCount by string.

* [update rabbitMQ binding parseMetadata] Make error clear

* update the redis failover metadata

* [in rabbitMQ metadata parse] fix the bug of golint

* [redis statestore failover feature] add new client logic.

* update redis metadata as advice.

maligned struct of size 80 bytes could be of size 72 bytes.

* update rabbitMQ with a new parseMetadata way.

* omit comparison to bool constant as golangci-lint.

* [typo] matser -> master

* Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master"

This reverts commit 9a91bccc4b, reversing
changes made to 7e0cb1fa2d.

* Revert "Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master""

This reverts commit 110ef82681.

* Revert "Merge branch 'master' of https://github.com/dapr/components-contrib into dapr-master"

This reverts commit 9a91bccc4b, reversing
changes made to 7e0cb1fa2d.

* solve the conflct

* merge from the master to accept the change

* remove the defaultFailover as the reviewed.

* move newclient to function

* Update state/redis/redis.go

Co-authored-by: Nghia Tran <tcnghia@gmail.com>

* update comment to /* #nosec  */

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Nghia Tran <tcnghia@gmail.com>
2020-09-14 17:14:52 -07:00
Leon Mai 857d5652bd
Use metadata at top level instead of per request (#452)
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-09-04 09:56:27 -07:00
Young Bu Park c69d5ea2ca
Add metadata property to TransactionalRequest (#430)
* Add Metadata to transactional request

* Use new transactional request strcut
2020-08-12 09:30:37 -07:00
Shalabh Mohan Shrivastava 42668a8ae1
State Store Components changes to adhere runtime changes for removing retry options (#426)
* State Store Components changes to adhere runtime changes for removing state retry options

* resolving code review comments - common method to CheckRequestOptions
2020-08-11 10:50:31 -07:00
Leon Mai 65575593c1
Sql component should save db object on Init instead of creating a new (#399)
one per operation.

Separately, if data arrives as []byte (as in grpc case) don't Marshal
it.

Co-authored-by: LM <lemai>
2020-07-29 15:26:07 -07:00
Sivamuthu Kumar 6085834d79
Add blob storage as state store (#348)
* Add blob storage as state store

* Updated comments for blob storage

Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-07-22 08:49:20 -07:00
LMWF 1983d86849 merge 2020-07-14 13:59:29 -07:00
Leon Mai 85aca5ac44
Merge branch 'master' into cosmos4 2020-07-14 13:45:03 -07:00
LMWF 15be14b9b3 cleaned up 2020-07-14 13:17:38 -07:00
LMWF 17d3d0b848 #377 - cosmos deserialization issue 2020-07-13 20:07:36 -07:00
Brooke Hamilton a0a293ca1b
[WIP] PostgreSQL State Store (#353)
* Added postgres state files

* Fix SQL Server integration tests. (#324)

* Initial unit and int tests for postgres

* Implemented dbaccess interface

* Formatting updates

* Create state table if not exists

* Initial set implementation

* Get and set with integration test

* Added delete

* Create date and update date in database

* Integration tests for bulk set and bulk delete

* Etag processing, test refactor

* Added tests for etag processing

* Updated const, removed public metadata fields

* Cleanup edits

* Fixed linting issues

* Ran go mod tidy

* Initial implementation of TransactionalStore

* Fixed linting issues

* Added tests and validation

* Test for creating the state table

* Fixed issue with parsing param value as string

* Update to integration tests

* Fixed linting issues

* Added retry logic from state

* Changed primary key to text

* Updated debug logging

* Review updates

Co-authored-by: Young Bu Park <youngp@microsoft.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-07-09 13:56:08 -07:00
Leon Mai a086a42f2b
Implement the Multi() interface method adding transaction support in … (#372)
* Implement the Multi() interface method adding transaction support in the cosmos db component.  The implementation
uses a stored procedure to do this.  The stored procedure is registered in Init().

* linter

* code review comments

* code review

* remove comment

* casing and de-dup

* use 'in' in query

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-06-30 13:32:41 -07:00
Shalabh Mohan Shrivastava 007dbd03b0
Fix for context deadline exceeded issue - use operation timeout (#370) 2020-06-25 15:11:56 -07:00
Shalabh Mohan Shrivastava 7b0fbe65cc
Setting URL correctly when username/password is not provided (#369)
* Adding Username/password optional

* fixing lint errors
2020-06-25 13:29:52 -07:00
Mukundan Sundararajan 5c62707aba
Upgrade go version to 1.14.3 and linter version to 1.26.0 (#352)
* Upgrade to go 1.14.3 and linter version to 1.26.0
2020-05-29 15:26:33 -07:00
Sashi Kumar 42a7af4c0c
[DynamoDB] Update BulkSet and BulkDelete with BatchWriteItem (#331)
* [DynamoDB] Update BulkSet and BulkDelete with BatchWriteItem

* Validate type of value

* Marshal value before setting for Set and BulkSet

Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-05-27 15:12:34 -07:00
Trond Hindenes d3e9a7b3a7
Use shared aws auth package (#347)
* Use shared sqs auth package

* Goimports-ed files

* Added support for endpoint param in aws credentials abstraction, since the sqs-sns pubsub module required it

* Added endpoint support for all aws things

* Updated tests
2020-05-26 16:27:16 -07:00
Brooke Hamilton 909739702e
Fixed SQL Server state store integration tests (#324) (#325) 2020-05-18 09:40:26 -07:00
Julian-Chu caab6d32eb
don't treat non-existent keys as errors (#300) 2020-04-09 12:03:02 -07:00
Young Bu Park 0489fb17f3
Fix linter errors (#293) 2020-04-01 17:22:15 -07:00
pruthvidhodda fe9b90075a
Change redis client library to go-redis for redis component (#283)
* Change redis client library to go-redis for redis component to support TLS
2020-03-30 19:50:48 -07:00
Sivamuthu Kumar 910a8931f7
Empty response when aerospike state key not found (#285) 2020-03-28 09:06:01 -07:00
Abhishek Gupta a0b981bda5
don't treat non-existent keys as errors (#274)
Co-authored-by: Aman Bhardwaj <amanbha@users.noreply.github.com>
2020-03-19 14:22:17 -07:00
Abhishek Gupta b6f15ed72c
don't treat non-existent keys as errors (#275) 2020-03-19 12:28:37 -07:00
Sivamuthu Kumar 14b08a11cf
Couchbase state store: don't treat non-existent keys as errors (#276)
* Couchabse state store: don't treat non-existent keys as errors

* Check specific key not found error
2020-03-19 12:27:38 -07:00
Young Bu Park 60490d584d
Fix linting errors (#257) 2020-03-09 08:33:09 -07:00
Yaron Schneider 703f9bf04e
Initial implementation (#116)
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2020-03-04 14:42:02 -08:00
Young Bu Park 3f3100fc22
fix wrong pkg (#239) 2020-02-28 16:32:24 -08:00
Young Bu Park ee97c3c56a
Use dapr logger (#238)
* Use dapr logger

* skip linter false alarm
2020-02-28 15:49:49 -08:00
Yaron Schneider d40be01831
fix sql server get (#233) 2020-02-25 03:23:40 -08:00
Yaron Schneider df6c3c3e32
add params for mongoDB (#216) 2020-02-10 11:04:37 -08:00
Young Bu Park 5a24823c89
Upgrade go to 1.13.7 and linter to 1.23.2 (#205)
* upgrade go

* Fix all linter errors
2020-02-03 14:29:29 -08:00
REDDY PRASAD 5f3f850852
Add GCP Secret Manager (#199)
*  Add GCP Secret Manager

* Update tests

* Fix lint errors

* Update as per review

* Run go mod tidy

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-01-30 21:51:52 -08:00
Haishi2016 0cfa9ad99c
sort store names alphabetically (#201) 2020-01-30 17:00:57 -08:00
Yaron Schneider 4433e605f1
Add CloudState CRDT (#200)
* add CloudState CRDT

* fix linter

* add tests
2020-01-29 14:13:23 -08:00
Abhishek Gupta 6de230391d
Aerospike state store implementation (#196)
* aerospike state store impl

* fixed linter issues:

* addressed feedback

* Delete bearer_middleware.go

* Delete cassandra_test.go

* Revert "Delete cassandra_test.go"

This reverts commit 462c066814.

* Revert "Delete bearer_middleware.go"

This reverts commit ae114a1df1.

Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-01-28 18:55:14 -08:00
Ivan Gavryliuk 84c4e6bf8e Azure Table Storage state (#197)
* initial scaffolding

* tidy go.mod

* adding delete functionality and tests

* updating Readme.md

* ETag concurrency support and github review fixes

* removing unused isConflictError

* ping build, some issue with CI timing out

Co-authored-by: Young Bu Park <youngp@microsoft.com>
2020-01-28 09:20:18 -08:00
Abhishek Gupta 9323c44ecf check etag for etcd update and delete ops (#175) 2020-01-09 12:33:23 -08:00
Francisco Beltrao 1a37f892aa Move SQLServer state store from azure folder (#181) 2020-01-07 23:38:44 -08:00
Artur Souza 0ad870bebf
Merge branch 'master' into dapr-issue123 2020-01-07 14:05:59 -08:00
Francisco Beltrao db8b6135d6 Rename SQLServer state ctor to existing pattern (#176) 2020-01-07 06:17:13 -08:00
abhishek 7d841d55a9 added port option to cassandra state store 2020-01-07 18:05:26 +05:30
Francisco Beltrao 70381d8312 Add sql server state (#158)
* Add sql server state

* Fix lint

* Disable docker based tests

* Rename store to SQLServer
Use env variable DAPR_TEST_SQL_CONNSTRING to enable integratoion test

* Add support to Azure SQL on integration test

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2020-01-06 09:14:13 -08:00
Abhishek Gupta c4bd2a47ea Implementation for Hazelcast based state store (#145)
* hazelcast store impl

* go.mod update
2019-11-27 21:12:47 -08:00
sayboras 08362d9e6b Added check for go.mod (#141)
* Added check for go.mod

* Rename the make target

* Grrrrr

* Update go.mod and go.sum

* Run gofmt and goimports

* Correct typo
2019-11-25 00:45:51 -08:00
Shalabh Mohan Shrivastava bcd23db009
Changes to include Package names pubsub/secret stores/state to be consistent with company name (#137)
* [Commit - PubSub changes ]

Changing the names of the packages directory so to be consistent with name of the company .

It is to be noted that package name can not have hyphen "-" in the name.
So changing the directory names and putting under company names.

For example - servicebus package would be

dapr/components-contrib/pubsub/azure/servicebus

* Commit 2 - Changes for Secret Stores

* Commit 3 - for the state store changes
2019-11-22 12:46:42 -08:00
Leon Mai 48d385b82b Don't return nil for response when length of items is 0 (#133) 2019-11-20 15:21:21 -08:00
Shalabh Mohan Shrivastava 4ad618f2f4 Adding metadata to State Delete and Get requests 2019-11-19 14:03:11 -08:00
Yaron Schneider 9c6f0e9ebf
Update Readme.md (#129)
Update with Couchbase addition.
2019-11-18 23:53:54 -08:00
Abhishek Gupta 356981000e Couchbase state store implementation (#100)
* first cut for couchbase store

* set and delete account for etag

* updated implementation

* fixed go mod
2019-11-18 23:13:41 -08:00
Yoichi Kawasaki bd36a6759f Added state store: Cloud Firestore (#110)
* Added State Store: Cloud Firestore

* changed state store name
2019-11-08 14:43:43 -08:00
Shalabh Mohan Shrivastava 08e654c0cd Change TransactionalStateStore interface to TransactionalStore (#114)
* Change TransactionalStateStore interface to TransactionalStore

https://github.com/dapr/components-contrib/issues/91

* Updating the ReadMe file

Changing to TransactionalStore and also including new MongoDB state store.
2019-11-08 12:10:19 -08:00
Shalabh Mohan Shrivastava 4b58411247 Adding transactions support to MongoDB (#111)
* Adding transactions support to MongoDB

* Resolving code review comments

* fixing the issue while testing, passing options in the callback
2019-11-08 11:33:39 -08:00
Yaron Schneider 75b1fc29b4
Update Readme with Zookeeper (#90) 2019-10-31 21:06:51 -07:00
Flier Lu 342e0d6223 [WIP] Add zookeeper state store (#80)
* [WIP] Add zookeeper state store

* go mod vendor

* fix lint warnings

* change state.StateStore to state.Store
2019-10-31 21:04:34 -07:00
Shalabh Mohan Shrivastava 3ae5547e41 Adding MongoDB State Store Implementation (#53)
* Adding MongoDB State Store Implementation

Adding MongoDB State Store Implementation

* Fix bugs and add unit tests

* Adding write/read concerns

* go sum changes

* adding defer cancellation

* fixing the bug for default case override

* Resolving code review comment

* Adding go mod vendor files

* Fixing lint errors
2019-10-31 12:03:04 -07:00
Abhilash Singh 0cae368496 [WIP] Add memcached state store (#71)
* Add memcached state store init

* Add parsing of optional parameters

* Add tests

* Update vendor

* Add memcached to supported state store list
2019-10-31 06:21:04 -07:00
sayboras a26e926ad2 Rename the StateStore interface (#70)
* Rename the interface

* Revert the godoc changes
2019-10-30 17:44:47 -07:00
Leon Mai 4200a3cc2d Add link to examples (#83) 2019-10-30 11:49:25 -07:00
Young Bu Park e48d4bca90
Merge branch 'master' into state-fix 2019-10-29 16:55:12 -07:00
Haishi Bai b278fb7da0 relax etag check during delete 2019-10-29 16:24:31 -07:00
sayboras 8adf323961 Add github action for CI (#59)
* Initial commit

* Fixed all linting error

* Used prepared query instead of string format

* Enabled linter for test
Enabled below linters
    - gochecknoglobals
    - gochecknoinits

* Enabled below linters
    - godox
    - interfacer
    - maligned

* Revert name change for StateStore in pkg state

* Incorporate review comments

* Cleanup the github ci

* Correct typo

* Add golangci-lint version in github ci step

* Update Readme.md
2019-10-28 15:39:48 -07:00
Anubhav Mishra cc7578c02b state: initial version for the consul state store implementation (#52)
* state: initial version for the consul state store implementation

* updates after review

* changes after running go mod vendor

* more clean up after review
2019-10-25 21:34:16 -07:00
Yaron Schneider f2b0cede8a
Add cassandra state store (#48)
* add cassandra state store

* refactor return statements
2019-10-23 12:47:28 -07:00
Roberto Rojas 63af15926b ETCD Implementation of State Store (#42)
* etcd: initial commit

* etcd: functionality and unit tests

* etcd: fixes marshaling data sent to etcd

* changes as per PR review
2019-10-22 14:30:15 -07:00
Yaron Schneider 887cd92b8d
vendor update (#34) 2019-10-14 23:49:50 -07:00
shalabhs 4a62360ad4 - adding more corrections 2019-10-10 18:16:08 -07:00
shalabhs 1aa7125ca4 adding commment. 2019-10-10 18:13:06 -07:00
shalabhs ae8c77f43b Adding and Correcting code comments and types 2019-10-10 18:09:13 -07:00
Aman Bhardwaj 04bef3ac3f Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
Yaron Schneider 70c06fadd8
redis: skip marshalling if []byte (#23) 2019-10-06 07:53:26 -07:00
Yaron Schneider 2b8dbd2b44
dapr name change (#21) 2019-10-02 13:21:22 -07:00
Yaron Schneider ec74d90bf4
More descriptive Redis errors (#19) 2019-09-30 13:02:30 -07:00
yaron2 22fea6f43d initial commit 2019-09-26 15:47:41 -07:00