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

WebApp:az webapp deployment source config-local-git #18179

Closed
ngreynoso opened this issue May 21, 2021 · 3 comments · Fixed by #18364
Closed

WebApp:az webapp deployment source config-local-git #18179

ngreynoso opened this issue May 21, 2021 · 3 comments · Fixed by #18364
Assignees
Labels
Service Attention This issue is responsible by Azure service team. Web Apps az webapp
Milestone

Comments

@ngreynoso
Copy link

Try this command:

##The webappName exist

$webappname=mywebappName
echo Git deployment URL: $(az webapp deployment source config-local-git --name $webappname --resource-group AzureTutorial --slot staging --query url --output tsv)

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az webapp deployment source config-local-git

Errors:

The command failed with an unexpected error. Here is the traceback:
Unable to build a model: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get', DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1193, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1222, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
AttributeError: 'str' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 620, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1446, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1193, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1222, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
msrest.exceptions.DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'

During handling of the above exception, another exception occurred:

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/appservice/custom.py", line 1653, in enable_local_git
    site_config, slot)
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py", line 14662, in create_or_update_configuration_slot
    body_content = self._serialize.body(site_config, 'SiteConfigResource')
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 623, in body
    SerializationError, "Unable to build a model: "+str(err), err)
  File "/opt/az/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 620, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1446, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1193, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1222, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
msrest.exceptions.SerializationError: Unable to build a model: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get', DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'

To Reproduce:

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

  • Put any pre-requisite steps here...
  • az webapp deployment source config-local-git --name {} --resource-group {} --slot {} --query {} --output {}

Expected Behavior

Environment Summary

Linux-5.4.0-1047-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.23.0

Extensions:
ai-examples 0.2.5
ssh 0.1.5

Additional Context

@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 labels May 21, 2021
@yonzhan yonzhan added the Web Apps az webapp label May 22, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label May 22, 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 May 22, 2021
@ghost
Copy link

ghost commented May 22, 2021

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

Issue Details

Try this command:

##The webappName exist

$webappname=mywebappName
echo Git deployment URL: $(az webapp deployment source config-local-git --name $webappname --resource-group AzureTutorial --slot staging --query url --output tsv)

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az webapp deployment source config-local-git

Errors:

The command failed with an unexpected error. Here is the traceback:
Unable to build a model: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get', DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1193, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1222, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
AttributeError: 'str' object has no attribute 'get'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 620, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1446, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1193, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1222, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
msrest.exceptions.DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'

During handling of the above exception, another exception occurred:

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/appservice/custom.py", line 1653, in enable_local_git
    site_config, slot)
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py", line 14662, in create_or_update_configuration_slot
    body_content = self._serialize.body(site_config, 'SiteConfigResource')
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 623, in body
    SerializationError, "Unable to build a model: "+str(err), err)
  File "/opt/az/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 620, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1446, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.6/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1193, in rest_key_case_insensitive_extractor
    return attribute_key_case_insensitive_extractor(key, None, working_data)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 1222, in attribute_key_case_insensitive_extractor
    return data.get(found_key)
msrest.exceptions.SerializationError: Unable to build a model: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get', DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'

To Reproduce:

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

  • Put any pre-requisite steps here...
  • az webapp deployment source config-local-git --name {} --resource-group {} --slot {} --query {} --output {}

Expected Behavior

Environment Summary

Linux-5.4.0-1047-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.23.0

Extensions:
ai-examples 0.2.5
ssh 0.1.5

Additional Context

Author: ngreynoso
Assignees: -
Labels:

Service Attention, Web Apps

Milestone: -

@yonzhan
Copy link
Collaborator

yonzhan commented May 22, 2021

route to service team

@Kotasudhakarreddy Kotasudhakarreddy changed the title az webapp deployment source config-local-git WebApp:az webapp deployment source config-local-git May 25, 2021
@Kotasudhakarreddy Kotasudhakarreddy self-assigned this May 25, 2021
@Kotasudhakarreddy
Copy link
Contributor

@panchagnula . looks like this is similar issue as #18075 . It is Deserialization failure for SiteConfigResource model. here is the code block for the same.
I think this is a breaking change form SDK update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment