ItalyPaleAle
b42e70606c
💄
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-22 23:38:55 +00:00
ItalyPaleAle
b70a17ed59
DRY
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-22 19:53:27 +00:00
ItalyPaleAle
8a58434660
Make timeout configurable
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-22 19:49:20 +00:00
ItalyPaleAle
80b1bb14b7
Changed postgres state store to use pgx instead of db/sql
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-20 22:45:38 +00:00
ItalyPaleAle
b1cc54f62c
Merge branch 'master' of https://github.com/dapr/components-contrib into postgres-ttl
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-13 21:16:57 +00:00
1046102779
2dd7433a59
feature: add context to state API
...
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-12-08 15:56:51 +08:00
ItalyPaleAle
f718462d23
💄
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-06 01:30:29 +00:00
ItalyPaleAle
413ee92d88
We don't need locks when we do things atomically
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-06 01:27:17 +00:00
ItalyPaleAle
64a70c230c
Fixed handling of concurrent background cleanups and added cert tests
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-06 01:24:22 +00:00
ItalyPaleAle
d4dcc54e29
Improved concurrency handling for migrations
...
And added cert test for that
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-05 21:00:31 +00:00
ItalyPaleAle
0b340d11d3
Cleanup interval uses metadata table to avoid multiple executions simultaneously
...
Also bug fixes
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-12-01 19:31:23 +00:00
ItalyPaleAle
b52482b394
Use a metadata table for postgres to store migrations
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-30 23:02:58 +00:00
ItalyPaleAle
15976110c6
💄
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 04:53:24 +00:00
ItalyPaleAle
1c3a0a1ea2
Fixed query
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 03:22:54 +00:00
ItalyPaleAle
2e7d5e7df6
Added garbage collection
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 02:05:07 +00:00
ItalyPaleAle
c54286a60d
Added TTL support for postgres
...
TODO: garbage collection
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-22 00:24:04 +00:00
ItalyPaleAle
ca729de1a9
Add expiredate column to state table
...
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-21 23:22:57 +00:00
ItalyPaleAle
1e728597b4
Misc refactorings
...
- Removed `state.DeleteWithOptions` and `state.SetWithOptions` which were useless at this point (likely a leftover from when there were retries)
- Some improvements in etag handling in postgres
- Other minor refactorings
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
2022-11-17 16:29:29 +00:00
Bernd Verst
b7d56fd7d6
Postgresql: allow custom table table
...
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-16 20:13:57 -08:00
Bernd Verst
3af0953516
Postgres State Store: Add Support for First-Write concurrency
...
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-11-16 20:13:57 -08:00
Bernd Verst
ede060959a
Refactors all state store to standardize metadata parsing ( #2257 )
2022-11-05 15:36:44 -07:00
Alessandro (Ale) Segala
ca3e80b76b
Updated depguard linter config ( #2245 )
...
* Updated depguard linter config
1. Add older (pre-v4) versions of `github.com/cenkalti/backoff` to the denylist
2. Add `github.com/agrea/ptr` to the denylist (use `github.com/dapr/kit/ptr` instead)
3. Fixed error messages for denied deps
Port of dapr/dapr#5438
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* ⚙️ 🧹
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Remove some github.com/pkg/errors
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* make modtidy-all after rebase
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>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
2022-11-03 22:19:21 -07:00
1046102779
203c6c7757
feature: add context to state API
...
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-25 07:21:35 +08:00
1046102779
5a367b401a
feature: add context to state API
...
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-10-21 17:25:14 +08:00
Bernd Verst
b9654bd979
upgrade to v5 of jackc/pgx
...
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-10-10 15:08:07 -07:00
Alessandro (Ale) Segala
bcea284c7b
Components' init functions should return interfaces ( #1997 )
...
* Components' init functions should return interfaces
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* 💄
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* pin latest berndverst contrib fork
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* Fixed component registration in tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Updated all cert tests
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@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>
2022-08-25 18:27:45 -07:00
Marcos Candeia
8964d8bf41
Define common metadata across components ( #1994 )
...
* Add base metadata for all components
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Fix lint issues on consul and mysql tests
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Pin candeia/dapr runtime version
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Add replace directive to use mcandeia/dapr on all go submodules
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
* Fixed runtime config instantiation
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
2022-08-25 10:10:53 -07:00
Bernd Verst
e87cd5e4cb
Go 1.19 support and linter fixes ( #1975 )
...
* 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>
2022-08-18 00:45:23 -07:00
qiangmzsx
79a3cd990a
Removing the use of the ioutil package And Fix CVE-2021-42576 ( #1954 )
...
* fix CVE-2021-42576
Signed-off-by: qiangmzsx <qiangmzsx@gmail.com>
* Removing the use of the ioutil package
Signed-off-by: qiangmzsx <qiangmzsx@gmail.com>
* Update middleware/http/nethttpadaptor/nethttpadaptor.go
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: qiangmzsx <qiangmzsx@gmail.com>
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-08-10 13:45:00 -07:00
deepanshuagarwal
a0ef46265b
Adding Pinger interface and Removing mandatory nature of Ping fuction ( #1784 )
...
* add `Pinger` interface.
Signed-off-by: chanyong.moon <dev.chanyongmoon@gmail.com>
* Convert Ping fuction to optional
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
* Removing unrequired Ping implementations
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
* Addressing comments
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
Co-authored-by: chanyong.moon <dev.chanyongmoon@gmail.com>
2022-06-14 08:27:54 -07:00
Yaron Schneider
37693b8d63
Add postgresql certification test + connection idle time ( #1778 )
...
* Add postgresql certification test + connection idle time
Signed-off-by: yaron2 <schneider.yaron@live.com>
* change flow name
Signed-off-by: yaron2 <schneider.yaron@live.com>
* go mod tidy
Signed-off-by: yaron2 <schneider.yaron@live.com>
* add to workflow
Signed-off-by: yaron2 <schneider.yaron@live.com>
2022-06-10 11:07:26 -07:00
Pravin Pushkar
3f85dd6702
adding query api to the feature list ( #1775 )
...
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
2022-06-07 08:38:02 -07:00
Wang Bing
db99b43068
Use revive instead of golint ( #1685 )
...
Signed-off-by: pigletfly <wangbing.adam@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
2022-05-06 12:55:17 -07: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
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
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
Dmitry Shmulevich
c7adb917f3
update license to Apache v2.0 ( #1406 )
2022-01-04 19:53:31 -08: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
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
Long Dai
988fed05ab
ci: standard linter config ( #1102 )
...
* ci: standard linter config
Signed-off-by: Long <long.dai@intel.com>
* Update utils.go
* fix pulsar issue
Signed-off-by: Long <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
2021-09-21 15:21:59 -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
Yaron Schneider
3ef025c604
change headers ( #679 )
2021-02-09 18:57:55 -08:00