forked from rpms/osbuild-composer
0659f82bfa
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/osbuild-composer.git#3a5afba36c592f25da80b83ac818ebdd121bd0ec
32 lines
2.0 KiB
Diff
32 lines
2.0 KiB
Diff
diff --git a/internal/upload/azure/azure.go b/internal/upload/azure/azure.go
|
|
index 8e18fe78..a5d8f857 100644
|
|
--- a/internal/upload/azure/azure.go
|
|
+++ b/internal/upload/azure/azure.go
|
|
@@ -83,7 +83,7 @@ func UploadImage(credentials Credentials, metadata ImageMetadata, fileName strin
|
|
|
|
// Create page blob URL. Page blob is required for VM images
|
|
blobURL := containerURL.NewPageBlobURL(metadata.ImageName)
|
|
- _, err = blobURL.Create(ctx, stat.Size(), 0, azblob.BlobHTTPHeaders{}, azblob.Metadata{}, azblob.BlobAccessConditions{})
|
|
+ _, err = blobURL.Create(ctx, stat.Size(), 0, azblob.BlobHTTPHeaders{}, azblob.Metadata{}, azblob.BlobAccessConditions{}, azblob.PremiumPageBlobAccessTierNone, azblob.BlobTagsMap{}, azblob.ClientProvidedKeyOptions{})
|
|
if err != nil {
|
|
return fmt.Errorf("cannot create the blob URL: %v", err)
|
|
}
|
|
@@ -122,7 +122,7 @@ func UploadImage(credentials Credentials, metadata ImageMetadata, fileName strin
|
|
semaphore <- 1
|
|
go func(counter int64, buffer []byte, n int) {
|
|
defer wg.Done()
|
|
- _, err = blobURL.UploadPages(ctx, counter*azblob.PageBlobMaxUploadPagesBytes, bytes.NewReader(buffer[:n]), azblob.PageBlobAccessConditions{}, nil)
|
|
+ _, err = blobURL.UploadPages(ctx, counter*azblob.PageBlobMaxUploadPagesBytes, bytes.NewReader(buffer[:n]), azblob.PageBlobAccessConditions{}, nil, azblob.ClientProvidedKeyOptions{})
|
|
if err != nil {
|
|
err = fmt.Errorf("uploading a page failed: %v", err)
|
|
// Send the error to the error channel in a non-blocking way. If there is already an error, just discard this one
|
|
@@ -144,7 +144,7 @@ func UploadImage(credentials Credentials, metadata ImageMetadata, fileName strin
|
|
default:
|
|
}
|
|
// Check properties, specifically MD5 sum of the blob
|
|
- props, err := blobURL.GetProperties(ctx, azblob.BlobAccessConditions{})
|
|
+ props, err := blobURL.GetProperties(ctx, azblob.BlobAccessConditions{}, azblob.ClientProvidedKeyOptions{})
|
|
if err != nil {
|
|
return fmt.Errorf("getting the properties of the new blob failed: %v", err)
|
|
}
|