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

az acr build error: ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00' #19480

Closed
JennyLJY opened this issue Sep 8, 2021 · 23 comments · Fixed by #20215
Labels
App Services az appservice Container Registry az acr customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. Service Attention This issue is responsible by Azure service team.

Comments

@JennyLJY
Copy link

JennyLJY commented Sep 8, 2021

We want to run builds of docker images using ACR BUILD feature that lets ACR build the image for us. When logged-in using my user principal it works fine. Basically this command sequence:

az login (prompted externally to login)
az acr build ..... (files are pushed to ACR which then builds and pushes the image to ACR fine)

When using the system-assigned managed identity however, this fails:

az login --identity (login succeeds as expected)
az acr build ... (same build statement as above, fails with the following traceback)

The command failed with an unexpected error. Here is the traceback:

invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'
Traceback (most recent call last):
File '/opt/az/lib/python3.6/site-packages/knack/cli.py', line 231, in invoke
cmd_result = self.invocation.execute(args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 657, in execute
raise ex
File '/opt/az/lib/python3.6/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/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 691, in _run_job
result = cmd_copy(params)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 328, in call
return self.handler(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py', line 121, in handler
return op(**command_args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py', line 45, in acr_build
cmd, registry_name, resource_group_name, BUILD_NOT_SUPPORTED)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 141, in validate_managed_registry
cmd.cli_ctx, registry_name, resource_group_name)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 110, in get_registry_by_name
return client.get(resource_group_name, registry_name), resource_group_name
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2021_06_01_preview/operations/_registries_operations.py', line 276, in get
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 211, in run
return first_node.send(pipeline_request) # type: ignore
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/core/policies/_base.py', line 47, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
[Previous line repeated 1 more time]
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_redirect.py', line 158, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_retry.py', line 445, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 69, in send
_await_result(self._policy.on_request, request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_tools.py', line 29, in await_result
result = func(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Sep 8, 2021
@JennyLJY
Copy link
Author

JennyLJY commented Sep 8, 2021

image

class MSIAuthenticationWrapper(MSIAuthentication):

The highlight code is in CLI shared library that handles AAD token. ACR was not involved in the failed step.

File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Sep 8, 2021
@yonzhan yonzhan added Service Attention This issue is responsible by Azure service team. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 8, 2021
@ghost
Copy link

ghost commented Sep 8, 2021

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

Issue Details

We want to run builds of docker images using ACR BUILD feature that lets ACR build the image for us. When logged-in using my user principal it works fine. Basically this command sequence:

az login (prompted externally to login)
az acr build ..... (files are pushed to ACR which then builds and pushes the image to ACR fine)

When using the system-assigned managed identity however, this fails:

az login --identity (login succeeds as expected)
az acr build ... (same build statement as above, fails with the following traceback)

The command failed with an unexpected error. Here is the traceback:

invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'
Traceback (most recent call last):
File '/opt/az/lib/python3.6/site-packages/knack/cli.py', line 231, in invoke
cmd_result = self.invocation.execute(args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 657, in execute
raise ex
File '/opt/az/lib/python3.6/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/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 691, in _run_job
result = cmd_copy(params)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 328, in call
return self.handler(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py', line 121, in handler
return op(**command_args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py', line 45, in acr_build
cmd, registry_name, resource_group_name, BUILD_NOT_SUPPORTED)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 141, in validate_managed_registry
cmd.cli_ctx, registry_name, resource_group_name)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 110, in get_registry_by_name
return client.get(resource_group_name, registry_name), resource_group_name
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2021_06_01_preview/operations/_registries_operations.py', line 276, in get
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 211, in run
return first_node.send(pipeline_request) # type: ignore
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/core/policies/_base.py', line 47, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
[Previous line repeated 1 more time]
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_redirect.py', line 158, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_retry.py', line 445, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 69, in send
_await_result(self._policy.on_request, request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_tools.py', line 29, in await_result
result = func(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

Author: JennyLJY
Assignees: -
Labels:

Service Attention, Container Registry, customer-reported

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 8, 2021

route to service team

@JennyLJY
Copy link
Author

any updates? Thanks

@jiasli
Copy link
Member

jiasli commented Oct 27, 2021

According to https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token, the response of the manage identity endpoint should be like

{
  "access_token": "eyJ0eXAi...",
  "refresh_token": "",
  "expires_in": "3599",
  "expires_on": "1506484173",
  "not_before": "1506480273",
  "resource": "https://management.azure.com/",
  "token_type": "Bearer"
}

expires_on should be an integer.

We need your help to collect some more information:

  • Where is the az login --identity command being run?
  • Could you share the result of getting a token using CURL? Please redact the token itself.

@jiasli jiasli changed the title az acr build error az acr build error: ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00' Nov 4, 2021
@jiasli jiasli added the Managed Identity For `az identity` only label Nov 4, 2021
@ghost
Copy link

ghost commented Nov 4, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @varunkch.

Issue Details

We want to run builds of docker images using ACR BUILD feature that lets ACR build the image for us. When logged-in using my user principal it works fine. Basically this command sequence:

az login (prompted externally to login)
az acr build ..... (files are pushed to ACR which then builds and pushes the image to ACR fine)

When using the system-assigned managed identity however, this fails:

az login --identity (login succeeds as expected)
az acr build ... (same build statement as above, fails with the following traceback)

The command failed with an unexpected error. Here is the traceback:

invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'
Traceback (most recent call last):
File '/opt/az/lib/python3.6/site-packages/knack/cli.py', line 231, in invoke
cmd_result = self.invocation.execute(args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 657, in execute
raise ex
File '/opt/az/lib/python3.6/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/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 691, in _run_job
result = cmd_copy(params)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 328, in call
return self.handler(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py', line 121, in handler
return op(**command_args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py', line 45, in acr_build
cmd, registry_name, resource_group_name, BUILD_NOT_SUPPORTED)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 141, in validate_managed_registry
cmd.cli_ctx, registry_name, resource_group_name)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 110, in get_registry_by_name
return client.get(resource_group_name, registry_name), resource_group_name
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2021_06_01_preview/operations/_registries_operations.py', line 276, in get
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 211, in run
return first_node.send(pipeline_request) # type: ignore
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/core/policies/_base.py', line 47, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
[Previous line repeated 1 more time]
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_redirect.py', line 158, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_retry.py', line 445, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 69, in send
_await_result(self._policy.on_request, request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_tools.py', line 29, in await_result
result = func(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

Author: JennyLJY
Assignees: -
Labels:

Service Attention, Container Registry, customer-reported, Managed Identity

Milestone: -

@jiasli
Copy link
Member

jiasli commented Nov 4, 2021

I am finally able to pin down the exact root cause for this issue.

Repro

  1. In Azure Portal, create an app service with "quickstart" docker image mcr.microsoft.com/appsvc/staticsite:latest
  2. Configure system assigned identity for the app service
  3. Follow the doc to SSH into the container: https://docs.microsoft.com/en-us/azure/app-service/configure-linux-open-ssh-session
  4. Install Azure CLI (remove sudos): https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
# az login --identity --debug

  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/auth/adal_authentication.py", line 43, in get_token
    return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '11/05/2021 15:18:31 +00:00'

Using MSIAuthentication:

# /opt/az/bin/python3.6 -c "from msrestazure.azure_active_directory import MSIAuthentication; auth = MSIAuthentication(); auth.set_token(); print(auth.token)"

{'access_token': '...', 'expires_on': '11/05/2021 15:18:31 +00:00', 'resource': 'https://management.core.windows.net/', 'token_type': 'Bearer', 'client_id': 'df45d93a-de31-47ca-acef-081ca60d1a83'}

Using curl:

# curl "${MSI_ENDPOINT}?resource=https://management.core.windows.net/&api-version=2017-09-01" -H "secret: ${MSI_SECRET}"

{"access_token":"...","expires_on":"11/05/2021 15:18:31 +00:00","resource":"https://management.core.windows.net/","token_type":"Bearer","client_id":"df45d93a-de31-47ca-acef-081ca60d1a83"}

Notice "expires_on":"11/05/2021 15:18:31 +00:00" which contradicts that on the document:

https://docs.microsoft.com/en-us/azure/app-service/overview-managed-identity?tabs=powershell#rest-protocol-examples

"expires_on": "1586984735",

Root cause

The managed identity endpoint in the app service container returns expires_on in datetime format, but Azure CLI expects epoch time so fails.

  • In Azure CLI 2.30.0, az login fails because it uses expires_on to build an AccessToken, leading to the error.
  • In Azure CLI 2.29.2 (you may install with apt install azure-cli=2.29.2-1~buster), az login doesn't fail because it doesn't care about expires_on at all. Instead, other subsequent commands like az group list will fail.

Action plan

This behavior is not observed on Azure VM.

We need to work with app service team about this incorrect managed identity endpoint behavior.

@jiasli
Copy link
Member

jiasli commented Nov 4, 2021

The new API 2019-08-01 gives the correct result:

# curl "${IDENTITY_ENDPOINT}?resource=https://management.core.windows.net/&api-version=2019-08-01" -H "X-IDENTITY-HEADER: ${IDENTITY_HEADER}"

{"access_token":"xxx","expires_on":"1636125511","resource":"https://management.core.windows.net/","token_type":"Bearer","client_id":"df45d93a-de31-47ca-acef-081ca60d1a83"}

@jiasli jiasli added App Services az appservice and removed Container Registry az acr labels Nov 4, 2021
@ghost
Copy link

ghost commented Nov 4, 2021

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.

Issue Details

We want to run builds of docker images using ACR BUILD feature that lets ACR build the image for us. When logged-in using my user principal it works fine. Basically this command sequence:

az login (prompted externally to login)
az acr build ..... (files are pushed to ACR which then builds and pushes the image to ACR fine)

When using the system-assigned managed identity however, this fails:

az login --identity (login succeeds as expected)
az acr build ... (same build statement as above, fails with the following traceback)

The command failed with an unexpected error. Here is the traceback:

invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'
Traceback (most recent call last):
File '/opt/az/lib/python3.6/site-packages/knack/cli.py', line 231, in invoke
cmd_result = self.invocation.execute(args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 657, in execute
raise ex
File '/opt/az/lib/python3.6/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/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 691, in _run_job
result = cmd_copy(params)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 328, in call
return self.handler(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py', line 121, in handler
return op(**command_args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py', line 45, in acr_build
cmd, registry_name, resource_group_name, BUILD_NOT_SUPPORTED)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 141, in validate_managed_registry
cmd.cli_ctx, registry_name, resource_group_name)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 110, in get_registry_by_name
return client.get(resource_group_name, registry_name), resource_group_name
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2021_06_01_preview/operations/_registries_operations.py', line 276, in get
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 211, in run
return first_node.send(pipeline_request) # type: ignore
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/core/policies/_base.py', line 47, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
[Previous line repeated 1 more time]
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_redirect.py', line 158, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_retry.py', line 445, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 69, in send
_await_result(self._policy.on_request, request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_tools.py', line 29, in await_result
result = func(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

Author: JennyLJY
Assignees: -
Labels:

Service Attention, App Services, customer-reported, Managed Identity

Milestone: -

@jiasli jiasli added the Container Registry az acr label Nov 4, 2021
@ghost
Copy link

ghost commented Nov 4, 2021

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

Issue Details

We want to run builds of docker images using ACR BUILD feature that lets ACR build the image for us. When logged-in using my user principal it works fine. Basically this command sequence:

az login (prompted externally to login)
az acr build ..... (files are pushed to ACR which then builds and pushes the image to ACR fine)

When using the system-assigned managed identity however, this fails:

az login --identity (login succeeds as expected)
az acr build ... (same build statement as above, fails with the following traceback)

The command failed with an unexpected error. Here is the traceback:

invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'
Traceback (most recent call last):
File '/opt/az/lib/python3.6/site-packages/knack/cli.py', line 231, in invoke
cmd_result = self.invocation.execute(args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 657, in execute
raise ex
File '/opt/az/lib/python3.6/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/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 691, in _run_job
result = cmd_copy(params)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 328, in call
return self.handler(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py', line 121, in handler
return op(**command_args)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py', line 45, in acr_build
cmd, registry_name, resource_group_name, BUILD_NOT_SUPPORTED)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 141, in validate_managed_registry
cmd.cli_ctx, registry_name, resource_group_name)
File '/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/_utils.py', line 110, in get_registry_by_name
return client.get(resource_group_name, registry_name), resource_group_name
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2021_06_01_preview/operations/_registries_operations.py', line 276, in get
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 211, in run
return first_node.send(pipeline_request) # type: ignore
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/mgmt/core/policies/_base.py', line 47, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 71, in send
response = self.next.send(request)
[Previous line repeated 1 more time]
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_redirect.py', line 158, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_retry.py', line 445, in send
response = self.next.send(request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_base.py', line 69, in send
_await_result(self._policy.on_request, request)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/_tools.py', line 29, in await_result
result = func(*args, **kwargs)
File '/opt/az/lib/python3.6/site-packages/azure/core/pipeline/policies/_authentication.py', line 93, in on_request
self._token = self._credential.get_token(*self._scopes)
File '/opt/az/lib/python3.6/site-packages/azure/cli/core/adal_authentication.py', line 161, in get_token
return AccessToken(self.token['access_token'], int(self.token['expires_on']))
ValueError: invalid literal for int() with base 10: '09/01/2021 08:13:20 +00:00'

Author: JennyLJY
Assignees: -
Labels:

Service Attention, Container Registry, App Services, customer-reported, Managed Identity

Milestone: -

@squillace
Copy link

@jiasli is there a chance we're hitting the same thing with storage log on? getporter/azure-plugins#39

@squillace
Copy link

in fact, I'm finding this in several places: microsoft/AzureTRE#1067

@jiasli
Copy link
Member

jiasli commented Nov 5, 2021

@squillace your issue is different from this one. Let's work on #20211.

@jiasli
Copy link
Member

jiasli commented Dec 30, 2021

Wait. I mixed up this issue with an app service one.

@JennyLJY, where are you running Azure CLI?

@jiasli jiasli reopened this Dec 30, 2021
@m-gora
Copy link

m-gora commented Jan 17, 2022

Hi @jiasli,

in #20215 you mentioned that msrestazure is out of maintenance. Can you elaborate further? The module is heavily used in the azureml modules and in my project this is currently an ugly blocker we can not work around, as we can not simply change which API version is used in azureml.

Opening a Workspace like
ws = Workspace(sub, rg, wsname, MsiAuthentication(identity_config={ "client_id": os.getenv("MSI_CLIENT_ID") }))

will end up in the same deserialization issue as mentioned here.

@jiasli
Copy link
Member

jiasli commented Jan 17, 2022

The module is heavily used in the azureml modules and in my project this is currently an ugly blocker we can not work around, as we can not simply change which API version is used in azureml.

@m-gora, msrestazure is not maintained by Azure CLI team, but by Azure SDK team. As far as I know, managed identity related features are now moved to Azure Identity.

If you have concern with azureml, you may report to Machine Learning service.

@singankit, @harneetvirk, where can azureml issues be reported?

@singankit
Copy link

For SDK related issues they can be reported on azure-sdk-for python repo and they get redirected to correct team depending on the issue.

@jiasli
Copy link
Member

jiasli commented Jan 18, 2022

@singankit, I am not seeing azureml in https://github.com/Azure/azure-sdk-for-python/tree/main/sdk. Only machinelearning:

image

Is azureml code open source?

@singankit
Copy link

Thats right azureml sdk is not open sourced. It is managed by AML team internally.

@jiasli
Copy link
Member

jiasli commented Jan 21, 2022

@singankit, is there any plan to drop msrestazure as @m-gora suggested?

@m-gora
Copy link

m-gora commented Jan 21, 2022

@jiasli i think we might have a misunderstanding. I thought you meant that msrestazure is not actively maintained anymore. Therefore I asked whether it will be removed in the future. However a colleague of mine fixed the issue by pinning the version of Azure CLI in the requirements.txt.

I still don't understand why that made a difference, but at least it works.

@jiasli
Copy link
Member

jiasli commented Jan 24, 2022

I thought you meant that msrestazure is not actively maintained anymore.

This is true.

The module is heavily used in the azureml modules and in my project this is currently an ugly blocker we can not work around, as we can not simply change which API version is used in azureml.

As for azureml issues, @singankit can help.

@wangzelin007 wangzelin007 removed the Managed Identity For `az identity` only label Mar 10, 2022
@RakeshMohanMSFT RakeshMohanMSFT added the needs-author-feedback More information is needed from author to address the issue. label Jul 14, 2022
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Jul 21, 2022
@ghost
Copy link

ghost commented Jul 21, 2022

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Aug 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Services az appservice Container Registry az acr customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants