owensmallwood
8dddff3ce4
Unified Storage: Pass ns, group, resource to GetResourceStats instead of just namespace ( #114050 )
...
* passes nsr to GetResourceStats instead of just namespace
* removes ns check
* fixes failing tests
* make update-workspace
* pass group and resource from rebuild request when getting resource stats
2025-11-18 13:05:21 -06:00
Georges Chaudy
1162fa5104
kvstore: Add optimistic locking for unified resource storage backend ( #113230 )
...
* Add optimistic concurrency
* add optimistic concurrency
* fix test
* nit
* fix tests for sql
* fix tests for sql
* rebase fix
* add one more check
* Implement GetLatestAndPredecessor method in datastore and add corresponding tests. This new functionality retrieves the latest resource version and its immediate predecessor, handling cases for single and non-existent resources. Update WriteEvent to utilize this method for improved optimistic concurrency control.
* Enhance optimistic concurrency control in WriteEvent method. Added checks for concurrent create operations to ensure only one succeeds, preventing race conditions. Updated tests to validate this behavior with multiple concurrent create attempts.
* lint
* Refactor optimistic concurrency check in WriteEvent method. Simplified the logic by removing unnecessary condition for single version existence, ensuring more robust handling of concurrent modifications.
2025-11-14 10:42:39 +01:00
Will Assis
c9e4c26c11
unified-storage: add more list pagination tests ( #113543 )
...
* unified-storage: add more list pagination tests
2025-11-06 13:36:02 -05:00
Georges Chaudy
ddeb970b4d
unistore: replace CDK backend with KV store backend (again) ( #113184 )
...
* Reapply "unistore: replace CDK backend with KV store backend"" (#113132 )
This reverts commit 7127b2538c .
* enable cluster scope
2025-11-04 00:33:36 +00:00
Georges Chaudy
07bf7b2ae1
kvstore: add cluster-scoped resource support ( #113183 )
...
kvstore add experimental clusterscope resource
2025-11-03 15:53:59 -08:00
Georges Chaudy
9533cc4dbb
kvstore: Fix missing Folder field in listModifiedSinceEventStore data lookup ( #113131 )
...
* fix: ListModifiedSince for resources in folders
* fix: ListModifiedSince for resources in folders
2025-10-28 23:18:15 +01:00
Stephanie Hingtgen
7127b2538c
Revert "unistore: replace CDK backend with KV store backend"" ( #113132 )
...
Revert "unistore: replace CDK backend with KV store backend" (#112746 )"
This reverts commit fe9c21ebf8 .
2025-10-28 21:37:51 +00:00
Georges Chaudy
147ff4279b
kvstore: fix events lookback + startkey ( #113092 )
...
* fix snowflakes events
* add tests
2025-10-28 17:25:55 +01:00
Georges Chaudy
fe9c21ebf8
unistore: replace CDK backend with KV store backend" ( #112746 )
...
* deprecate the cdk backend in favor of the kv storage backend
* lint
* fix watchtests
* cover limit=0 for ListHistory
* fix rv too large
2025-10-28 10:56:08 +01:00
Georges Chaudy
616de7b566
Fix kvstore wire ( #111827 )
2025-10-14 11:30:07 +02:00
Stephanie Hingtgen
e01e61a156
Trash: Keep provisioned objects out of the trash ( #111714 )
2025-09-28 20:33:57 +00:00
Georges Chaudy
c251ebf4d5
kvstore: merge the metadata store into the datastore ( #110334 )
...
* migrate eventstore to datastore
* Add folder to event key
* lint
* lint
* lint
* lint
* remove foundkye
* refactor the Keys methods to move the Sort outside the ListKey method
* remove bad import
* fix missing params
* lint
* fix test
* perf improvement
2025-09-16 12:16:29 +02:00
owensmallwood
310893292f
Unified Storage: Add sort order to keys func in datastore ( #110714 )
...
* Add sort order to keys func in datastore. Add test to not prune deleted events.
* include sort field in the ListRequestKey instead of it being a separate param
2025-09-11 14:12:30 -06:00
owensmallwood
dc1c5a610c
Unified Storage: Fix broken tests ( #110710 )
...
fix broken tests
2025-09-05 17:19:13 +00:00
owensmallwood
d715bda8af
Unified Storage: Adds pruner to kv backend ( #110549 )
...
* WIP adding pruner to kv store impl
* pruner only keeps 20 most recent versions
* ignore grafana-kv-data folder
* extracts some stuff to pruner.go file. Adds tests. Adds kvBackendOptions.
* update logging, comments, exports kvbackendoptions fields
* update nooppruner ref
* fixes field casing in test
* fix test
* linter fixes
* remove comment
* make KvStorageBackend private
* Adds pruner key validation and tests. Fixes broken tests.
* update error message when validating pruner key
2025-09-05 10:02:11 -06:00
Will Assis and Georges Chaudy
ea7c370edd
unified-storage: add ListSinceModified to kv store ( #110250 )
...
* implement ListKeysSince in event store
implement data store version
---------
Co-authored-by: Georges Chaudy <chaudyg@gmail.com >
2025-09-04 12:26:40 -04:00
Georges Chaudy
b6dd08da2f
unistore: fix delete and db closed in kv store ( #107918 )
...
* fix delete and db closed
* fix tests
2025-07-10 11:34:36 +02:00
Georges Chaudy and Peter Štibraný
696657bdd1
unistore: add kv based storage backend ( #107305 )
...
* Add datastore
* too many slashes
* lint
* add metadata store
* simplify meta
* Add eventstore
* golint
* lint
* Add datastore
* too many slashes
* lint
* pr comments
* extract ParseKey
* readcloser
* remove get prefix
* use dedicated keys
* parsekey
* sameresource
* unrelated
* name
* renmae tests
* add key validation
* fix tests
* refactor a bit
* lint
* allow empty ns
* get keys instead of list
* rename the functions
* refactor yield candidate
* update test
* unistore: add LastResourceVersion to datastore
* lint
* use map string
* missing err check
* fix
* Add storage backend
* remove hasmore
* fix tests
* small refactor
* pre-alloc
* extract the folder
* lint
* refactor
* handle context canceled in ListHistory to pass the tests
* fix the resource test
* unistore: provide generic tests for the kv interface (#107443 )
unistore: move the kv tests to the testing package
* Update pkg/storage/unified/resource/storage_backend_test.go
Co-authored-by: Peter Štibraný <pstibrany@gmail.com >
* address comments
* comments
* comments
* comments
* normalise the names and add helper method
* events comments
* rename function
---------
Co-authored-by: Peter Štibraný <pstibrany@gmail.com >
2025-07-02 10:57:37 +00:00