You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible
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>
3 years ago
..
_vendor Rename to ansible-core (#72594) 4 years ago
cli Replace the inhouse collection dependency resolver with `resolvelib` 3 years ago
collections saner path dir management (#72648) 4 years ago
compat Updated bundled libraries (#70418) 4 years ago
config undeprecated hash_merge setting (#73328) 3 years ago
errors Fix YAML error message when error is at the end of the file (#73241) 3 years ago
executor Consolidate filters/tests handling into JinjaPluginIntercept (#71463) 3 years ago
galaxy Replace the inhouse collection dependency resolver with `resolvelib` 3 years ago
inventory fix inventory source parse error handling (#73160) 3 years ago
module_utils allow env to override unspecified unsafe_writes (#73282) 3 years ago
modules iptables: Fixed get_chain_policy API (#69152) 3 years ago
parsing vault: Read stdin data as binary on python3 (#52229) 4 years ago
playbook Consolidate filters/tests handling into JinjaPluginIntercept (#71463) 3 years ago
plugins use correct executable and options in all cases (#73323) 3 years ago
template Local vars should have highest precedence in AnsibleJ2Vars (#72830) 3 years ago
utils Allow restricting config values to enumerated list (#73162) 3 years ago
vars Fix missing ansible.builtin FQCNs in hardcoded action names (#71824) 4 years ago
__init__.py transparent downstream vendoring (#69850) 4 years ago
constants.py Allow restricting config values to enumerated list (#73162) 3 years ago
context.py Become plugins (#50991) 5 years ago
keyword_desc.yml Document and warn when max_fail and free are used (#72616) 4 years ago
release.py Bump devel to 2.11.0 (#70121) 4 years ago