diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /workhorse/internal/config/config.go | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'workhorse/internal/config/config.go')
-rw-r--r-- | workhorse/internal/config/config.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/workhorse/internal/config/config.go b/workhorse/internal/config/config.go index 1d52a4cc934..687986974a3 100644 --- a/workhorse/internal/config/config.go +++ b/workhorse/internal/config/config.go @@ -11,6 +11,7 @@ import ( "time" "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob" + "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container" "github.com/BurntSushi/toml" "gocloud.dev/blob" "gocloud.dev/blob/azureblob" @@ -178,12 +179,13 @@ func (creds *AzureCredentials) getURLOpener() (*azureblob.URLOpener, error) { AccountName: creds.AccountName, } - clientFunc := func(svcURL azureblob.ServiceURL) (*azblob.ServiceClient, error) { + clientFunc := func(svcURL azureblob.ServiceURL, containerName azureblob.ContainerName) (*container.Client, error) { sharedKeyCred, err := azblob.NewSharedKeyCredential(creds.AccountName, creds.AccountKey) if err != nil { return nil, fmt.Errorf("error creating Azure credentials: %w", err) } - return azblob.NewServiceClientWithSharedKey(string(svcURL), sharedKeyCred, &azblob.ClientOptions{}) + containerURL := fmt.Sprintf("%s/%s", svcURL, containerName) + return container.NewClientWithSharedKeyCredential(containerURL, sharedKeyCred, &container.ClientOptions{}) } return &azureblob.URLOpener{ |