fix(repo): remove tracked binaries and logs and guard against re-adding - #224
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Verification:
Fixes #167