Closed rfrancis2823 closed 7 months ago
We've recently talked about this scenario while specing out https://github.com/ansible/ansible-builder/pull/664
We've decided this is not something we plan to address. Exclusions will continue to only apply to top-level deps. If the EE definition or a collection requirements.txt has indirect dependencies, they will need to be excluded, and explicit constraints applied in the EE definition.
We did talk about the potential of using piptools, and building a full dependency tree, but are not prepared to support such a scenario or the complexities of doing so.
Appreciate the update. That’s understandable. After spending more time maintaining our organization’s image, I completely agree with that decision.
We have a pretty complex set of dependencies and trying to manage that on the builder side I think would be an unwinnable battle.
Cheers!
From: Matt Martz @.> Sent: Tuesday, March 26, 2024 3:46:19 PM To: ansible/ansible-builder @.> Cc: rfrancis2823 @.>; Author @.> Subject: Re: [ansible/ansible-builder] builder 3.0.0 ansible-core gets updated in user-pip requirements are installed - specifically molecule (Issue #594)
We've recently talked about this scenario while specing out #664https://github.com/ansible/ansible-builder/pull/664
We've decided this is not something we plan to address. Exclusions will continue to only apply to top-level deps. If the EE definition or a collection requirements.txt has indirect dependencies, they will need to be excluded, and explicit constraints applied in the EE definition.
We did talk about the potential of using piptools, and building a full dependency tree, but are not prepared to support such a scenario or the complexities of doing so.
— Reply to this email directly, view it on GitHubhttps://github.com/ansible/ansible-builder/issues/594#issuecomment-2021437842, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC5XZULE7NFBCC5CTPO7CNTY2HNBXAVCNFSM6AAAAAA3QPCN7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGQZTOOBUGI. You are receiving this because you authored the thread.Message ID: @.***>
ansible-builder will seemingly inadvertently update ansible-core when molecule gets installed in the user-pip requirements file:
Dependencies in v3 builder yml config:
ansible-core version after build completes:
Step is in builder build stage:
Introspect has
ansible-core
inEXCLUDE_REQUIREMENTS
, but this leaves open the possibility that ansible-could get updated by getting caught in dependency resolution. Molecule'sansible-compat
dependency being an example:EXCLUDE_REQUIREMENTS can be overridden by also putting the ansible-core version you want in your user requirements file, so there is a workaround. However, since there is a seprate key in the dependencies structure for ansible-core and ansible-runner, I don't think introspect should exclude them if they are defined.
Proposing that builder should append the requirements if ansible core and runner package_pip versions are specified in dependencies. Its not intuitive that it would be allowed to change since it was installed at an earlier stage.