ACP as an "out of the box" / "all batteries included" package

As @tremble pointed out in Proposal: trimming down the Ansible community package and collection removal roadmap:

It might not be easy, and we might run into dependency hell. But I think it’s somewhat weird that users have to install the dependencies of the collections they want to use manually.

Looks like an idea worth discussing to me. WDYT?

BTW if this has been already discussed here on the forum and you can find the topic, please add a link.

You absolutely will run into dependency hell. As the maintainer for ansible-builder, I get GitHub issues quite often about collection dependency conflicts that folks assume builder should do something about. But dependencies are ultimately resolved by pip. And if pip can’t resolve them, builder sure as heck can’t. I can’t imagine trying to pull in all dependencies of so many collections at once.

Yep, dependency hell is guaranteed :slight_smile: I did that ansible-builder experiment with all collections in Ansible community package some years ago and it failed horribly due to many contradicting version specifiers.

We also had a discussion related to this some years back: Create guidelines for collection python requirements · Issue #224 · ansible-community/community-topics · GitHub

And some experiments of mine from some years ago to make it easier to install dependencies for specific modules/plugins: [WIP] Allow to specify module/plugin requirements in a machine-readable way by felixfontein · Pull Request #7720 · ansible-collections/community.general · GitHub

I feel like it’s a paradox or something.

You create a package with all dependencies in it to make install as easy as possible for new users. But having so many dependencies will almost definitely require a virtual environment.

Most new users probably aren’t python savvy enough to be creating/managing virtual environments. If they are, they can probably wrap their head around ansible galaxy :thinking:

So here’s the thing…

Being involved with Red Hat’s “ee-supported” execution environments, I agree with @shrews, as things stand today we would hit dependency hell. FWIW the VMware collections won’t work unless you download the SDKs from their website. But this may also be the time to address these issues.

We know that trying to install our collections as a kitchen sink is going to result in either dependency hell (because we try to include the batteries), or non-functional collections (because we leave it as an exercise for the reader to find the dependencies). To me this indicates that our current packaging strategy has some fundamental flaws that we should be addressing.

The more I look at this, the more I’m leaning towards either an aggressive prune of the “default” package and groups of collections. Rather than what we have today which is a kitchen-sink where someone forgot to connect the waste and hot water pipe. We may also want to discuss policies around pinning/upper limits on dependencies to help avoid conflicts… It’s going to result in pain in the short term, but is now the time to try and work through that pain?

I’m going to go out on a limb here, and hypothesize also that the majority of people installing the ansible package are also using a relatively small subset of the collections it provides. Not saying that each user uses the same subset, but each independent user is probably using a “hand full” of collections at most.

As such, I really don’t think deps for everything is a good idea. At most I might be able to get on board with a bunch of extras in the package, but that is also only really of use with pip, and they aren’t easily discovered.

fwiw, I am still a proponent of phasing out the ansible package, and directing people toward just installing what they actually need.

'scuse me, but what VMware collection are you talking about? I know three: community.vmware, vmware.vmware and vmware.vmware_rest. As far as know, all of them should work without downloading any SDK manually from their website by now. That is, if you’re using a current version of those collections.

Feel free to ping me and / or @mikemorency personally about this. Or even better: Open a thread here on the forum where we can discuss this so that everyone can join the discussion.

Not to put too fine a point on this, but as far as I know if you install a collection directly from galaxy you still have to install the dependencies / requirements manually. Or don’t you? I mean, if I install collection A that requires PyPI package B, I would have to install B manually. Right? This sucks. But it’s OT here.

Anyway, I mainly wanted to move this discussion out of the trimming down ACP thread because I thought it didn’t belong there. But it’s interesting how many comments have been posted in this short time.

I think that is key to understanding the specific comment.

However, it is really a description of the complexity of dependencies that aren’t centrally maintained and don’t necessarily follow common practices.

fwiw, the AAP EEs don’t pull in new major collection versions outside of the AAP release cycle. So I believe they all currently rely on older versions of the collections that relied on an sdk not available on pypi.