Commit Graph

21 Commits

Author SHA1 Message Date
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
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
문찬용 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
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
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
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
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
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 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
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 df6c3c3e32
add params for mongoDB (#216) 2020-02-10 11:04:37 -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
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