[BUG] pyflyte not respecting .gitignore in pyflyte init
Describe the bug
pyflyte init generates a new flyte project with a .gitignore. pyflyte respects .gitignores and .dockerignores, which by default contain venv and .venv, however it only respects the .gitignore if the cwd is a git project which by default it isn't.
Expected behavior
I would expect that if I use a venv to manage my local, non-git managed flyte project I'm not accidentally bundling my venv (which could be multiple GB in size) into my flyte tar.gz object.
Additional context to reproduce
pyflyte init foo cd foo python -m venv venv source venv/bin/activate pip install ..... pyflyte register workflows
Screenshots
No response
Are you sure this issue hasn't been raised already?
- [X] Yes
Have you read the Code of Conduct?
- [X] Yes
To decrease the chances of hitting this, what if we made the directory created by pyflyte init a git repo by default? Need to verify what happens if the user doesn't have git installed locally.
Not the first time we see users hitting this error: https://github.com/flyteorg/flyte/issues/3520
Hello 👋, this issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will engage on it to decide if it is still applicable. Thank you for your contribution and understanding! 🙏