Skip to content

🐛Fix: prevent cmd/console source directory from being ignored by .giti… - #1011

Merged
clubanderson merged 1 commit into
kubestellar:mainfrom
shivansh-source:gitignore-problem
Feb 16, 2026
Merged

clubanderson merged 1 commit into
kubestellar:mainfrom
shivansh-source:gitignore-problem

Conversation

@shivansh-source

Copy link
Copy Markdown
Contributor

Summary

This PR updates .gitignore patterns that were unintentionally ignoring source directories in the repository, specifically the cmd/console Go application.

The previous rule:

console

matches any file or directory named console anywhere in the repository, which caused Git to ignore the following source path locally:

cmd/console/

As a result, contributors cloning the repository could not see cmd/console/main.go in their working tree even though it exists in the repository and is visible on GitHub.


Problem

Because .gitignore patterns are recursive by default, the rule console ignored:

  • cmd/console/
  • any future directories named console

This led to:

  • Missing source files after cloning
  • Confusing onboarding experience for new contributors
  • IDEs (e.g., VS Code) hiding valid project files

Changes

  • Replace broad ignore rules with root-scoped patterns:

    console        →   /console
    console-server →   /console-server
    

    This ensures only root-level build binaries are ignored.

  • Add common Go build/test artifacts:

    *.out
    *.test
    coverage.out
    
  • Make bin/ ignore safer by limiting it to generated binaries.


Why this change

The repository contains Go applications located under:

cmd/console/
cmd/kc-agent/

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 .gitignore with common Go project conventions
✅ No runtime or CI behavior changes


Testing

  • Fresh clone verified to include cmd/console/main.go
  • git check-ignore confirms source directories are no longer ignored
  • Build artifacts remain ignored as intended

Notes

This is a non-functional change affecting only repository hygiene and developer experience.
fixes #1010

Copilot AI review requested due to automatic review settings February 14, 2026 11:05
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Feb 14, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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 clubanderson for approval. For more information see the 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@github-actions

Copy link
Copy Markdown
Contributor

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 git commit -s to certify the Developer Certificate of Origin

✅ PR Title - Must start with an emoji: ✨ (feature), 🐛 (bug fix), 📖 (docs), 🌱 (infra/tests), ⚠️ (breaking change)

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!

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 14, 2026
@netlify

netlify Bot commented Feb 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit 01e4fa0
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6990570f72f90e00083ca442

@clubanderson clubanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 clubanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@kubestellar-prow kubestellar-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 6acafcb4ab464c5092209991285c19c23bae580c

@clubanderson
clubanderson merged commit f05b4fa into kubestellar:main Feb 16, 2026
20 of 26 checks passed
@shivansh-source
shivansh-source deleted the gitignore-problem branch February 16, 2026 05:54
clubanderson pushed a commit that referenced this pull request Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: .gitignore rule console hides Go source directory cmd/console

3 participants