From 2e2ce8fddd8ad4c3236bf7b0835b735654c4b2ab Mon Sep 17 00:00:00 2001 From: Dafydd Date: Tue, 2 Dec 2025 15:53:35 +0000 Subject: [PATCH] wip: exploring update validation --- pkg/registry/apis/collections/datasources.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/registry/apis/collections/datasources.go b/pkg/registry/apis/collections/datasources.go index 2c0714bfdef..9b932a2e26b 100644 --- a/pkg/registry/apis/collections/datasources.go +++ b/pkg/registry/apis/collections/datasources.go @@ -62,6 +62,11 @@ func (s *datasourceStorage) Create(ctx context.Context, obj runtime.Object, crea return s.Storage.Create(ctx, obj, createValidation, options) } +func (d *datasourceStorage) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { + // the objInfo is not obviosuly simply to perform validation on, it feels like we should be performing validation elsewhere. + return d.Storage.Update(ctx, name, objInfo, createValidation, updateValidation, forceAllowCreate, options) +} + func indexOf(slice []string, item string) int { for i, v := range slice { if v == item {