grafana/pkg/apiserver/rest
Leonor Oliveira 9baf96dbd2
Storage: dualwriter update implementation (#85844)
* Add update methods for the dual writer

* improve errors

* [WIP] add tests for the update method

* Move example package to its own package so it can be used by the rest package. Finish tests

* Add codeowners

* Use Pod as a dummy resource

* :int

* Lint

* [REVIEW] rename var

* [REVIEW] don't rely on legacy storage at all in mode4

* Update pkg/apiserver/rest/dualwriter_mode2.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

* [REVIEW] improve comment

* Update pkg/apiserver/rest/dualwriter_mode1.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* [REVIEW] improve mode3

* Lint

* Move test files

* Update pkg/apiserver/rest/dualwriter_mode2.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

* Lint

* Update pkg/apiserver/rest/dualwriter_mode4_test.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

* Fix error

* Lint

* Update pkg/apiserver/rest/dualwriter_mode2.go

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>

* Don't set the flag to true as updatedObj creates an object in case it's not found

* Lint

* Lint

* Add tests on update

* Lint

---------

Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-04-17 08:32:34 -06:00
..
dualwriter_mode1_test.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode1.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode2_test.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode2.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode3_test.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode3.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode4_test.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter_mode4.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
dualwriter.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
spy_client.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00
storage_mocks_test.go Storage: dualwriter update implementation (#85844) 2024-04-17 08:32:34 -06:00