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

fix modules' output by using publish_cmd #3655

Merged
merged 5 commits into from
Nov 1, 2021
Merged

fix modules' output by using publish_cmd #3655

merged 5 commits into from
Nov 1, 2021

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Oct 31, 2021

SUMMARY

These three modules have the same mechanics: they run a "state gathering" function before and after executing the actual command. Because we lacked the publish_cmd option in MH.run_command(), the output value cmd_args would always contain the arguments of the after-state-gathering call. Instead, what made sense was to show the command actually executed.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/modules/packaging/language/ansible_galaxy_install.py
plugins/modules/packaging/language/pipx.py
plugins/modules/packaging/os/snap_alias.py

@ansibullbot ansibullbot added bug This issue/PR relates to a bug language module module os packaging plugins plugin (any type) labels Oct 31, 2021
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we cannot backport this since this feature of MH was only added for 4.0.0.

changelogs/fragments/3655-use-publish_cmd.yaml Outdated Show resolved Hide resolved
changelogs/fragments/3655-use-publish_cmd.yaml Outdated Show resolved Hide resolved
changelogs/fragments/3655-use-publish_cmd.yaml Outdated Show resolved Hide resolved
@russoz
Copy link
Collaborator Author

russoz commented Nov 1, 2021

I guess we cannot backport this since this feature of MH was only added for 4.0.0.

Yup,, that occurred to me after sending the PR. The impact is small enough for me to care not. So, if you agree with me, then just hit it. Otherwise we need to discuss options.

@russoz
Copy link
Collaborator Author

russoz commented Nov 1, 2021

I could change it to a minor_change as well

@felixfontein felixfontein merged commit 9eb638f into ansible-collections:main Nov 1, 2021
@felixfontein
Copy link
Collaborator

@russoz no, the current form is fine I think :) Just wanted to point it out so we don't accidentally try to backport it later ;)

@felixfontein
Copy link
Collaborator

@russoz thanks for this improvement!

@russoz russoz deleted the use-publish-cmd branch November 1, 2021 19:11
JonEllis pushed a commit to JonEllis/community.general that referenced this pull request Nov 16, 2021
* fix modules' output by using publish_cmd

* added changelog frag

* Update changelogs/fragments/3655-use-publish_cmd.yaml

Co-authored-by: Felix Fontein <[email protected]>

* Update changelogs/fragments/3655-use-publish_cmd.yaml

Co-authored-by: Felix Fontein <[email protected]>

* Update changelogs/fragments/3655-use-publish_cmd.yaml

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
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 language module module os packaging plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants