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

cmd_runner module utils: fix bug when argument spec has implicit type #6968

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Jul 17, 2023

SUMMARY

When a parameter in argument_spec has no type, meaning it is implicitly a str, CmdRunner would fail trying to find the type key in that dictionary.

ISSUE TYPE
  • Bugfix Pull Request
  • Test Pull Request
COMPONENT NAME

plugins/module_utils/cmd_runner.py

@ansibullbot ansibullbot added bug This issue/PR relates to a bug integration tests/integration module_utils module_utils plugins plugin (any type) tests tests labels Jul 17, 2023
@felixfontein felixfontein merged commit f6714ed into ansible-collections:main Jul 19, 2023
@patchback
Copy link

patchback bot commented Jul 19, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/f6714edabb4b26bf1955c6e7e2a3500fc4caaa3c/pr-6968

Backported as #6977

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@russoz thanks for fixing this!

patchback bot pushed a commit that referenced this pull request Jul 19, 2023
…#6968)

* cmd_runner module utils: fix bug when argument spec has implicit type

* add changelog frag

(cherry picked from commit f6714ed)
@patchback
Copy link

patchback bot commented Jul 19, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/f6714edabb4b26bf1955c6e7e2a3500fc4caaa3c/pr-6968

Backported as #6978

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 19, 2023
…#6968)

* cmd_runner module utils: fix bug when argument spec has implicit type

* add changelog frag

(cherry picked from commit f6714ed)
@russoz russoz deleted the cmdrunner-default-arg-type branch July 19, 2023 22:35
felixfontein pushed a commit that referenced this pull request Jul 20, 2023
…ug when argument spec has implicit type (#6977)

cmd_runner module utils: fix bug when argument spec has implicit type (#6968)

* cmd_runner module utils: fix bug when argument spec has implicit type

* add changelog frag

(cherry picked from commit f6714ed)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
felixfontein pushed a commit that referenced this pull request Jul 20, 2023
…ug when argument spec has implicit type (#6978)

cmd_runner module utils: fix bug when argument spec has implicit type (#6968)

* cmd_runner module utils: fix bug when argument spec has implicit type

* add changelog frag

(cherry picked from commit f6714ed)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
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 integration tests/integration module_utils module_utils plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants