Azure / azure-cli

Azure Command-Line Interface
MIT License
3.96k stars 2.94k forks source link

az storage blob upload-batch terminates with error in 2.10 but worked in 2.08 #14660

Closed lamaks closed 4 years ago

lamaks commented 4 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az storage blob upload-batch

Errors:

[Errno 2] No such file or directory: 'batch-pool-startup-script'
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
    raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 709, in _run_job
    cmd_copy.exception_handler(ex)
...
command_modules/storage/operations/blob.py, ln 444, in upload_block_blob
    return client.create_blob_from_path(**create_blob_args)
storage/v2018_11_09/blob/blockblobservice.py, ln 453, in create_blob_from_path
    count = path.getsize(file_path)
../lib/python3.8/genericpath.py, ln 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: 'batch-pool-startup-script'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Environment Summary

macOS-10.15.6-x86_64-i386-64bit
Python 3.8.5
Installer: HOMEBREW

azure-cli 2.10.0

Extensions:
application-insights 0.1.1

Additional Context

JoepDriesen commented 4 years ago

We are experiencing the same issue since yesterday on our CI/CD pipeline.

m-jacobi commented 4 years ago

With the azure-cli 2.9.1 * version it still works. The Dockerfile mcr.microsoft.com/azure-cli:2.9.1 provides a remedy in the CI / CD context

yonzhan commented 4 years ago

add to S174

justlev commented 4 years ago

@yonzhan This another CI/CD for us as well, and I believe we are not the only ones. Any chance this can be hotfixed, prior to the S174 release on August 25th?

yonzhan commented 4 years ago

@Juliehzl is looking into this and will update here later.

Juliehzl commented 4 years ago

dupe of #14641

Juliehzl commented 4 years ago

Hi @lamaks , the fix is done in attached PR. Currently you could try available artifacts here https://dev.azure.com/azure-sdk/public/_build/results?buildId=484329&view=artifacts&type=publishedArtifacts with the fix. I see you are using homebrew installer. Currently you could try with pip install xx.whl in artifacts page first and we will release the hotfix version soon.

Add @justlev and @mszykora

justlev commented 4 years ago

Hi @lamaks , the fix is done in attached PR. Currently you could try available artifacts here https://dev.azure.com/azure-sdk/public/_build/results?buildId=484329&view=artifacts&type=publishedArtifacts with the fix. I see you are using homebrew installer. Currently you could try with pip install xx.whl in artifacts page first and we will release the hotfix version soon.

Add @justlev and @mszykora

Thank you very much! We are using the official CircleCI azure-cli orb from here: https://circleci.com/orbs/registry/orb/circleci/azure-cli. The orb, unfortunately, doesn't allow one to explicitly specify a version of the CLI, so we are trying to override the latest version with 2.9.1 using a separate apt-get install call

For anyone using CircleCI Azure-cli ORB, use this to fix the issue:

        - azure-cli/install    # already used at present
        - run:     # remove this after MS releases official fix
            name: Fix Azure CLI Version
            command: sudo apt-get -qqy --allow-downgrades install azure-cli=2.9.1-1~stretch
Juliehzl commented 4 years ago

Hi all, We just released hotfix version 2.10.1 and please see https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest for installation. Homebrew for MacOS will be available tomorrow after the PR merged.