Implemented a centralized secret-backed object-store helper

This commit is contained in:
2026-05-21 19:13:10 -05:00
parent 228c348e42
commit 135407ba7c
11 changed files with 301 additions and 11 deletions

View File

@@ -316,7 +316,7 @@ func SessionInit(ctx context.Context, args []string, out io.Writer) error {
return err
}
store, err := newObjectStoreFromConfigFn(ctx, cfg)
store, err := newCommandObjectStore(ctx, cfg, nil)
if err != nil {
return fmt.Errorf("session init: %w", err)
}
@@ -488,7 +488,7 @@ func loadHelperContext(ctx context.Context, flags commonConfigFlags, needStore b
}
var store storage.ObjectStore
if needStore {
store, err = newObjectStoreFromConfigFn(ctx, cfg)
store, err = newCommandObjectStore(ctx, cfg, nil)
if err != nil {
return nil, nil, nil, nil, err
}
@@ -511,7 +511,7 @@ func objectStoreIfConfigured(ctx context.Context, cfg *config.Config) (storage.O
if cfg == nil || cfg.Pipeline == nil || cfg.Pipeline.Storage.S3 == nil || strings.TrimSpace(cfg.Pipeline.Storage.S3.Bucket) == "" {
return nil, nil
}
store, err := newObjectStoreFromConfigFn(ctx, cfg)
store, err := newCommandObjectStore(ctx, cfg, nil)
if err != nil {
return nil, err
}