From aac9f8eb807287f65bf1e86b1bb2ffaf58892dda Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 31 Aug 2023 02:47:07 +0200 Subject: [PATCH] Log error dependency resolver exceptions strings --- lib/ansible/galaxy/collection/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ansible/galaxy/collection/__init__.py b/lib/ansible/galaxy/collection/__init__.py index cf726538755..9f90eb6f922 100644 --- a/lib/ansible/galaxy/collection/__init__.py +++ b/lib/ansible/galaxy/collection/__init__.py @@ -1833,6 +1833,9 @@ def _resolve_depenency_map( max_rounds=2000000, # NOTE: same constant pip uses ).mapping except CollectionDependencyResolutionImpossible as dep_exc: + display.error( + f'Collection dependency resolution impossible: {dep_exc !s}', + ) conflict_causes = ( '* {req.fqcn!s}:{req.ver!s} ({dep_origin!s})'.format( req=req_inf.requirement, @@ -1854,6 +1857,9 @@ def _resolve_depenency_map( error_msg_lines.append(pre_release_hint) raise AnsibleError('\n'.join(error_msg_lines)) from dep_exc except CollectionDependencyInconsistentCandidate as dep_exc: + display.error( + f'Collection dependency inconsistent candidate: {dep_exc !s}', + ) parents = [ "%s.%s:%s" % (p.namespace, p.name, p.ver) for p in dep_exc.criterion.iter_parent()