Resolving dependencies installing collections

I was building a new release of a collection on Saturday with the following in galaxy.yml:

dependencies:
  ansible.utils:    '>=2.6.1'

That built just fine, but when updating projects that use this new release (ansible-galaxy collection install -r collections/requirements.yml -p ./collections/ --force-with-deps), then ansible-galaxy complained that it couldn’t resolve the dependency on ansible.utils. (Sorry, I don’t have the exact wording.) I fought it for a couple of hours trying different things, and finally worked around the issue by removing the dependency thus:

dependencies: {}

After that, updates of the projects which use the new release of my collection worked.
Clearly this is not an acceptable work-around. I though it was something I had broken, but seeing the flurry of issues with galaxy-ng it’s probably related and should be reported.

Edit: This was all with “ansible [core 2.14.7]”.

1 Like

Our production is toast since the galaxy_ng switch.

Starting galaxy collection install process
Process install dependency map
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* kubernetes.core:2.2.0 (direct request)

Edit: Here’s another example from Saturday September 30 around 5:16:21 PM EDT.

ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* ansible.utils:>=2.6.1 (dependency of mw.cc:1.0.2)

This was the one I mentioned in the original post where we had to remove the dependencies in the galaxy.yml to get projects to update with it.

Hi,

The issue is that the ansible-galaxy client is attempting to retrieve dependency information from /api/v2/ as cached in ~/.ansible/galaxy_cache/api.json

The cache can be cleared by including --no-cache or --clear-response-cache in the ansible-galaxy command.

1 Like

Interesting. This was occurring in our AWX instances in GCP. I don’t think I have a way to give additional parameters to those galaxy commands. However, the cache may have cleared by now anyway.

I’ll try adding the dependencies back and see if it starts working again.

Thank you very much!

Edit: Caches must have cleared. All the Right Things are happening now wrt resolving dependencies, both on the CLI and in our AWX instances. Good to have an answer about the cause, too. Much appreciated, @drodowic .

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.