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

Parts of deprecated msrestazure aren't ported to any other library #29023

Open
gabuniag opened this issue Feb 27, 2023 · 10 comments
Open

Parts of deprecated msrestazure aren't ported to any other library #29023

gabuniag opened this issue Feb 27, 2023 · 10 comments
Assignees
Labels
Azure.Core customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team

Comments

@gabuniag
Copy link

gabuniag commented Feb 27, 2023

Issue:

The msrestazure package has been deprecated for quite some time:
This package is deprecated and no longer receives updates The authentication part of this package has been moved to [azure-identity](https://pypi.org/project/azure-identity/) The other parts of this library are covered by [azure-mgmt-core](https://pypi.org/project/azure-mgmt-core/)
https://github.com/Azure/msrestazure-for-python

This package contains a "Cloud" class, which is necessary to work with various government clouds:
https://github.com/Azure/msrestazure-for-python/blob/8e3def8c9927a349596e575de93df76de7a3a2b6/msrestazure/azure_cloud.py#L113
and its instances that have various URL-s hardcoded: https://github.com/Azure/msrestazure-for-python/blob/8e3def8c9927a349596e575de93df76de7a3a2b6/msrestazure/azure_cloud.py#L169

Per learning.microsoft.com, those class instances are used to connect to a government cloud: https://learn.microsoft.com/en-us/azure/developer/python/sdk/azure-sdk-sovereign-domain

Such a class, that would provide similar constants is not implemented elsewhere in the Azure ecosystem.

Suggested Solution

Code found in https://github.com/Azure/msrestazure-for-python/blob/master/msrestazure/azure_cloud.py should be ported to azure-identity. This will allow developers to completely deprecate msrestazure from their codebase.

Why this is important

Since there is no alternative authoritative source of the constants found in AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_GERMAN_CLOUD, various azure-related projects need to either:
Depend on a deprecated project
or:
Implement "Cloud" class and its instances locally, thus having to maintain it locally.
Both solutions seem bad.

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 27, 2023
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 27, 2023
@kristapratico kristapratico added Azure.Core and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Mar 6, 2023
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 6, 2023
@kristapratico kristapratico added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Mar 6, 2023
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 6, 2023
@kristapratico
Copy link
Member

Thanks for your issue @gabuniag, we'll get back to you asap.

@lmazuel
Copy link
Member

lmazuel commented Apr 14, 2023

This is a duplicate of #5561 in the intent, we didn't finish the design of this indeed.

CC @johanste

@tbennett0
Copy link

Hi @kristapratico @lmazuel @johanste, is resolution of this issue still in the plans? Thanks!

@lmazuel
Copy link
Member

lmazuel commented Aug 30, 2023

@tbennett0 , @xiangyan99 is working on this as we speak

@JimacoMS4
Copy link

JimacoMS4 commented Dec 5, 2023

Has there been any progress here? Please see the documentation issue in which it's mentioned above. Thanks!

@JimacoMS4
Copy link

@lmazuel -- are there any updates here? Thanks!

@lmazuel
Copy link
Member

lmazuel commented Dec 13, 2023

We got sidetracked, but @xiangyan99 is still working on this as available.

@karpikpl
Copy link

hate to ask again but this has been worked on since August? is there a planned release date?

@rr-peter
Copy link

Any chances to get this moved to supported lib?

@xiangyan99
Copy link
Member

Here is an update:

we added the list of the supported clouds in https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/_azure_clouds.py

and the mapping from azure_cloud to the resource_manager & credential_scopes information in
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py#L224

We will add the mapping from azure_cloud to the authority information in azure-identity library and will keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

No branches or pull requests

9 participants