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 webapp config backup create fails #21943

Closed
oobaro opened this issue Apr 5, 2022 · 3 comments · Fixed by #22024
Closed

az webapp config backup create fails #21943

oobaro opened this issue Apr 5, 2022 · 3 comments · Fixed by #22024
Assignees
Labels
App Services az appservice Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Web Apps az webapp
Milestone

Comments

@oobaro
Copy link

oobaro commented Apr 5, 2022

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az webapp config backup create

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.8/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.8/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.8/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.8/site-packages/msrest/serialization.py", line 620, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.8/site-packages/msrest/serialization.py", line 1446, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.8/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.8/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.8/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.8/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.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 713, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/appservice/commands.py", line 39, in _ex_handler
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/appservice/custom.py", line 1974, in create_backup
    return client.web_apps.backup_slot(resource_group_name, webapp_name, backup_request, slot)
  File "/opt/az/lib/python3.8/site-packages/azure/core/tracing/decorator.py", line 83, in wrapper_use_tracer
    return func(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/mgmt/web/v2021_03_01/operations/_web_apps_operations.py", line 27707, in backup_slot
    _json = self._serialize.body(request, 'BackupRequest')
  File "/opt/az/lib/python3.8/site-packages/msrest/serialization.py", line 622, in body
    raise_with_traceback(
  File "/opt/az/lib/python3.8/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.8/site-packages/msrest/serialization.py", line 620, in body
    data = deserializer._deserialize(data_type, data)
  File "/opt/az/lib/python3.8/site-packages/msrest/serialization.py", line 1446, in _deserialize
    raise_with_traceback(DeserializationError, msg, err)
  File "/opt/az/lib/python3.8/site-packages/msrest/exceptions.py", line 51, in raise_with_traceback
    raise error.with_traceback(exc_traceback)
  File "/opt/az/lib/python3.8/site-packages/msrest/serialization.py", line 1428, in _deserialize
    found_value = key_extractor(attr, attr_desc, data)
  File "/opt/az/lib/python3.8/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.8/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.

  • az webapp config backup create -g {} --webapp-name {} -s {} --backup-name {} --container-url {} --debug

Expected Behavior

Create backup of the selected slot in the selected storage container

Environment Summary

Linux-5.4.0-1074-azure-x86_64-with-glibc2.28 (Cloud Shell), Common Base Linux Delridge (quinault)
Python 3.8.12
Installer: DEB

azure-cli 2.34.1

Extensions:
ai-examples 0.2.5
ssh 1.0.0

Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0

Additional Context

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Apr 5, 2022
@ghost ghost added this to the Backlog milestone Apr 5, 2022
@ghost ghost assigned evelyn-ys Apr 5, 2022
@ghost ghost added Auto-Assign Auto assign by bot App Services az appservice CXP Attention This issue is handled by CXP team. Web Apps az webapp VM SSH SSH Backup labels Apr 5, 2022
@ghost ghost assigned zhoxing-ms Apr 5, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 5, 2022

route to CXP team

@yonzhan yonzhan removed the Backup label Apr 6, 2022
@navba-MSFT navba-MSFT self-assigned this Apr 7, 2022
@navba-MSFT
Copy link
Contributor

navba-MSFT commented Apr 7, 2022

@oobaro Apologies for the late reply. I was able to reproduce this issue at my end. I am doing some research on this and I will update you.

In the meantime, as a workaround, Could you please try to run the same command by without specifying the --slot (-s) parameter and check if that helps? If the slot is not specified, it defaults to the production slot. Awaiting your reply.

Similar issue a PR was filed: #18582

@navba-MSFT navba-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Apr 8, 2022
StrawnSC added a commit to StrawnSC/azure-cli that referenced this issue Apr 11, 2022
@navba-MSFT
Copy link
Contributor

@oobaro The above PR has been filed to fix this bug. This will be fixed in next release.

zhoxing-ms pushed a commit that referenced this issue Apr 14, 2022
…buteError 'str' object has no attribute 'get' (#22024)

* fix #21943

* add testcase for slot backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Services az appservice Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. Web Apps az webapp
Projects
None yet
5 participants