From 46b9666ad3ca4b57c01e611058ae6229ec47c559 Mon Sep 17 00:00:00 2001 From: Louis Ruch Date: Fri, 4 Aug 2023 11:20:19 -0700 Subject: [PATCH] fix: Support empty secrets in OnDeleteStorageBucket --- plugin/service/storage/plugin.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/service/storage/plugin.go b/plugin/service/storage/plugin.go index 52696ac..ad4d80a 100644 --- a/plugin/service/storage/plugin.go +++ b/plugin/service/storage/plugin.go @@ -234,6 +234,12 @@ func (p *StoragePlugin) OnDeleteStorageBucket(ctx context.Context, req *pb.OnDel return nil, err } + // NOTE: This check was added to support the Boundary 0.13.2 release as a hotfix for + // empty secrets. Future releases of the plugin will correctly handle empty secrets. + if req.GetPersisted().GetData() == nil { + return &pb.OnDeleteStorageBucketResponse{}, nil + } + // Get the persisted data. // NOTE: We return on error here, blocking the delete. This may or // may not be an overzealous approach to maintaining database/state