ansible-builder icon indicating copy to clipboard operation
ansible-builder copied to clipboard

Dealing with broken collection deps

Open nitzmahone opened this issue 1 year ago • 2 comments

There will be inevitable cases where a collection declares incorrect, conflicting, or just-plain-broken dependencies- as of builder 3.0rc1, there's no way to just ignore those deps to allow the EE build to continue.

We don't want to get into the business of transforming, constraining, or substituting build dependencies, but providing a per-collection mechanism for "I don't want to consider part of this collection's declared deps" seems like a useful (and sometimes necessary) escape hatch.

Since we're just passing through the Galaxy requirements.yml, the most obvious method (annotating the requirements inline) is probably a non-starter, as we'd have to filter and re-generate the inputs to Galaxy in that case. So we're left with declaring that somewhere else in the EE def.

Perhaps something like the following:

dependencies:
  galaxy: |
    collections:
    - ansible.utils
    - community.windows
options:
  dependency_control:
    - collection: ansible.utils
      ignore_bindep: true
      ignore_python: true

Could get fancier with the ability to mask individual requirements, ignore cross-collection dependencies, ignore all...

We'd take this information into account as we generate unified requirements files, dropping data from individual sources as requested. Global "never install this package" kinds of things probably aren't possible, but something like this would at least allow the installation of a broken collection version in conjunction with manual addition of the necessary deps.

nitzmahone avatar Apr 25 '23 17:04 nitzmahone