Repository navigation
🐛Fix: prevent cmd/console source directory from being ignored by .giti… - #1011
Conversation
…gnore Signed-off-by: shivansh-source <[email protected]>
|
[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 |
|
Welcome to KubeStellar! 🚀 Thank you for submitting this Pull Request. Before your PR can be merged, please ensure: ✅ DCO Sign-off - All commits must be signed off with ✅ PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), Getting Started with KubeStellar: Contributor Resources:
🌟 Help KubeStellar Grow - We Need Adopters! Our roadmap is driven entirely by adopter feedback. Whether you're using KubeStellar yourself or know someone who could benefit from multi-cluster Kubernetes: 📋 Take our Multi-Cluster Survey - Share your use cases and help shape our direction! A maintainer will review your PR soon. Feel free to ask questions in the comments or on Slack! |
✅ Deploy Preview for kubestellarconsole canceled.
|
clubanderson
left a comment
There was a problem hiding this comment.
Code Review
The core fix is correct and valuable — anchoring console → /console solves issue #1010. However, there are a few items to address:
Issues
1. /bin/* should be /bin/ (confidence: 87)
The original bin/ ignores the entire directory. Changing to /bin/* subtly changes semantics — it won't ignore subdirectories within /bin/. Since there's no cmd/bin/ conflict (unlike cmd/console/), just use /bin/ to anchor it while preserving the original behavior.
2. *.out, *.test, coverage.out are out of scope (confidence: 82)
These additions are unrelated to the bug fix. *.out is overbroad — it catches any .out file, and makes coverage.out redundant. Recommend removing these and submitting as a separate PR if desired. If you want to keep coverage.out, add just that specific file.
3. Double blank line (minor)
There are two consecutive blank lines after the new entries. The rest of the file uses single blank lines between sections.
Summary
The /console and /console-server anchoring is the right fix. Just clean up the /bin/* → /bin/ semantics and remove the out-of-scope *.out/*.test additions to keep this PR focused.
clubanderson
left a comment
There was a problem hiding this comment.
LGTM — anchoring the gitignore patterns to root prevents them from matching source directories like cmd/console/. The additional Go build artifact patterns (*.out, *.test, coverage.out) are appropriate.
|
LGTM label has been added. DetailsGit tree hash: 6acafcb4ab464c5092209991285c19c23bae580c |
…gnore (#1011) Signed-off-by: shivansh-source <[email protected]>
Summary
This PR updates
.gitignorepatterns that were unintentionally ignoring source directories in the repository, specifically thecmd/consoleGo application.The previous rule:
matches any file or directory named
consoleanywhere in the repository, which caused Git to ignore the following source path locally:As a result, contributors cloning the repository could not see
cmd/console/main.goin their working tree even though it exists in the repository and is visible on GitHub.Problem
Because
.gitignorepatterns are recursive by default, the ruleconsoleignored:cmd/console/consoleThis led to:
Changes
Replace broad ignore rules with root-scoped patterns:
This ensures only root-level build binaries are ignored.
Add common Go build/test artifacts:
Make
bin/ignore safer by limiting it to generated binaries.Why this change
The repository contains Go applications located under:
These directories should always remain visible and tracked.
The updated patterns preserve the intended behavior (ignoring build outputs) without affecting source code.
Impact
✅ Prevents accidental hiding of source directories
✅ Improves contributor onboarding experience
✅ Aligns
.gitignorewith common Go project conventions✅ No runtime or CI behavior changes
Testing
cmd/console/main.gogit check-ignoreconfirms source directories are no longer ignoredNotes
This is a non-functional change affecting only repository hygiene and developer experience.
fixes #1010