Secrets: make operations sync (#107732)

* Secrets: make operations sync

* k8s gen / update query to list secure values to include the version

* always store new version of a secret

* make update-workspace

* go mod tidy

* update queries

* update queries

* improve and use testutils in decrypt_store_test

* fix broken test

* make update-workspace

* ./hack/update-codegen.sh secret

* update Test_SecureValueMetadataStorage_CreateAndRead

* undo dependency changes

* linter: fix remaining errors

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
This commit is contained in:
Bruno
2025-07-09 10:43:34 -03:00
committed by GitHub
parent ded7912ea3
commit 8283d35e56
112 changed files with 873 additions and 3490 deletions
@@ -8,10 +8,8 @@ INSERT INTO {{ .Ident "secret_secure_value" }} (
{{ .Ident "created_by" }},
{{ .Ident "updated" }},
{{ .Ident "updated_by" }},
{{ .Ident "status_phase" }},
{{ if .Row.Message.Valid }}
{{ .Ident "status_message" }},
{{ end }}
{{ .Ident "active" }},
{{ .Ident "version" }},
{{ .Ident "description" }},
{{ if .Row.Keeper.Valid }}
{{ .Ident "keeper" }},
@@ -33,10 +31,8 @@ INSERT INTO {{ .Ident "secret_secure_value" }} (
{{ .Arg .Row.CreatedBy }},
{{ .Arg .Row.Updated }},
{{ .Arg .Row.UpdatedBy }},
{{ .Arg .Row.Phase }},
{{ if .Row.Message.Valid }}
{{ .Arg .Row.Message.String }},
{{ end }}
{{ .Arg .Row.Active }},
{{ .Arg .Row.Version }},
{{ .Arg .Row.Description }},
{{ if .Row.Keeper.Valid }}
{{ .Arg .Row.Keeper.String }},
@@ -48,4 +44,4 @@ INSERT INTO {{ .Ident "secret_secure_value" }} (
{{ .Arg .Row.Ref.String }},
{{ end }}
{{ .Arg .Row.ExternalID }}
);
);