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

[PR #4422/e7ffa76d backport][stable-4] Bug fix: Warns user if incorrect SDK version is installed #4450

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Apr 5, 2022

This is a backport of PR #4422 as merged into main (e7ffa76).

SUMMARY

This raises an error if the wrong python-dsv-sdk version is installed. This lookup plugin currently only supports v0.0.1 of the SDK. This is a temporary fix until full support with the latest SDK version can be developed.

(Re-submitted with clean git history)

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

dsv lookup plugin

ADDITIONAL INFORMATION

Before the fix, the error presented to the user:

Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'community.general.dsv'. Error was a <class 'TypeError'>, original message: __init__() got an unexpected keyword argument 'tenant'"}

After:

Error was a <class 'ansible.errors.AnsibleError'>, original message: python-dsv-sdk==0.0.1 must be installed to use this plugin"}

* Add error handling to check correct SDK version installed

* Fix CI errors

* Added changelog fragment

* Changed exeption type

* Update changelogs fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e7ffa76)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug lookup lookup plugin new_contributor Help guide this first time contributor plugins plugin (any type) labels Apr 5, 2022
@felixfontein felixfontein merged commit cef6b81 into stable-4 Apr 5, 2022
@felixfontein felixfontein deleted the patchback/backports/stable-4/e7ffa76db6dd3e27a9891c06c0356a9899856548/pr-4422 branch April 5, 2022 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug lookup lookup plugin new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants