acoustic-carpenter-78188
02/12/2026, 11:22 PM.flyteignore file that works alongside .gitignore to exclude files from Flyte code bundles
• Modified GitIgnore class to explicitly read patterns from both .gitignore and .flyteignore files using --exclude-from flags
• Removed reliance on --exclude-standard flag for more explicit control over which ignore files are used
• Added file existence checks to gracefully handle cases where .gitignore or .flyteignore don't exist
## Changes
• `src/flyte/_code_bundle/_ignore.py`: Updated _git_wrapper, _list_ignored_files, and _list_ignored_dirs methods to check for file existence and use explicit exclude-from flags
• `.gitignore`: Added .flyteignore to the repository's gitignore
• `tests/flyte/code_bundle/test_ignore.py`: Added 3 comprehensive test cases covering:
• Combined usage of both .gitignore and .flyteignore
• Directory patterns in both files
• Overlapping patterns with negation rules
## Test plan
• All existing tests pass
• New unit tests added and passing:
• test_gitignore_with_flyteignore - Tests both files working together
• test_gitignore_flyteignore_directory_patterns - Tests directory patterns
• test_gitignore_flyteignore_overlapping_patterns - Tests pattern overlap and negation
• Backward compatibility verified - works correctly when .flyteignore doesn't exist
flyteorg/flyte-sdkacoustic-carpenter-78188
02/13/2026, 12:16 AM