Remove EOL msrestazure, msrest and adal dependencies#386
Conversation
msrestazure (EOL, archived by Microsoft) was only imported in one place: the Azure Key Vault credential plugin used msrestazure.azure_cloud to derive the list of cloud environment names for the cloud_name dropdown. The backend never used anything else from it - not even the selected cloud's endpoints. Inlining the four names (with a pointer to the original source) lets the whole chain drop out of the lockfile: - msrestazure 0.6.4 (EOL) - msrest 0.7.1 (EOL, only required by msrestazure) - adal 1.2.7 (abandoned by Microsoft since 2020; superseded by MSAL; only required by msrestazure) The plugin's auth already uses azure-identity (MSAL-based), so no functional change. test_imported_azure_cloud_sdk_vars asserted the old msrestazure object shape (including suffixes the plugin never read) and is rewritten to assert what the plugin actually exposes. License files for the three removed packages are deleted (test_licenses enforces this).
|
Update on the flaky-test note in this PR's ADDITIONAL INFORMATION: the #379 flake family (survey_spec/update_model) referenced there is now root-caused and fixed in #388 — a cross-test mock leak on |
There was a problem hiding this comment.
Pull request overview
This PR removes the end-of-life msrestazure dependency chain (msrestazure, msrest, adal) by inlining the Azure cloud-environment names used by the Azure Key Vault credential plugin, and updates tests/licensing artifacts accordingly.
Changes:
- Remove
msrestazurefromrequirements.inand dropadal/msrest/msrestazurefrom the compiled lockfile. - Inline the four Azure cloud-environment names into
awx.main.credential_plugins.azure_kvand wire them into thecloud_namefield choices/default. - Update the functional test to assert the exposed choices/default, and remove the corresponding license files.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements/requirements.txt | Removes adal, msrest, msrestazure from the compiled requirements output. |
| requirements/requirements.in | Drops the direct msrestazure input requirement. |
| licenses/msrestazure.txt | Removes license file for removed dependency. |
| licenses/msrest.txt | Removes license file for removed dependency. |
| licenses/adal.txt | Removes license file for removed dependency. |
| awx/main/tests/functional/test_credential_plugins.py | Reworks Azure KV plugin test to validate cloud_name choices/default wiring. |
| awx/main/credential_plugins/azure_kv.py | Removes msrestazure import and replaces dynamic cloud enumeration with a static name list. |
| @@ -31,8 +38,8 @@ | |||
| 'id': 'cloud_name', | |||
| 'label': _('Cloud Environment'), | |||
| 'help_text': _('Specify which azure cloud environment to use.'), | |||
| cloud_field = [f for f in azure_kv.azure_keyvault_inputs['fields'] if f['id'] == 'cloud_name'][0] | ||
| assert cloud_field['choices'] == azure_kv.CLOUD_NAMES |
SUMMARY
Retires three end-of-life Microsoft packages in one move.
msrestazure(archived) was imported in exactly one place: the Azure Key Vault credential plugin usedmsrestazure.azure_cloudto derive four cloud-environment names for thecloud_namedropdown — nothing else, not even the selected cloud's endpoints (auth already goes throughazure-identity, which is MSAL-based). Inlining those names drops the whole chain from the lockfile:msrestazure0.6.4 — EOL, archivedmsrest0.7.1 — EOL, only required by msrestazureadal1.2.7 — abandoned by Microsoft since 2020 (superseded by MSAL), only required by msrestazureNo functional change to the plugin.
test_imported_azure_cloud_sdk_varsasserted the old msrestazure object shape (including suffixes the plugin never read) and is rewritten to assert what the plugin actually exposes (choices list + default wiring). License files for the three packages are removed (test_licensesenforces the pairing).Independent of all open PRs. Lockfile regenerated with
./updater.sh run; the only delta is the three removals. Verified conflict-free against every other open PR via pairwisegit merge-tree.ISSUE TYPE
COMPONENT NAME
ASCENDER VERSION
ADDITIONAL INFORMATION
Verified with the three packages uninstalled from the venv:
(The flaky failures seen during validation were the cross-test mock leak since root-caused and fixed in #388.)