Skip to content

feat(build): replace .flashignore with built-in ignore patterns#220

Open
deanq wants to merge 2 commits intomainfrom
deanq/ae-2256-no-more-flashignore
Open

feat(build): replace .flashignore with built-in ignore patterns#220
deanq wants to merge 2 commits intomainfrom
deanq/ae-2256-no-more-flashignore

Conversation

@deanq
Copy link
Member

@deanq deanq commented Feb 25, 2026

Summary

  • Replace .flashignore file loading with built-in ignore patterns in ignore.py covering tests, docs, build artifacts, IDE files, and virtual environments
  • Add deprecation warning for users who still have a .flashignore file, guiding them to migrate custom patterns to .gitignore
  • Remove .flashignore from skeleton template, documentation, and wheel validation script

Test plan

  • 20 new tests in tests/unit/cli/utils/test_ignore.py covering all built-in patterns, deprecation warning, edge cases
  • Existing scanner and skeleton tests updated (renamed test_module.py -> worker_module.py to avoid built-in test_*.py exclusion)
  • make quality-check passes (1222 tests, 73% coverage, clean lint)
  • Verify flash build excludes tests/docs without needing .flashignore
  • Verify deprecation warning appears when .flashignore exists in project

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request replaces the .flashignore file mechanism with built-in ignore patterns for Flash builds. The change simplifies project structure by eliminating the need for a separate Flash-specific ignore file, instead relying on a combination of .gitignore patterns and opinionated built-in exclusions.

Changes:

  • Replaced .flashignore file loading with built-in ignore patterns covering tests, docs, build artifacts, IDE files, and virtual environments
  • Added deprecation warning to guide users with existing .flashignore files to migrate custom patterns
  • Updated all tests, documentation, and scripts to remove references to .flashignore

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/runpod_flash/cli/utils/ignore.py Replaced .flashignore loading with built-in patterns and added deprecation warning
tests/unit/cli/utils/test_ignore.py Added 20 comprehensive tests for all built-in patterns and deprecation behavior
tests/unit/test_skeleton.py Removed .flashignore from skeleton creation tests
tests/unit/cli/commands/build_utils/test_scanner.py Renamed test_module.py to worker_module.py to avoid test_*.py exclusion
tests/integration/test_lb_remote_execution.py Renamed test_api.py to api_worker.py to avoid test_*.py exclusion
src/runpod_flash/cli/utils/skeleton_template/.flashignore Deleted template file
src/runpod_flash/cli/commands/build_utils/scanner.py Updated comment to remove .flashignore reference
scripts/validate-wheel.sh Removed .flashignore from wheel validation checks
TESTING.md Removed .flashignore reference from documentation
README.md Removed .flashignore from project structure and troubleshooting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 72 to 104
always_ignore = [
# Build artifacts and caches
".build/",
".flash/",
".runpod/",
".venv/",
"venv/",
"*.tar.gz",
".git/",
"__pycache__/",
"*.pyc",
"*.pyo",
"*.pyd",
"*.egg-info/",
"dist/",
"build/",
# Virtual environments
".venv/",
"venv/",
"env/",
# IDE
".vscode/",
".idea/",
# Environment files
".env",
".env.local",
# Tests (tracked by git, excluded from Flash builds)
"tests/",
"test_*.py",
"*_test.py",
# Documentation (tracked by git, excluded from Flash builds)
"docs/",
"*.md",
"!README.md",
]
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The built-in ignore patterns are missing .gitignore which was explicitly excluded in the old .flashignore file. Git configuration files like .gitignore should not be included in deployment builds as they serve no purpose in the deployed application. Add .gitignore to the always_ignore list to maintain parity with the previous behavior.

Copilot uses AI. Check for mistakes.
@deanq deanq force-pushed the deanq/ae-2256-no-more-flashignore branch from 852c22c to 0b4d410 Compare February 26, 2026 02:11
Built-in patterns in ignore.py now handle all default exclusions
(tests, docs, build artifacts, IDE files, venvs). Users with existing
.flashignore files get a deprecation warning guiding them to migrate
custom patterns to .gitignore.
@deanq deanq force-pushed the deanq/ae-2256-no-more-flashignore branch from e831dc6 to 5eb1f97 Compare February 27, 2026 07:04
@runpod-Henrik
Copy link

