ansible/test/units
Sviatoslav Sydorenko 595413d113
Replace the inhouse collection dependency resolver with resolvelib
PR #72591

This change:

  * Adds an artifacts manager that abstracts away extracting the
    metadata from artifacts, downloading and caching them in a
    temporary location.

  * Adds `resolvelib` to direct ansible-core dependencies[0].

  * Implements a `resolvelib`-based dependency resolver for
    `collection` subcommands that replaces the legacy
    in-house code.

    This is a dependency resolution library that pip 20.3+ uses
    by default. It's now integrated for use for the collection
    dependency resolution in ansible-galaxy CLI.

  * Refactors of the `ansible-galaxy collection` CLI.
    In particular, it:

      - reimplements most of the `download`, `install`, `list` and
        `verify` subcommands from scratch;

      - reuses helper bits previously moved out into external modules;

      - replaces the old in-house resolver with a more clear
        implementation based on the resolvelib library[0][1][2].

  * Adds a multi Galaxy API proxy layer that abstracts accessing the
    version and dependencies via API or local artifacts manager.

  * Makes `GalaxyAPI` instances sortable.

  * Adds string representation methods to `GalaxyAPI`.

  * Adds dev representation to `GalaxyAPI`.

  * Removes unnecessary integration and unit tests.

  * Aligns the tests with the new expectations.

  * Adds more tests, integration ones in particular.

[0]: https://pypi.org/p/resolvelib
[1]: https://github.com/sarugaku/resolvelib
[2]: https://pradyunsg.me/blog/2020/03/27/pip-resolver-testing

Co-Authored-By: Jordan Borean <jborean93@gmail.com>
Co-Authored-By: Matt Clay <matt@mystile.com>
Co-Authored-By: Sam Doran <sdoran@redhat.com>
Co-Authored-By: Sloane Hertel <shertel@redhat.com>
Co-Authored-By: Sviatoslav Sydorenko <webknjaz@redhat.com>

Signed-Off-By: Sviatoslav Sydorenko <webknjaz@redhat.com>
2021-01-27 22:23:22 +01:00
..
_vendor
ansible_test [ansible-test] attempt to work around podman (#72096) 2020-10-05 20:13:52 -05:00
cli Replace the inhouse collection dependency resolver with resolvelib 2021-01-27 22:23:22 +01:00
compat
config Provide better decryption errors for single vault values (#72362) 2020-11-18 14:25:32 -06:00
errors Fix YAML error message when error is at the end of the file (#73241) 2021-01-19 10:07:36 -05:00
executor Add implicit role_complete block instead of role._eor (#72208) 2020-12-09 09:53:01 +01:00
galaxy Replace the inhouse collection dependency resolver with resolvelib 2021-01-27 22:23:22 +01:00
inventory Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
inventory_test_data/group_vars
mock Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00
module_utils Let command always return stdout & stderr (#73004) 2021-01-22 08:40:53 +01:00
modules iptables: Added set module/match_set support (#72984) 2021-01-11 16:32:53 -05:00
parsing vault: Read stdin data as binary on python3 (#52229) 2020-12-09 09:46:32 +01:00
playbook Add implicit role_complete block instead of role._eor (#72208) 2020-12-09 09:53:01 +01:00
plugins use correct executable and options in all cases (#73323) 2021-01-26 20:21:24 -05:00
regex
template
utils saner path dir management (#72648) 2020-12-14 19:30:13 -05:00
vars
__init__.py
requirements.txt
test_constants.py Remove some constants.py deprecated items (#70466) 2020-07-07 18:41:19 -05:00
test_context.py Clean up unit test boilerplate. 2020-06-22 14:20:33 -07:00