-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Comments
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 |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon. Issue DetailsWe 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) When using the system-assigned managed identity however, this fails: az login --identity (login succeeds as expected) 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'
|
route to service team |
any updates? Thanks |
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
We need your help to collect some more information:
|
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @varunkch. Issue DetailsWe 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) When using the system-assigned managed identity however, this fails: az login --identity (login succeeds as expected) 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'
|
I am finally able to pin down the exact root cause for this issue. Repro
Using
Using
Notice
Root causeThe managed identity endpoint in the app service container returns
Action planThis behavior is not observed on Azure VM. We need to work with app service team about this incorrect managed identity endpoint behavior. |
The new API
|
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI. Issue DetailsWe 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) When using the system-assigned managed identity however, this fails: az login --identity (login succeeds as expected) 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'
|
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon. Issue DetailsWe 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) When using the system-assigned managed identity however, this fails: az login --identity (login succeeds as expected) 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'
|
@jiasli is there a chance we're hitting the same thing with storage log on? getporter/azure-plugins#39 |
in fact, I'm finding this in several places: microsoft/AzureTRE#1067 |
@squillace your issue is different from this one. Let's work on #20211. |
Wait. I mixed up this issue with an app service one. @JennyLJY, where are you running Azure CLI? |
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 will end up in the same deserialization issue as mentioned here. |
@m-gora, If you have concern with @singankit, @harneetvirk, where can |
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. |
@singankit, I am not seeing Is |
Thats right azureml sdk is not open sourced. It is managed by AML team internally. |
@singankit, is there any plan to drop |
@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. |
This is true.
As for |
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! |
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'
The text was updated successfully, but these errors were encountered: