Skip to content

chore: ignore symlinks at the generated proto and node_modules paths - #8887

Merged
parshimers merged 1 commit into
apache:mainfrom
sshiv012:sshiv012/gitignore-symlink-paths
Oct 7, 2026
Merged

parshimers merged 1 commit into
apache:mainfrom
sshiv012:sshiv012/gitignore-symlink-paths

Conversation

@sshiv012

@sshiv012 sshiv012 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Two .gitignore patterns end in /, which only matches directories:

amber/src/main/python/proto/
**/node_modules/

A symlink at either path isn't ignored. This is easy to hit when you run tests in a second worktree and symlink the generated protos or node_modules from your main checkout instead of regenerating them. A git add -A then commits the symlink.

That happened to me in #8769: the symlink got committed, and CI's bin/python-proto-gen.sh failed with mkdir: cannot create directory '.../amber/src/main/python/proto': File exists, so every job stopped before running tests.

This drops the trailing slash on both lines, so files, symlinks and directories at those paths are all ignored.

Any related issues, documentation, discussions?

Found while working on #8769.

How was this PR tested?

In a scratch repo with a symlink at amber/src/main/python/proto and at agent-service/node_modules:

  • old patterns: both symlinks show up in git status as untracked
  • new patterns: both are ignored

Real directories at those paths are still ignored, since a pattern without a trailing slash matches directories too.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

The patterns ended in '/', which only matches directories. A symlink
at amber/src/main/python/proto or node_modules (handy when sharing
generated code or dependencies across worktrees) was not ignored, so
it could be committed by accident. Drop the trailing slash so files,
symlinks and directories at those paths are all ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Ma77Ball
    You can notify them by mentioning @Ma77Ball in a comment.

@sshiv012

sshiv012 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/request-review @parshimers

@github-actions
github-actions Bot requested a review from parshimers October 7, 2026 00:57
@parshimers
parshimers added this pull request to the merge queue Oct 7, 2026
Merged via the queue into apache:main with commit 4c982a7 Oct 7, 2026
25 checks passed
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.

2 participants