SupportBundles: Build tars in memory (#61581)

* build tar in memory

* match tag
This commit is contained in:
Jo
2023-01-17 10:39:59 +00:00
committed by GitHub
parent be72e570cf
commit 9e097c531d
5 changed files with 43 additions and 95 deletions

View File

@@ -3,8 +3,6 @@ package supportbundlesimpl
import (
"context"
"fmt"
"os"
"path/filepath"
"time"
"github.com/grafana/grafana/pkg/api/routing"
@@ -151,12 +149,6 @@ func (s *Service) remove(ctx context.Context, uid string) error {
return fmt.Errorf("could not remove a support bundle with uid %s as it is still being created", uid)
}
if bundle.FilePath != "" {
if err := os.RemoveAll(filepath.Dir(bundle.FilePath)); err != nil {
return fmt.Errorf("could not remove directory for support bundle %s: %w", uid, err)
}
}
// Remove the KV store entry
return s.store.Remove(ctx, uid)
}