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/changelogs/fragments/81606-ansible-galaxy-collec...

17 lines
468 B
YAML

[backport][stable-2.15] Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree (#81747) * Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree PR #81606. Prior to this patch, when `--pre` CLI flag was not passed, the dependency resolver would treat concrete collection dependency candidates (Git repositories, subdirs, tarball URLs, or local dirs or files etc) as not meeting the requirements. This patch makes it so pre-releases in any concrete artifact references, and the ones being specifically pinned dependencies or user requests, met anywhere in the dependency tree, are allowed unconditionally. This is achieved by moving the pre-release check from `is_satisfied_by()` to the `find_matches()` hook, following the Pip's example. As a bonus, this change also fixes the situation when a collection pre-releases weren't considered if it didn't have any stable releases. This now works even if `--pre` wasn't requested explicitly. Finally, this patch partially reverts commit 6f4b4c345b44d84cce55ba6502a72b420a52c7b3, except for the tests. And it also improves the `--pre` hint warning to explain that it mostly affects Galaxy/Automation Hub-hosted collection releases. Ref #73416 Ref #79112 Fixes #79168 Fixes #80048 Resolves #81605 Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> (cherry picked from commit 7662a050853b41189a66c9a840091e9b05bcba49) * Shorten the collection namespace and name @ tests This is needed on the 2.15 branch which uses older galaxy containers that have restricted FQCN size.
1 year ago
---
bugfixes:
- >-
ansible-galaxy - started allowing the use of pre-releases
for dependencies on any level of the dependency tree that
specifically demand exact pre-release versions of
collections and not version ranges.
(https://github.com/ansible/ansible/pull/81606)
- >-
ansible-galaxy - started allowing the use of pre-releases
for collections that do not have any stable versions
published.
(https://github.com/ansible/ansible/pull/81606)
...