Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different actions in 20220227.1 azure-cli 2.33.1 and 20220306.1 azure-cli 2.34.1 #16018

Closed
AiHaibara opened this issue Mar 10, 2022 · 4 comments

Comments

@AiHaibara
Copy link

AiHaibara commented Mar 10, 2022

Required Information

Question, Bug, or Feature?
Type: Question

Enter Task Name: Azure CLI@2

Environment

  • Agent - Hosted or Private:
    Agent name: 'Hosted Agent'
    Agent machine name: 'fv-az302-113'
    Current agent version: '2.200.2'
    Operating System
    Virtual Environment
    Environment: ubuntu-20.04
    Version: 20220227.1

20220227.1 use the azure cli version 2.33.1

    Agent name: 'Hosted Agent'
    Agent machine name: 'fv-az102-467'
    Current agent version: '2.200.2'
    Operating System
    Virtual Environment
    Environment: ubuntu-20.04
    Version: 20220306.1

20220306.1 use the azure cli version 2.34.1

Issue Description

az storage blob upload-batch

2.34.1 recognized arguments: --overwrite if i don't use overwirte, it will tips me blob exists error.
but the 2.33.1 has the ERROR: unrecognized arguments: --overwrite, if i don't use overwrite, it successfully.
is this are a break change for the default action(overwrite)?

and some Microsoft-Hosted agent are 2.33.1, some Microsoft-Hosted agent are 2.34.1 in 2022/03/10
should i always upgrade az? or just caused by agent are upgrading?

Error logs

2.33.1 has the ERROR: unrecognized arguments: --overwrite

2.34.1 without --overwrite
ERROR: The specified blob already exists.
RequestId:773f41df-f01e-007b-7158-348947000000
Time:2022-03-10T08:27:11.0284194Z
ErrorCode:BlobAlreadyExists

@github-actions github-actions bot added Area: Release environment:need-to-triage Issues need to be triage by environment-deployment team question labels Mar 10, 2022
@AiHaibara AiHaibara changed the title 20220227.1 azure-cli 2.33.1 different actions in 20220227.1 azure-cli 2.33.1 and 20220306.1 azure-cli 2.34.1 Mar 10, 2022
@mattmiller85
Copy link

mattmiller85 commented Mar 14, 2022

Same problem here, build failed last week on 3/10 because the az blob upload command couldnt overwrite an existing blob without the --overwrite flag. So, I added it thinking I'd be good. Then, today, the cli version is back down to 2.33 in the hosted agents and failing because it doesn't know about the --overwrite flag:
From today
image
From 3/10:
image

@BorisWilhelms
Copy link

We also ran into this issue and simply extended our Azure CLI script to check the version.

      VERSION=$(az version --output yaml | grep "azure-cli:" | cut -d ' ' -f2)
      OVERWRITE=$([ "$VERSION" == "2.33.1" ] && echo "" || echo "--overwrite true")
      az storage blob upload-batch -d XXX --account-name XXX -s XXX $OVERWRITE

Sure, thats properly not 100% save, but it does work for us.

@stroborobo
Copy link

pscore version:

$azversion = az version | ConvertFrom-Json
$overwrite = if ($azversion.'azure-cli' -like "2.33*") { "" } else { "--overwrite" }

@v-nagarajku v-nagarajku removed the environment:need-to-triage Issues need to be triage by environment-deployment team label Mar 30, 2022
@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants