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

pkgng: Add stdout and stderr to response object #560

Merged

Conversation

dsg22
Copy link
Contributor

@dsg22 dsg22 commented Jun 22, 2020

To ease debugging if something goes wrong during pkg run.

SUMMARY

Expose the stdout and stderr of pkg through the result object of the pkgng module. Currently, if something goes wrong during the pkg run, the user has no way to see what happened, which makes recovering from that situation more difficult.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

pkgng

ADDITIONAL INFORMATION

To ease debugging if something goes wrong during pkg run.
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 community_review feature This issue/PR relates to a feature request module module needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_triage new_contributor Help guide this first time contributor os packaging plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI stale_ci CI is older than 7 days, rerun before merging labels Jun 22, 2020
Fix crash when run with "autoremove: yes" but no packages
need to be autoremoved.
@dsg22 dsg22 closed this Jun 23, 2020
@dsg22 dsg22 reopened this Jun 23, 2020
@felixfontein
Copy link
Collaborator

You need a changelog fragment.

@dsg22
Copy link
Contributor Author

dsg22 commented Jun 23, 2020

Thanks @felixfontein - added a changelog fragment.

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 assume you tested this?

changelogs/fragments/560-pkgng-add-stdout-and-stderr.yaml Outdated Show resolved Hide resolved
…stderr.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>
@dsg22
Copy link
Contributor Author

dsg22 commented Jun 23, 2020

I assume you tested this?

There aren't really any automated tests for this module at present. I manually tested package installs (state: present), upgrades (state: latest with an older package installed), uninstalls (state: absent) and autoremove. They all work as expected.

@felixfontein felixfontein merged commit 9142c75 into ansible-collections:master Jun 23, 2020
@felixfontein
Copy link
Collaborator

@dsg22 thanks for implementing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community_review feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor os packaging plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants