community.general icon indicating copy to clipboard operation
community.general copied to clipboard

pkgng: fix error-handling when upgrading all

Open russoz opened this issue 3 years ago • 3 comments

SUMMARY

The return code of the command was being ignored when upgrading all packages.

Fixes #5363

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

pkgng

russoz avatar Oct 15 '22 05:10 russoz

cc @JoergFiedler @MacLemon @bcoca @dch @jasperla @mekanix @opoplawski @overhacked @tuxillo click here for bot help

ansibullbot avatar Oct 15 '22 05:10 ansibullbot

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

github-actions[bot] avatar Oct 15 '22 05:10 github-actions[bot]

@felixfontein still trying to make it work, I tried testing on a FreeBSD vm locally but I am screwing something up, so I will have to rely on the CI for every single test run

russoz avatar Oct 15 '22 07:10 russoz

hey @russoz ! I'm the original bug reporter, thank you so much for making a PR against my report!

I just now saw your comment here above that you had trouble testing and had to rely on the CI so I wanted to help test. I took the diff of your patch and applied it to my local copy of the pkgng.py module and ran it against my original server.

My test is kind of run "in a vacuum" because I certainly don't know the details and context of the implementation, but at least I can confirm that your changeset does fix the issue in my original report! ✅ -vvv output now correctly shows that the task reports red/failed with an Insufficient Privileges message in the msg, stderr, and stderr_lines output portions. Cheers! ✌️

cssismypassion avatar Oct 17 '22 00:10 cssismypassion

I continued to try and run the tests inside a VM, but I am having some "funny" situations where vagrant/virtualbox half of the time do not mount the current directory on the vm. I have not figured out what is going on.

russoz avatar Oct 17 '22 00:10 russoz

Anyway, glad to hear that your test has worked. As a matter of fact, I added a test case to ensure that ;)

russoz avatar Oct 17 '22 00:10 russoz

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/baa8bd52ab7fd08b3b0b05880a43d8b45e6c7dc6/pr-5369

Backported as https://github.com/ansible-collections/community.general/pull/5410

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

patchback[bot] avatar Oct 23 '22 09:10 patchback[bot]

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/baa8bd52ab7fd08b3b0b05880a43d8b45e6c7dc6/pr-5369

Backported as https://github.com/ansible-collections/community.general/pull/5411

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

patchback[bot] avatar Oct 23 '22 09:10 patchback[bot]

@russoz thanks for testing this! @alexanderdegre thanks for testing this!

felixfontein avatar Oct 23 '22 09:10 felixfontein