azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az acr run: 'NoneType' object is not callable

Open obeyda opened this issue 5 years ago • 12 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az acr run

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not callable
Traceback (most recent call last):
  File "/opt/azure-cli/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/command_modules/acr/run.py", line 90, in acr_run
    platform=PlatformProperties(
TypeError: 'NoneType' object is not callable

To Reproduce:

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

  • PURGE_CMD="acr purge --ago 0d --untagged --dry-run --filter 'repository:.*'"
  • az acr run --cmd "$PURGE_CMD" --registry registry /dev/null

Expected Behavior

same behavior as this: Preview the purge

Environment Summary

Linux-5.12.15-arch1-1-x86_64-with-glibc2.33
Python 3.9.6
Installer: 

azure-cli 2.26.0
azure-cli-iot-ext 0.8.9

Extensions:
azure-iot 0.9.1
azure-cli-iot-ext 0.8.9
interactive 0.4.4
azure-devops 0.17.0

Additional Context

obeyda avatar Jul 14 '21 08:07 obeyda

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-MSFT, @luisdlp.

Issue Details

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az acr run

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not callable
Traceback (most recent call last):
  File "/opt/azure-cli/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/azure-cli/lib/python3.9/site-packages/azure/cli/command_modules/acr/run.py", line 90, in acr_run
    platform=PlatformProperties(
TypeError: 'NoneType' object is not callable

To Reproduce:

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

  • PURGE_CMD="acr purge --ago 0d --untagged --dry-run --filter 'repository:.*'"
  • az acr run --cmd "$PURGE_CMD" --registry registry /dev/null

Expected Behavior

same behavior as this: Preview the purge

Environment Summary

Linux-5.12.15-arch1-1-x86_64-with-glibc2.33
Python 3.9.6
Installer: 

azure-cli 2.26.0
azure-cli-iot-ext 0.8.9

Extensions:
azure-iot 0.9.1
azure-cli-iot-ext 0.8.9
interactive 0.4.4
azure-devops 0.17.0

Additional Context

Author: obeyda
Assignees: -
Labels:

Container Registry, Service Attention

Milestone: -

ghost avatar Jul 14 '21 08:07 ghost

route to service team

yonzhan avatar Jul 14 '21 08:07 yonzhan

We are experiencing the same issue, starting today. Would appreciate if this could be resolved since it prevents our Docker registry from being cleaned. Thanks.

chrisgleissner avatar Jul 14 '21 11:07 chrisgleissner

Same issue here. Was coming to github to report a new issue. started last night for me, around 4PM EDT.

johnynfulleffect avatar Jul 14 '21 12:07 johnynfulleffect

A hotfix for the cli has been released. Please use Version 2.26.1 for the cli: https://docs.microsoft.com/en-us/cli/azure/release-notes-azure-cli?tabs=azure-cli#july-14-2021

luisdlp avatar Jul 14 '21 15:07 luisdlp

@luisdlp Is this going to be released to the hosted agent ubuntu-latest soon?

johnynfulleffect avatar Jul 14 '21 15:07 johnynfulleffect

@00Kai0 can you help answer @johnynfulleffect question?

luisdlp avatar Jul 14 '21 15:07 luisdlp

We are seeing the same issue in the Azure Hosted - Agents, they are still fetching the 2.26.0 version. please check the issue and help us route it to the Azure DEVOPS team.

SudhirNune avatar Jul 14 '21 20:07 SudhirNune

tried 2.26.1 locally, issue solved. Thanks.

obeyda avatar Jul 14 '21 20:07 obeyda

we've opened ticket 2107150060000091 for this as its affecting a large number of our pipelines, been told its a week until it will be updated on the hosted linux agents, there are workarounds but that means a significant amount of effort to hack in a fix and roll it back later, can the version flag on the agent be rolled back to the last stable version until the fix its released?

mattduguid avatar Jul 15 '21 05:07 mattduguid

@mattduguid - I don't see that as an option, read the below link from MSFT

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#what-can-i-do-if-software-i-need-is-removed-or-replaced-with-a-newer-version

SudhirNune avatar Jul 15 '21 11:07 SudhirNune

@mattduguid - See this issue - https://github.com/microsoft/azure-pipelines-tasks/issues/15036

Update from miketimofeev - The rollout process takes 3-4 days to accomplish. We're going to start the rollout on Monday and finish on Wednesday-Thursday.

SudhirNune avatar Jul 15 '21 12:07 SudhirNune