QA Report

Status: PASS
PR: #220 -- feat(build): replace .flashignore with built-in ignore patterns
Agent: flash-qa (PR mode)

Targeted Test Results

Area Tests Passed Failed Skipped
test_ignore.py (new) 20 20 0 0
test_scanner.py 42 42 0 0
test_skeleton.py 28 28 0 0
test_lb_remote_execution.py 10 10 0 0

Ignore Pattern Analysis

Built-in patterns cover:

  • Build artifacts: .build/, .flash/, .runpod/, *.tar.gz, .git/, pycache/, *.pyc, *.pyo, *.pyd, *.egg-info/, dist/, build/
  • Virtual environments: .venv/, venv/, env/
  • IDE: .vscode/, .idea/
  • Environment files: .env, .env.local
  • Tests: tests/, test_*.py, *_test.py
  • Documentation: docs/, *.md (with !README.md negation)

Comparison with old .flashignore template:
The new built-in patterns are a superset of the old .flashignore, with one intentional difference: .gitignore was previously excluded from builds but is no longer excluded. This is a minor improvement -- .gitignore is harmless in a deployed container and its exclusion was unnecessary.

Missing patterns (minor, not blocking):

  • No pattern for .env.* wildcard (only .env and .env.local are excluded; .env.dev, .env.staging etc. would be included). Users should add these to .gitignore if needed.
  • No pattern for *.log, *.tmp, or other common transient files (typically covered by .gitignore).
  • No conftest.py pattern (it lives in tests/ so already covered by tests/ exclusion, but a root-level conftest.py would be included).
  • No node_modules/ pattern (edge case if user has JS tooling).

These are non-blocking since users can add custom patterns to .gitignore.

Backward compatibility with existing .flashignore:

  • When a .flashignore file exists, load_ignore_patterns() logs a clear WARNING: ".flashignore is no longer supported; patterns are now built-in. Move any custom patterns to .gitignore and delete .flashignore."
  • The old .flashignore patterns are NOT loaded -- this is a breaking behavior change for users who had custom patterns in .flashignore. The warning message correctly instructs them to migrate to .gitignore.
  • The .flashignore template file is deleted from the skeleton, so flash init no longer creates it.

Full Suite Results

Parallel (-n 4, non-serial): 1270 passed, 2 failed, 2 warnings
Serial: 24 passed, 10 failed, 1 skipped

All 12 failures are pre-existing on main (confirmed by running same tests against main branch):

  • test_class_execution_integration.py (2): _constructor_args attribute error -- pre-existing
  • test_remote_concurrency.py (10): asyncio TypeError -- pre-existing

No regressions introduced by this PR.

PR Diff Analysis

Files changed (10):

  • src/runpod_flash/cli/utils/ignore.py -- Core change: replaces .flashignore loading with built-in patterns + deprecation warning
  • src/runpod_flash/cli/utils/skeleton_template/.flashignore -- Deleted
  • tests/unit/cli/utils/test_ignore.py -- New: 20 tests covering all built-in pattern categories
  • tests/unit/test_skeleton.py -- Updated: removed .flashignore assertions (4 locations)
  • tests/unit/cli/commands/build_utils/test_scanner.py -- Renamed test_module.py to worker_module.py in test fixtures (avoids test_*.py exclusion by new built-in patterns)
  • tests/integration/test_lb_remote_execution.py -- Renamed test_api.py to api_worker.py (same reason)
  • src/runpod_flash/cli/commands/build_utils/scanner.py -- Comment update only
  • scripts/validate-wheel.sh -- Removed .flashignore from required files
  • README.md, TESTING.md -- Documentation updates

Code quality: Clean, well-structured. The test renames from test_module.py to worker_module.py are a necessary consequence of the new test_*.py exclusion pattern and demonstrate the author correctly identified the impact.

No stale references: Searched entire codebase for "flashignore" -- only the deprecation warning code and its test remain. No references in pyproject.toml or other config files.

Recommendation

MERGE -- Clean removal of .flashignore with comprehensive built-in defaults, proper deprecation warning for existing users, thorough test coverage (20 new tests), and no regressions. The scanner test fixture renames show careful attention to the cascading effects of the new test_*.py exclusion pattern.


Generated by flash-qa agent

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.

3 participants