Skip to content

fix(repo): remove tracked binaries and logs and guard against re-adding - #224

Merged
Senthil455 merged 2 commits into
mainfrom
fix/issue-167-windows-binaries
Sep 20, 2026
Merged

Senthil455 merged 2 commits into
mainfrom
fix/issue-167-windows-binaries

Conversation

@DivyashreeR008

Copy link
Copy Markdown
Collaborator

Fixes #167

Problem:
Build artifacts and local logs were committed even though .gitignore already has rules for them. The five tracked files are services/attendance-service/attendance-service.exe (23 MB), services/notification-go-service/notification.exe (9.7 MB), frontend/stdout.log, frontend/stderr.log and frontend/tsconfig.tsbuildinfo. They were added before the ignore rules, so gitignore does not apply to tracked files. The binaries are Windows PE files that are useless on ubuntu-latest and in Docker images, they bloat the pack to ~20 MB and every clone pays for it, and the logs can carry local paths.

Fix:

  • Ran git rm --cached on the five files so they are removed from the index but stay ignored locally. Verified with git ls-files | grep -E ".exe$|.log$|tsbuildinfo" which now returns nothing.
  • Added a root .dockerignore that ignores *.exe, *.log, *.tsbuildinfo and other build artifacts so they never enter an image layer when the build context is the repo root.
  • Created services/lms-service/.dockerignore and updated the existing service .dockerignore files (attendance, notification, api-gateway, auth, analytics, ats, employee-python, leave) to also ignore those patterns for builds where the context is the service directory.
  • Added a guard-against-binaries job to ci.yml that fails if any tracked file matches *.exe, *.log or tsbuildinfo or if any file over 1 MB is present. This catches a future accidental add. Also noted that history can be cleaned with git filter-repo/BFG if size matters and that any sensitive data in the old logs should be rotated.

Verification:

  • git ls-files | grep -E ".exe$|.log$|tsbuildinfo" now returns nothing.
  • python -c "import yaml; yaml.safe_load(open('docker-compose.yml'))" still passes.
  • The new guard job passes on this branch and would fail if one of those files were re-added.

Fixes #167

DivyashreeR008 and others added 2 commits September 20, 2026 16:35
…ng (issue #167)

Build artifacts and local logs were committed even though .gitignore already ignores them. Files like services/attendance-service/attendance-service.exe (23 MB), services/notification-go-service/notification.exe, frontend/stdout.log, frontend/stderr.log and frontend/tsconfig.tsbuildinfo were tracked, bloating the repo and leaking local paths. The binaries are Windows PE files that are useless in CI and Docker.

Fixed by running git rm --cached on the five tracked files so they are no longer in the index but remain ignored locally. Added a root .dockerignore and updated the existing service .dockerignore files to ensure *.exe, *.log and *.tsbuildinfo never enter image layers. Added a guard-against-binaries job to ci.yml that fails if any tracked file matches *.exe, *.log or tsbuildinfo or if any file over 1 MB is present, so a future accidental add is caught.

Verified with git ls-files | grep -E '\.exe$|\.log$|tsbuildinfo' now returns nothing and python -m yaml safe_load on docker-compose.yml still passes. The repo size will shrink after history is cleaned with filter-repo/BFG if needed.

Fixes #167

Co-authored-by: Senthil455 <senthilrajasen637@gmail.com>
@Senthil455
Senthil455 merged commit d0edc71 into main Sep 20, 2026
14 of 28 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.

Windows binaries and local log files are committed to the repo

2 participants