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

Quadlet - fix trailing whitespaces handling #21112

Conversation

ygalblum
Copy link
Contributor

@ygalblum ygalblum commented Dec 31, 2023

Remove all trailing white spaces from all lines before the line by line processing
Add test

Does this PR introduce a user-facing change?

No

None

Resolves: #21109

@openshift-ci openshift-ci bot added release-note-none approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 31, 2023
@ygalblum ygalblum force-pushed the quadlet-multiline-trailing-whitespaces branch from d00660a to add2887 Compare December 31, 2023 09:56
@ygalblum
Copy link
Contributor Author

@edsantiago I need your help here. The issue that triggered this PR is a case of a trailing space. As part of the fix, I wrote a test unit file that includes a trailing white space. But, the basic tests are failing because of the trailing space. What should I do?

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

openshift-ci bot commented Jan 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg, ygalblum

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ygalblum ygalblum force-pushed the quadlet-multiline-trailing-whitespaces branch from add2887 to cc223b9 Compare January 2, 2024 08:24
@ygalblum
Copy link
Contributor Author

ygalblum commented Jan 2, 2024

@edsantiago I need your help here. The issue that triggered this PR is a case of a trailing space. As part of the fix, I wrote a test unit file that includes a trailing white space. But, the basic tests are failing because of the trailing space. What should I do?

Never mind, I've found the solution

Remove all trailing white spaces from all lines before the line by line
processing
Add test
Exclude the unit file used for the test from whitespace check

Signed-off-by: Ygal Blum <[email protected]>
@ygalblum ygalblum force-pushed the quadlet-multiline-trailing-whitespaces branch from cc223b9 to 70a53cb Compare January 2, 2024 10:26
@ygalblum
Copy link
Contributor Author

ygalblum commented Jan 2, 2024

@vrothberg I change the implementation of the method that clears trims the lines (both because it made the unit test fail and because now it's simpler and cannot return an error)

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Nice, LGTM+

@rhatdan
Copy link
Member

rhatdan commented Jan 2, 2024

I was working on a different patch to throw an error in this situation. But this looks fine.
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 2, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit a8c8704 into containers:main Jan 2, 2024
91 of 92 checks passed
@edsantiago
Copy link
Member

Belated LGTM2

@ygalblum ygalblum deleted the quadlet-multiline-trailing-whitespaces branch January 2, 2024 13:28
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Apr 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Space after multi-line backslash in Quadlet causes infinite loop in generator
4 participants