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 bug with truncating newline #950

Merged
merged 1 commit into from Feb 1, 2022

Conversation

AlanCoding
Copy link
Member

This was followup promised in #943

Remaining concern

Of course I love .rstrip for the simplicity of it, but there may be a case where this method receives multiple empty lines, and it is expected to keep them. Like, it gets foo\n\n\n, and it is expected to write foo\n\n. This whole thing is frustrating and confusing. This scenario is probably unlikely to happen because verbose events only write 1 line at a time anyway. There might still be a case I'm missing that's important, and in that case, this could be adjusted so that only 1 trailing newline is removed from stdout_chunk, instead of all newline characters. I expect that would be less performant, so if this satisfies the current needs I'd keep it.

@AlanCoding AlanCoding requested a review from a team as a code owner January 5, 2022 14:39
Copy link
Contributor

@Shrews Shrews left a comment

Choose a reason for hiding this comment

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

Approved. Probably should be backported, too.

@Shrews Shrews added the gate label Jan 27, 2022
Copy link
Contributor

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

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

LGTM!

@Shrews
Copy link
Contributor

Shrews commented Jan 27, 2022

recheck

@Shrews Shrews closed this Feb 1, 2022
@Shrews Shrews reopened this Feb 1, 2022
@Shrews Shrews added gate and removed gate labels Feb 1, 2022
@ansible-zuul ansible-zuul bot merged commit 7e60c1f into ansible:devel Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants