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

ansible-galaxy collection install dep resolver changes #71784

Closed
jborean93 opened this issue Sep 17, 2020 · 2 comments · Fixed by #71931
Closed

ansible-galaxy collection install dep resolver changes #71784

jborean93 opened this issue Sep 17, 2020 · 2 comments · Fixed by #71931
Assignees
Labels
affects_2.11 feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@jborean93
Copy link
Contributor

SUMMARY

The current dep resolver for ansible-galaxy collection install does not handle updating of collections too well. The current behaviour will never upgrade an already installed collection even if a newer one was available. If a version constraint was specified that the current collection does not meet then it will error saying --force (--force-with-deps for dep conflicts) is required. The --force argument has it's own problem and acts like a sledgehammer removing all the collections and starting again. To prepare for adding the --upgrade flag to install we first need to fix this behaviour. The following changes need to be made to how the dep resolver works

  • When a version constraint is specified that does not match an already installed collection, update it
    • Current behaviour requires --force
  • When a dep constraint does not match an already installed collection, update it
    • Current behaviour requires --force-with-deps

The relevant tests will need to be updated and an integration test added for these 2 scenario changes. The _build_dependency_map function is a good starting point for this.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

ansible-galaxy collection install

ADDITIONAL INFORMATION

The new dep resolver behaviour is planned to act like pip. Some test scenarios for pip can be found at https://gist.github.com/jborean93/65495d1e36aa9c02fbdf707d4232fff7.

@jborean93
Copy link
Contributor Author

ansible/proposals#181 (comment) also sums up the proposed end goal for the new dep resolver.

@ansibot ansibot added affects_2.11 feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 17, 2020
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Sep 17, 2020
@webknjaz webknjaz linked a pull request Sep 25, 2020 that will close this issue
@ansibot ansibot added the has_pr This issue has an associated PR. label Jan 23, 2021
@jborean93
Copy link
Contributor Author

Was implemented with #72591 and subsequently followed up with #73336.

@ansible ansible locked and limited conversation to collaborators Mar 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.11 feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants