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

use salt.cmd.run_stdout #57558

Closed
wants to merge 2 commits into from
Closed

use salt.cmd.run_stdout #57558

wants to merge 2 commits into from

Conversation

bochi
Copy link
Contributor

@bochi bochi commented Jun 5, 2020

usually, one does not want the stderr here because it may result in non-parsable yaml

What does this PR do?

It uses cmd.run_stdout to surpress messages on stderr

What issues does this PR fix or reference?

Fixes:
As an example, when using the foreman salt plugin, foreman-node (which is used as command to get the ENC data for a minion) may display error messages or even only warnings for rubygems on stderr, which results in broken yaml and makes salt fail.

I strongly believe stderr is never required here, any command acting as ENC command should output relevant data on stdout.

Previous Behavior

YAML Data failed to parse when there are any warnings

New Behavior

YAML Data parses fine even with warnings

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@bochi bochi requested a review from a team as a code owner June 5, 2020 06:59
@ghost ghost requested review from waynew and removed request for a team June 5, 2020 06:59
Copy link
Contributor

@waynew waynew left a comment

Choose a reason for hiding this comment

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

Hey @bochi I definitely agree that we don't want to be parsing other pieces of data here.

I do think that we should probably dump the stderr to log.debug maybe.

We also need a changelog entry and some tests to cover this. If you need help writing tests I run a Test Clinic on Twitch Tuesday & Thursday and I'd be happy to help out here. For the changelog entry - https://docs.saltstack.com/en/master/topics/development/changelog.html describes how to add that.

You can also get me in #salt on freenode, as well as the community Slack. Let me know if you have any questions!

@dwoz dwoz added the Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases label Jun 16, 2020
@dwoz
Copy link
Contributor

dwoz commented Dec 10, 2023

Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle.

@dwoz dwoz closed this Dec 10, 2023
@dwoz dwoz added help-wanted Community help is needed to resolve this Abandoned labels Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned has-failing-test help-wanted Community help is needed to resolve this Needs-Testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants