chore : Enforcing LF line endings#12765
Conversation
|
🎉 Welcome to the Kubeflow Pipelines repo! 🎉 Thanks for opening your first PR! We're excited to have you onboard 🚀 Next steps:
Feel free to ask questions in the comments. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @sameerdattav. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
5f1903b to
eddaaaf
Compare
There was a problem hiding this comment.
Pull request overview
This PR enforces LF line endings across the repository by adding a .gitattributes configuration rule. This change aims to prevent CRLF-related diffs on Windows where small logical changes can appear as full-file rewrites, improving the cross-platform contributor experience.
Changes:
- Added
* text=auto eol=lfrule to.gitattributesto normalize line endings to LF across all platforms
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Ignore generated TS client library | ||
| frontend/src/apis/* linguist-generated | ||
|
|
There was a problem hiding this comment.
The blanket rule * text=auto eol=lf should be supplemented with explicit declarations for binary file types to prevent any potential issues with binary file corruption. The repository contains binary files (PNG images, GZ archives, ZIP files, TAR.GZ files) that should be explicitly marked as binary.
Consider adding explicit binary file patterns before the blanket text rule, for example:
*.png binary*.jpg binary*.jpeg binary*.gif binary*.gz binary*.zip binary*.tar.gz binary
This is a defensive practice recommended by Git documentation to ensure binary files are never treated as text, even if the auto-detection fails in edge cases.
| # Explicitly mark common binary file types | |
| *.png binary | |
| *.jpg binary | |
| *.jpeg binary | |
| *.gif binary | |
| *.gz binary | |
| *.zip binary | |
| *.tar.gz binary |
| frontend/src/apis/* linguist-generated | ||
|
|
||
| # Normalize line endings across platforms | ||
| * text=auto eol=lf |
There was a problem hiding this comment.
The blanket * text=auto eol=lf rule will affect the VERSION file, which according to RELEASE.md line 363 "MUST NOT" have a line ending. The release process uses echo -n $VERSION > VERSION to create a file without a trailing newline, but the .gitattributes rule will normalize this file to have an LF ending.
Consider either:
- Excluding the VERSION file from line ending normalization by adding
VERSION -textbefore the blanket rule, or - Updating the release documentation and process to accept that VERSION will have an LF line ending
This needs clarification on whether the "no line ending" requirement is still valid with this change.
Signed-off-by: Surya Sameer Datta Vaddadi <f20220373@goa.bits-pilani.ac.in>
eddaaaf to
d249ec2
Compare
CRLF TO LF
This PR adds repo-level LF line-ending normalization via .gitattributes to avoid CRLF-related diffs on Windows, where small logical changes can appear as full-file rewrites.
This mirrors the approach already used in kubeflow/manifests and improves cross-platform contributor experience without affecting generated files or runtime behavior, as discussed in this thread :
https://cloud-native.slack.com/archives/C0742LBR5BM/p1770067104325089