From f3416fb9a5f1881854e7c9e95f9e512476a9eb52 Mon Sep 17 00:00:00 2001 From: Roel Arents Date: Wed, 17 Jan 2024 08:58:37 +0100 Subject: [PATCH 1/2] fix: disable concurrency when downloading azure files workaround for https://github.com/Azure/azure-sdk-for-go/issues/22156 Signed-off-by: Roel Arents --- workflow/artifacts/azure/azure.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workflow/artifacts/azure/azure.go b/workflow/artifacts/azure/azure.go index a6b25b28fba0..b6c6e330ef13 100644 --- a/workflow/artifacts/azure/azure.go +++ b/workflow/artifacts/azure/azure.go @@ -10,6 +10,8 @@ import ( "path/filepath" "strings" + "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror" @@ -168,7 +170,8 @@ func DownloadFile(containerClient *container.Client, blobName, path string) erro } }() - _, err = blobClient.DownloadFile(context.TODO(), outFile, nil) + o := blob.DownloadFileOptions{Concurrency: 1} // workaround https://github.com/Azure/azure-sdk-for-go/issues/22156 + _, err = blobClient.DownloadFile(context.TODO(), outFile, &o) return err } From 754958fcf387b1838e147b62f42a9465015eb077 Mon Sep 17 00:00:00 2001 From: Roel Arents <2691308+roelarents@users.noreply.github.com> Date: Wed, 17 Jan 2024 22:14:19 +0100 Subject: [PATCH 2/2] Update workflow/artifacts/azure/azure.go Co-authored-by: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Signed-off-by: Roel Arents <2691308+roelarents@users.noreply.github.com> --- workflow/artifacts/azure/azure.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/artifacts/azure/azure.go b/workflow/artifacts/azure/azure.go index b6c6e330ef13..54a528cfea74 100644 --- a/workflow/artifacts/azure/azure.go +++ b/workflow/artifacts/azure/azure.go @@ -170,8 +170,8 @@ func DownloadFile(containerClient *container.Client, blobName, path string) erro } }() - o := blob.DownloadFileOptions{Concurrency: 1} // workaround https://github.com/Azure/azure-sdk-for-go/issues/22156 - _, err = blobClient.DownloadFile(context.TODO(), outFile, &o) + opts := blob.DownloadFileOptions{Concurrency: 1} // workaround for https://github.com/Azure/azure-sdk-for-go/issues/22156 + _, err = blobClient.DownloadFile(context.TODO(), outFile, &opts) return err }