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

azure-mgmt-resource returning properties as str instead of an obj #18763

Closed
bmc-msft opened this issue May 14, 2021 · 4 comments
Closed

azure-mgmt-resource returning properties as str instead of an obj #18763

bmc-msft opened this issue May 14, 2021 · 4 comments
Assignees
Labels
Mgmt This issue is related to a management-plane library. Resource Health Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@bmc-msft
Copy link

  • Package Name: azure-mgmt-resource
  • Package Version: 17.0.0
  • Operating System: linux
  • Python Version: 3.8.0

Describe the bug

Many methods in azure-mgmt-resource no longer provide the results as a nested object, rather the results are provided as a str. This was not included in the breaking change documentation in this release.

It appears that this change was made in #18686.

To Reproduce

resource = ResourceManagementClient(...).resources.get_by_id(resource_id, "2018-11-30")
resource.properties['principalId']

Expected behavior

Previously, this returned the dictionary with the keys tenantId, principalId, and clientId.

Now, this returns a string with the value {'tenantId': 'GUID', 'principalId': 'GUID', 'clientId': 'GUID'}.

Note, because this string uses single quotes, it can't be decoded as json, like many other resources from Azure.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 14, 2021
@xiangyan99 xiangyan99 added the Mgmt This issue is related to a management-plane library. label May 17, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 17, 2021
@xiangyan99 xiangyan99 added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. Resource Health Service Attention Workflow: This issue is responsible by Azure service team. labels May 17, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 17, 2021
@ghost
Copy link

ghost commented May 17, 2021

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

Issue Details
  • Package Name: azure-mgmt-resource
  • Package Version: 17.0.0
  • Operating System: linux
  • Python Version: 3.8.0

Describe the bug

Many methods in azure-mgmt-resource no longer provide the results as a nested object, rather the results are provided as a str. This was not included in the breaking change documentation in this release.

It appears that this change was made in #18686.

To Reproduce

resource = ResourceManagementClient(...).resources.get_by_id(resource_id, "2018-11-30")
resource.properties['principalId']

Expected behavior

Previously, this returned the dictionary with the keys tenantId, principalId, and clientId.

Now, this returns a string with the value {'tenantId': 'GUID', 'principalId': 'GUID', 'clientId': 'GUID'}.

Note, because this string uses single quotes, it can't be decoded as json, like many other resources from Azure.

Author: bmc-msft
Assignees: msyyc
Labels:

Mgmt, Resource Health, Service Attention, needs-triage

Milestone: -

@msyyc
Copy link
Member

msyyc commented May 18, 2021

Thank you @bmc-msft for your feedback and we will check it soon.

@msyyc
Copy link
Member

msyyc commented May 21, 2021

new package has been published : https://pypi.org/project/azure-mgmt-resource/18.0.0/

@bmc-msft
Copy link
Author

@msyyc I can confirm that 18.0.0 fixes this issue.

@msyyc msyyc closed this as completed May 24, 2021
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue Apr 22, 2022
[Go] Add batch tag 04/21/22 (Azure#18763)

* [Go] Add batch tag 04/21/22
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue Apr 22, 2022
[Go] Add batch tag 04/21/22 (Azure#18763)

* [Go] Add batch tag 04/21/22
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-python that referenced this issue Apr 22, 2022
[Go] Add batch tag 04/21/22 (Azure#18763)

* [Go] Add batch tag 04/21/22
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Mgmt This issue is related to a management-plane library. Resource Health Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants