Skip to content

Exrension "az logicapp deployment source config-zip" doesn't work with 401 error #29020

@ShingoHanai

Description

@ShingoHanai

Describe the bug

Through following document, after adding latest extension of az logicapp, zip deploy doesn't work with 401 error.

https://learn.microsoft.com/en-us/azure/logic-apps/set-up-devops-deployment-single-tenant-azure-logic-apps?tabs=azure-cli#tabpanel_1_azure-cli

If removing that extension by following command, zip deploy works correctly without that extension.

az extension remove --name logicapp

Could you fix az logicapp extension?

Related command

az extension add --yes --source "https://aka.ms/logicapp-latest-py2.py3-none-any.whl"
az logicapp deployment source config-zip --name test808 --resource-group standard --src test808.zip

Errors

urllib3.connectionpool: https://test808.scm.azurewebsites.net:443 "GET /api/settings HTTP/1.1" 401 0
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1561, in enable_zip_deploy_functionapp
remove_remote_build_app_settings(cmd, resource_group_name, name, slot)
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1467, in remove_remote_build_app_settings
scm_is_up_to_date = validate_app_settings_in_scm(
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1426, in validate_app_settings_in_scm
scm_settings = _get_app_settings_from_scm(cmd, resource_group_name, name, slot)
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/utils.py", line 130, in call
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1416, in get_app_settings_from_scm
return response.json() or {}
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/models.py", line 910, in json
File "json_init
.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1561, in enable_zip_deploy_functionapp
remove_remote_build_app_settings(cmd, resource_group_name, name, slot)
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1467, in remove_remote_build_app_settings
scm_is_up_to_date = validate_app_settings_in_scm(
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1426, in validate_app_settings_in_scm
scm_settings = _get_app_settings_from_scm(cmd, resource_group_name, name, slot)
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/utils.py", line 130, in call
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1416, in get_app_settings_from_scm
return response.json() or {}
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/models.py", line 910, in json
File "json_init
.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
az_command_data_logger: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1561, in enable_zip_deploy_functionapp
remove_remote_build_app_settings(cmd, resource_group_name, name, slot)
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1467, in remove_remote_build_app_settings
scm_is_up_to_date = validate_app_settings_in_scm(
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1426, in validate_app_settings_in_scm
scm_settings = _get_app_settings_from_scm(cmd, resource_group_name, name, slot)
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/utils.py", line 130, in call
File "C:\Users\shhanai.azure\cliextensions\logicapp\azext_logicapp\custom.py", line 1416, in get_app_settings_from_scm
return response.json() or {}
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\requests/models.py", line 910, in json
File "json_init
.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Issue script & Debug output

az logicapp deployment source config-zip --name test808 --resource-group standard --src test808.zip
The behavior of this command has been altered by the following extension: logicapp
Getting scm site credentials for zip deployment
Starting zip deployment. This operation can take a while to complete ...
Deployment endpoint responded with status code 401
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...
Deployment status endpoint https://test808.scm.azurewebsites.net/api/deployments/latest returns malformed data. Retrying...

Expected behavior

Zip deploy works correctly by az logicapp extension without 401 error

Environment Summary

{
"azure-cli": "2.49.0",
"azure-cli-core": "2.49.0",
"azure-cli-telemetry": "1.0.8",
"extensions": {
"logic": "0.1.6",
"logicapp": "0.1.2",
"quota": "0.1.0"
}
}

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botLogic Appaz logicPossible-SolutionService AttentionThis issue is responsible by Azure service team.Similar-Issueact-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions