ansible/awx

Fix Delinea imports and import test

Open

#14,703 opened on 2023年12月5日

GitHub で見る
 (3 comments) (0 reactions) (1 assignee)Python (13,071 stars) (3,333 forks)batch import
blockedcomponent:apigood first issuetype:bug

説明

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

DomainPasswordGrantAuthorizer is unused in awx/main/credential_plugins/tss.py. Flake8 will most likely catch this on the next run so just want to get ahead of this.

awx/main/tests/functional/test_credential_plugins.py will also need to be adjusted for its removal.

AWX version

devel

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

N/A

Modifications

no

Ansible version

n/a

Operating system

n/a

Web browser

No response

Steps to reproduce

Run flake8 and functional tests locally, they will fail with unused imports.

Expected results

Tests pass without issue.

Actual results

ImportError: cannot import name 'DomainPasswordGrantAuthorizer' from 'awx.main.credential_plugins.tss' (/awx_devel/awx/main/credential_plugins/tss.py) or an unused import: DomainPasswordGrantAuthorizer is imported but not used will show up

Additional information

We can remove the try except block now as well if we want as the requirements file has been updated. I will pick this up if no one from the community wants to take it up

コントリビューターガイド