Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide better error from ansible-galaxy when role version is in conflict #52853

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
6 participants
@sudhirmohanraj
Copy link

sudhirmohanraj commented Feb 22, 2019

SUMMARY

Added the version name to the log generated. Fixed #52111

ISSUE TYPE
  • Bugfix Pull Request fixes #52111
COMPONENT NAME

ansible/cli

ADDITIONAL INFORMATION

Added the version name to the log.

sudhirmohanraj added some commits Feb 22, 2019

@sudhirmohanraj

This comment has been minimized.

Copy link
Author

sudhirmohanraj commented Feb 22, 2019

@vmindru can you review the fix.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 22, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/cli/galaxy.py:436:99: bad-whitespace No space allowed before comma                 display.warning("- %s and %s version was NOT installed successfully." % (role.name , role.version))                                                                                                    ^

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/cli/galaxy.py:436:99: E203 whitespace before ','

click here for bot help

@mattclay

This comment has been minimized.

Copy link
Member

mattclay commented Feb 22, 2019

The reported sanity test failures are valid. The integration test failures are unrelated to the changes.

@vmindru

This comment has been minimized.

Copy link
Contributor

vmindru commented Feb 25, 2019

I am not sure this will help anyhow, simply printing the TAG version I have in the config is not much different than the current behavior. I would expect rather an explicit Failure cause e.g. error that the tag is missing remotely.

@samdoran samdoran changed the title Fixes #52111 Fix cryptic ansible-galaxy error when role tag is missing Feb 26, 2019

@bcoca bcoca changed the title Fix cryptic ansible-galaxy error when role tag is missing provide better error from ansible-galaxy when role version is in conflict Feb 26, 2019

@samdoran samdoran removed the needs_triage label Feb 26, 2019

@@ -391,7 +391,7 @@ def execute_install(self):
try:
installed = role.install()
except AnsibleError as e:
display.warning(u"- %s was NOT installed successfully: %s " % (role.name, to_text(e)))
display.warning(u"- %s and %s version was NOT installed successfully: %s " % (role.name, role.version, to_text(e)))

This comment has been minimized.

@bcoca

bcoca Feb 26, 2019

Member

remove 'and' and 'version' as the name + version should be good enough to identify and the 'and' is confusion as it seems you installed (or failed to ) 2 things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.