Storage: Revert using real gRPC for integration tests (#96410)

---------

Co-authored-by: Todd Treece <todd.treece@grafana.com>
This commit is contained in:
Ryan McKinley
2024-11-15 16:50:49 -05:00
committed by GitHub
co-authored by Todd Treece
parent 66d5c051aa
commit 29cdfdff87
3 changed files with 13 additions and 1 deletions
+9
View File
@@ -85,6 +85,15 @@ func (d *DualWriterMode3) createOnLegacyStorage(ctx context.Context, in, storage
ctx, cancel := context.WithTimeoutCause(context.WithoutCancel(ctx), time.Second*10, errors.New("legacy create timeout"))
defer cancel()
accessor, err := meta.Accessor(storageObj)
if err != nil {
return err
}
// clear the UID and ResourceVersion from the object before sending it to the legacy storage
accessor.SetUID("")
accessor.SetResourceVersion("")
startLegacy := time.Now()
legacyObj, err := d.Legacy.Create(ctx, storageObj, createValidation, options)
d.recordLegacyDuration(err != nil, mode3Str, d.resource, method, startLegacy)