Skip to content

Remove EOL msrestazure, msrest and adal dependencies#386

Open
blaipr wants to merge 1 commit into
ctrliq:mainfrom
blaipr:fix/remove-adal-msrestazure
Open

Remove EOL msrestazure, msrest and adal dependencies#386
blaipr wants to merge 1 commit into
ctrliq:mainfrom
blaipr:fix/remove-adal-msrestazure

Conversation

@blaipr

@blaipr blaipr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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 used msrestazure.azure_cloud to derive four cloud-environment names for the cloud_name dropdown — nothing else, not even the selected cloud's endpoints (auth already goes through azure-identity, which is MSAL-based). Inlining those names drops the whole chain from the lockfile:

  • msrestazure 0.6.4 — EOL, archived
  • 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

No functional change to the plugin. 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 (choices list + default wiring). License files for the three packages are removed (test_licenses enforces 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 pairwise git merge-tree.

ISSUE TYPE

  • Bug, Docs Fix or other nominal change

COMPONENT NAME

  • API

ASCENDER VERSION

awx: 25.4.1.dev5+gcda0899.d20260610

ADDITIONAL INFORMATION

Verified with the three packages uninstalled from the venv:

py.test awx/main/tests/functional/test_credential_plugins.py   # 13 passed
py.test awx/main/tests/functional/test_licenses.py             # 1 passed
py.test --create-db -n auto --dist=loadfile awx/main/tests/...  # 3463 passed

(The flaky failures seen during validation were the cross-test mock leak since root-caused and fixed in #388.)

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).
@blaipr

blaipr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

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 Job.objects.get from six unit tests, not anything environmental. Nothing to change in this PR; with #388 merged the full parallel suite is deterministic (five consecutive clean 3476-passed validation runs).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 msrestazure from requirements.in and drop adal/msrest/msrestazure from the compiled lockfile.
  • Inline the four Azure cloud-environment names into awx.main.credential_plugins.azure_kv and wire them into the cloud_name field 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.'),
Comment on lines +11 to +12
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants