Skip to content

Conversation

@bryancall
Copy link
Contributor

@bryancall bryancall commented Jan 6, 2026

The script was using value[:-1] to strip the trailing newline, which incorrectly truncates the last character if the file doesn't end with a newline. Changed to value.rstrip('\n') which properly handles both cases.

Added test case for config files without trailing newlines.

@bryancall bryancall added this to the 10.2.0 milestone Jan 6, 2026
@bryancall bryancall self-assigned this Jan 6, 2026
The script was using value[:-1] to strip the trailing newline, which
incorrectly truncates the last character if the file doesn't end with
a newline. Changed to value.rstrip('\n') which properly handles both
cases.

Added test case for config files without trailing newlines.
@bryancall bryancall force-pushed the fix-convert2yaml-newline branch from 6d62fb1 to f7d63d9 Compare January 6, 2026 17:48
@bryancall bryancall requested review from bneradt and brbzull0 January 6, 2026 21:52
Copy link
Contributor

@masaori335 masaori335 left a comment

Choose a reason for hiding this comment

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

Looks good.

@bryancall bryancall merged commit dea3657 into apache:master Jan 7, 2026
15 checks passed
@github-project-automation github-project-automation bot moved this to For v10.1.1 in ATS v10.1.x Jan 7, 2026
@cmcfarlen cmcfarlen moved this from For v10.1.1 to Picked v10.1.1 in ATS v10.1.x Jan 12, 2026
@cmcfarlen cmcfarlen modified the milestones: 10.2.0, 10.1.1 Jan 12, 2026
@cmcfarlen
Copy link
Contributor

Cherry-picked to 10.1.x branch

cmcfarlen pushed a commit that referenced this pull request Jan 12, 2026
The script was using value[:-1] to strip the trailing newline, which
incorrectly truncates the last character if the file doesn't end with
a newline. Changed to value.rstrip('\n') which properly handles both
cases.

Added test case for config files without trailing newlines.

(cherry picked from commit dea3657)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Picked v10.1.1

Development

Successfully merging this pull request may close these issues.

3 participants