-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[master] Convert stdin string to bytes regardless of stdin_raw_newlines #66830
[master] Convert stdin string to bytes regardless of stdin_raw_newlines #66830
Conversation
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
Maybe the fix is also interesting for the 3006 LTS version? |
@niklasr22 Fixing this on 3006.x branch will get a quicker release than master, also wondering if current test coverage is enough for this change, or does a new test need to be added to cover the code change. |
@dmurphy18 I opened another PR (#66840) using the 3006.x branch. I also extended an existing test of cmdmod, maybe not the perfect coverage, but better than nothing I guess. |
This will get merged forward from 3006.x into master. See #66840 |
What does this PR do?
What issues does this PR fix or reference?
Fixes issue #62501
Previous Behavior
The following error was thrown when running cmd.run with a str passed via stdin and stdin_raw_newlines=True
Passed invalid arguments to cmd.run: memoryview: a bytes-like object is required, not 'str'
New Behavior
String also gets converted to bytes when stdin_raw_newlines=True, so no error is thrown
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices, including the
PR Guidelines.
See GitHub's page on GPG signing for more information about signing commits with GPG.