Skip to content

Commit 1d3d186

Browse files
leodidoona-agent
andcommitted
fix: implement UploadFile method for cache wrapper types
Add missing UploadFile method to pullOnlyRemoteCache and pushOnlyRemoteCache to satisfy the RemoteCache interface after UploadFile was added in earlier commits. - pushOnlyRemoteCache.UploadFile delegates to underlying cache - pullOnlyRemoteCache.UploadFile returns nil (no-op) This maintains the existing wrapper behavior patterns without changing functionality. Co-authored-by: Ona <no-reply@ona.com>
1 parent da23af1 commit 1d3d186

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

cmd/build.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ func (c *pushOnlyRemoteCache) Upload(ctx context.Context, src cache.LocalCache,
364364
return c.C.Upload(ctx, src, pkgs)
365365
}
366366

367+
func (c *pushOnlyRemoteCache) UploadFile(ctx context.Context, filePath string, key string) error {
368+
return c.C.UploadFile(ctx, filePath, key)
369+
}
370+
367371
type pullOnlyRemoteCache struct {
368372
C cache.RemoteCache
369373
}
@@ -380,6 +384,10 @@ func (c *pullOnlyRemoteCache) Upload(ctx context.Context, src cache.LocalCache,
380384
return nil
381385
}
382386

387+
func (c *pullOnlyRemoteCache) UploadFile(ctx context.Context, filePath string, key string) error {
388+
return nil
389+
}
390+
383391
func getRemoteCacheFromEnv() cache.RemoteCache {
384392
return getRemoteCache(nil)
385393
}

0 commit comments

Comments
 (0)