Skip to content

chore : Enforcing LF line endings#12765

Open
sameerdattav wants to merge 1 commit intokubeflow:masterfrom
sameerdattav:crlf-to-lf
Open

chore : Enforcing LF line endings#12765
sameerdattav wants to merge 1 commit intokubeflow:masterfrom
sameerdattav:crlf-to-lf

Conversation

@sameerdattav
Copy link
Contributor

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

Copilot AI review requested due to automatic review settings February 3, 2026 21:48
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

🎉 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.

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zazulam for approval. For more information see the Kubernetes Code Review Process.

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

Details 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

@google-oss-prow
Copy link

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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=lf rule to .gitattributes to 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

Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
# Explicitly mark common binary file types
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.gz binary
*.zip binary
*.tar.gz binary

Copilot uses AI. Check for mistakes.
frontend/src/apis/* linguist-generated

# Normalize line endings across platforms
* text=auto eol=lf
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

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:

  1. Excluding the VERSION file from line ending normalization by adding VERSION -text before the blanket rule, or
  2. 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.

Copilot uses AI. Check for mistakes.
Signed-off-by: Surya Sameer Datta Vaddadi <f20220373@goa.bits-pilani.ac.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant