From 7ab42915f4f24740279ea856a01bbeecccc151f7 Mon Sep 17 00:00:00 2001 From: Matt Ouille Date: Sun, 18 Feb 2024 18:32:10 -0800 Subject: [PATCH] Fix function signatures using sensible defaults --- pkg/stash/with_azureblob.go | 2 +- pkg/storage/azureblob/azureblob.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/stash/with_azureblob.go b/pkg/stash/with_azureblob.go index ccebda68..8eb3c950 100644 --- a/pkg/stash/with_azureblob.go +++ b/pkg/stash/with_azureblob.go @@ -129,7 +129,7 @@ func (s *azblobLock) acquireLease(ctx context.Context, blobURL azblob.BlockBlobU defer cancel() // first we need to create a blob which can be then leased - _, err := blobURL.Upload(tctx, bytes.NewReader([]byte{1}), azblob.BlobHTTPHeaders{}, nil, azblob.BlobAccessConditions{}) + _, err := blobURL.Upload(tctx, bytes.NewReader([]byte{1}), azblob.BlobHTTPHeaders{}, nil, azblob.BlobAccessConditions{}, azblob.DefaultAccessTier, nil, azblob.ClientProvidedKeyOptions{}, azblob.ImmutabilityPolicyOptions{}) if err != nil { // if the blob is already leased we will get http.StatusPreconditionFailed while writing to that blob var stgErr azblob.StorageError diff --git a/pkg/storage/azureblob/azureblob.go b/pkg/storage/azureblob/azureblob.go index 53712d5b..e773cfa1 100644 --- a/pkg/storage/azureblob/azureblob.go +++ b/pkg/storage/azureblob/azureblob.go @@ -62,7 +62,7 @@ func (c *azureBlobStoreClient) BlobExists(ctx context.Context, path string) (boo const op errors.Op = "azureblob.BlobExists" // TODO: Any better way of doing this ? blobURL := c.containerURL.NewBlockBlobURL(path) - _, err := blobURL.GetProperties(ctx, azblob.BlobAccessConditions{}) + _, err := blobURL.GetProperties(ctx, azblob.BlobAccessConditions{}, azblob.ClientProvidedKeyOptions{}) if err != nil { var serr azblob.StorageError if !errors.AsErr(err, &serr) { @@ -81,7 +81,7 @@ func (c *azureBlobStoreClient) BlobExists(ctx context.Context, path string) (boo func (c *azureBlobStoreClient) ReadBlob(ctx context.Context, path string) (storage.SizeReadCloser, error) { const op errors.Op = "azureblob.ReadBlob" blobURL := c.containerURL.NewBlockBlobURL(path) - downloadResponse, err := blobURL.Download(ctx, 0, 0, azblob.BlobAccessConditions{}, false) + downloadResponse, err := blobURL.Download(ctx, 0, 0, azblob.BlobAccessConditions{}, false, azblob.ClientProvidedKeyOptions{}) if err != nil { return nil, errors.E(op, err) }