Skip to content

mcr.microsoft.com/azure-cli strange bega #27231

@Bv-Lucas

Description

@Bv-Lucas

Describe the bug

I use az storage blob upload-batch to push content to a Microsoft CDN

The files uploaded this way have no content-type if I use the azure-cli image available from mcr.microsoft.com/azure-cli

The weird thing about this is that it works correctly when I run it from my mac computer, but not when using the image.
My current azure-cli version is

azure-cli                         2.50.0 *

core                              2.50.0 *
telemetry                          1.0.8 *

Extensions:
aks-preview                      0.5.135
storage-preview                    0.8.4

Dependencies:
msal                              1.22.0
azure-mgmt-resource             23.1.0b2

I tried using the same azure-cli version since in the latest image it is 2.51.0 but I face the same issue, my command is :
az storage blob upload-batch --account-name [redacted] --overwrite true -s assets -d "\$web/assets2"
This is the output when ran from my mac:

Finished[#############################################################]  100.0000%
[
  {
    "Blob": "[redacted]",
    "Last Modified": "2023-08-22T13:50:42+00:00",
    "Type": "image/webp",
    "eTag": "\"0x8DBA316C6CA7C22\""
  },
  {
    "Blob": "[redacted]",
    "Last Modified": "2023-08-22T13:50:42+00:00",
    "Type": "image/webp",
    "eTag": "\"0x8DBA316C6CF0F58\""
  }
]

This is the ouput when ran from mcr.microsoft.com/azure-cli:2.50.0 (same result with latest image)

Finished[#############################################################]  100.0000%
[
  {
    "Blob": "[redacted]",
    "Last Modified": "2023-08-22T13:46:42+00:00",
    "Type": null,
    "eTag": "\"0x8DBA3163821FE95\""
  },
  {
    "Blob": "[redacted]",
    "Last Modified": "2023-08-22T13:46:43+00:00",
    "Type": null,
    "eTag": "\"0x8DBA3163835F8E4\""
  }
]

Related command

az storage blob upload-batch

Errors

no errors, see description

Issue script & Debug output

no debug output

Expected behavior

The content type should be identified as image/webp correctly from the microsoft provided image

Environment Summary

see description

Additional context

As a workaround I'm currently forcing content-type using the flag in az storage blob upload-batch

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.Storageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions