Skip to content

Commit

Permalink
Fix function signatures using sensible defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
matt0x6F committed Feb 19, 2024
1 parent 5a22b69 commit 7ab4291
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/stash/with_azureblob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/azureblob/azureblob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
}
Expand Down

0 comments on commit 7ab4291

Please sign in to comment.