Просмотр исходного кода

Merge branch 'memory-tweaks-2' of github.com:opencost/opencost into memory-tweaks-2

Alex Meijer 1 месяц назад
Родитель
Сommit
d889a997c8
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      core/pkg/storage/azurestorage.go

+ 3 - 0
core/pkg/storage/azurestorage.go

@@ -287,6 +287,9 @@ func (b *AzureStorage) ReadToLocalFile(path, destPath string) error {
 
 	downloadResponse, err := b.containerClient.NewBlobClient(path).DownloadStream(ctx, nil)
 	if err != nil {
+		if b.IsObjNotFoundErr(err) {
+			return DoesNotExistError
+		}
 		return fmt.Errorf("AzureStorage: ReadToLocalFile: failed to download blob %q to %q: %w", path, destPath, err)
 	}
 	// NOTE: automatic retries are performed if the connection fails.