1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-27 17:55:10 +03:00
awx/requirements
Shane McDonald eedd146643
Merge pull request #13109 from TheRealHaoLiu/move-licenses
move license directory out of docs
2022-11-17 08:18:15 -05:00
..
README.md Merge pull request #13109 from TheRealHaoLiu/move-licenses 2022-11-17 08:18:15 -05:00
requirements_dev.txt Transition from setup.py to setup.cfg 2022-06-27 13:30:01 -04:00
requirements_git.txt Upgrade to Django 3.2 2022-03-14 13:19:53 -04:00
requirements_tower_uninstall.txt Remove removal requirement that isn't actually in the requirements 2019-10-16 15:34:33 -04:00
requirements.in Merge pull request #13178 from john-westcott-iv/update_django_patch 2022-11-16 10:58:38 -05:00
requirements.txt Merge pull request #13178 from john-westcott-iv/update_django_patch 2022-11-16 10:58:38 -05:00
updater.sh Updating README and update.sh usage 2022-11-09 10:15:36 -05:00

Dependency Management

The requirements.txt file is generated from requirements.in and requirements_git.txt, using pip-tools and pip-compile.

How To Use

Commands should be run in the awx container from inside the ./requirements directory of the awx repository.

Upgrading or Adding Select Libraries

If you need to add or upgrade one targeted library, then modify requirements.in, then run the script:

./updater.sh run

Upgrading Unpinned Dependency

If you require a new version of a dependency that does not have a pinned version for a fix or feature, pin a minimum version in requirements.in and run ./updater.sh run. For example, replace the line asgi-amqp with asgi-amqp>=1.1.4, and consider leaving a note.

Then next time that a general upgrade is performed, the minimum version specifiers can be removed, because *.txt files are upgraded to latest.

Upgrading Dependencies

You can upgrade (pip-compile --upgrade) the dependencies by running

./updater.sh upgrade.

Licenses and Source Files

If any library has a change to its license with the upgrade, then the license for that library inside of licenses needs to be updated.

For libraries that have source distribution requirements (LGPL as an example), a tarball of the library is kept along with the license. To download the PyPI tarball, you can run this command:

pip download <pypi library name> -d licenses/ --no-binary :all: --no-deps

Make sure to delete the old tarball if it is an upgrade.

UPGRADE BLOCKERs

Anything pinned in *.in files involves additional manual work in order to upgrade. Some information related to that work is outlined here.

Django

For any upgrade of Django, it must be confirmed that we don't regress on FIPS support before merging.

See internal integration test knowledge base article how_to_test_FIPS for instructions.

If operating in a FIPS environment, hashlib.md5() will raise a ValueError, but will support the usedforsecurity keyword on RHEL and Centos systems.

Keep an eye on https://code.djangoproject.com/ticket/28401

The override of names_digest could easily be broken in a future version. Check that the import remains the same in the desired version.

af5ec222cc/django/db/backends/base/schema.py (L7)

social-auth-app-django

django-social keeps a list of backends in memory that it gathers based on the value of settings.AUTHENTICATION_BACKENDS at import time: c1e2795b00/social_django/utils.py (L13)

Our settings.AUTHENTICATION_BACKENDS can change dynamically as settings are changed (i.e., if somebody configures Github OAuth2 integration), so we need to overwrite this in-memory value at the top of every request so that we have the latest version

django-oauth-toolkit

Versions later than 1.4.1 throw an error about id_token_id, due to the OpenID Connect work that was done in https://github.com/jazzband/django-oauth-toolkit/pull/915. This may be fixable by creating a migration on our end?

azure-keyvault

Upgrading to 4.0.0 causes error because imports changed.

  File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/credential_plugins/azure_kv.py", line 4, in <module>
  from azure.keyvault import KeyVaultClient, KeyVaultAuthentication
ImportError: cannot import name 'KeyVaultClient'

pip, setuptools and setuptools_scm

The offline installer needs to have functionality confirmed before upgrading these. Versions need to match the versions used in the pip bootstrapping step in the top-level Makefile.

cryptography

The offline installer needs to have functionality confirmed before upgrading these.

Library Notes

pexpect

Version 4.8 makes us a little bit nervous with changes to searchwindowsize https://github.com/pexpect/pexpect/pull/579/files Pin to pexpect==4.7.x until we have more time to move to 4.8 and test.