Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport][stable-2.16] Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree #81746

Commits on Sep 21, 2023

  1. Always allow "no-other-choice" pre-release dependencies when resolvin…

    …g collection dependency tree
    
    PR ansible#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
    6f4b4c3, 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 ansible#73416
    Ref ansible#79112
    Fixes ansible#79168
    Fixes ansible#80048
    Resolves ansible#81605
    
    Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
    (cherry picked from commit 7662a05)
    webknjaz committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    ed88f2d View commit details
    Browse the repository at this point in the history