salt-extensions / saltext-azurerm

Salt Extension Modules for Azure Resource Manager
Apache License 2.0
7 stars 9 forks source link

Remove msrestazure #32

Closed natalieswork closed 1 year ago

natalieswork commented 1 year ago

What does this PR do?

This PR aims to remove the dependency on msrestazure. The bulk of the changes involves replacing the usage of msrestazure.azure_exceptions.CloudError with azure.core.exceptions import HttpResponseError.

Note:

There are still two instances where msrest functionality is required for retrieving cloud metadata. The specific locations where msrest is still used are:

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 80.00% and project coverage change: -0.15 :warning:

Comparison is base (a057fec) 51.80% compared to head (0f04b7a) 51.66%.

:exclamation: Current head 0f04b7a differs from pull request most recent head d7e9394. Consider uploading reports for the commit d7e9394 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== - Coverage 51.80% 51.66% -0.15% ========================================== Files 17 17 Lines 886 871 -15 Branches 61 55 -6 ========================================== - Hits 459 450 -9 + Misses 414 411 -3 + Partials 13 10 -3 ``` | Flag | Coverage Δ | | |---|---|---| | Linux | `51.66% <80.00%> (-0.15%)` | :arrow_down: | | project | `71.08% <75.00%> (+2.47%)` | :arrow_up: | | py37 | `18.33% <4.00%> (+0.47%)` | :arrow_up: | | py38 | `51.72% <80.00%> (-0.15%)` | :arrow_down: | | py39 | `51.72% <80.00%> (-0.15%)` | :arrow_down: | | salt_3005_1 | `51.66% <80.00%> (-0.15%)` | :arrow_down: | | tests | `47.09% <100.00%> (-0.67%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/salt-extensions/saltext-azurerm/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/saltext/azurerm/utils/azurerm.py](https://app.codecov.io/gh/salt-extensions/saltext-azurerm/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3NhbHRleHQvYXp1cmVybS91dGlscy9henVyZXJtLnB5) | `70.18% <75.00%> (+2.52%)` | :arrow_up: | | [tests/unit/utils/test\_azurerm.py](https://app.codecov.io/gh/salt-extensions/saltext-azurerm/pull/32?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-dGVzdHMvdW5pdC91dGlscy90ZXN0X2F6dXJlcm0ucHk=) | `95.61% <100.00%> (-0.33%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.