From 18a96f9983889d5840130b391a008c0ec6643c04 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 21:39:11 +0000 Subject: [PATCH] Update Flash docs for .flashignore deprecation and built-in ignore patterns --- flash/apps/build-app.mdx | 1 - flash/apps/deploy-apps.mdx | 2 +- flash/apps/initialize-project.mdx | 3 --- flash/cli/build.mdx | 15 +++++++++++++++ flash/cli/init.mdx | 1 - flash/troubleshooting.mdx | 31 +------------------------------ 6 files changed, 17 insertions(+), 36 deletions(-) diff --git a/flash/apps/build-app.mdx b/flash/apps/build-app.mdx index af8368d9..41f3564c 100644 --- a/flash/apps/build-app.mdx +++ b/flash/apps/build-app.mdx @@ -59,7 +59,6 @@ This is the structure of the project template created by `flash init`: - diff --git a/flash/apps/deploy-apps.mdx b/flash/apps/deploy-apps.mdx index 38e9630b..4c39696f 100644 --- a/flash/apps/deploy-apps.mdx +++ b/flash/apps/deploy-apps.mdx @@ -323,7 +323,7 @@ Each endpoint maintains its own connection to the state manager, querying for pe If the build process can't find your endpoint functions: - Ensure functions are decorated with `@Endpoint(...)`. -- Check that Python files aren't excluded by `.gitignore` or `.flashignore`. +- Check that Python files aren't excluded by `.gitignore` or Flash's [built-in ignore patterns](/flash/cli/build#built-in-ignore-patterns). - Verify decorator syntax is correct. ### Deployment size limit exceeded diff --git a/flash/apps/initialize-project.mdx b/flash/apps/initialize-project.mdx index aecc7b91..06e0e2c2 100644 --- a/flash/apps/initialize-project.mdx +++ b/flash/apps/initialize-project.mdx @@ -35,7 +35,6 @@ flash init . - @@ -51,8 +50,6 @@ flash init . **cpu_worker.py**: An example CPU queue-based worker. Contains `@Endpoint` functions that run on CPU-only instances. Provides `/runsync` route for job submission. Creates one endpoint when deployed. -**.flashignore**: Lists files and directories to exclude from the deployment artifact (similar to `.gitignore`). - Each worker file defines a resource configuration and its associated functions. When you deploy, Flash creates one Serverless endpoint per unique resource configuration. ## Set up the project diff --git a/flash/cli/build.mdx b/flash/cli/build.mdx index eb8abdbc..243988f9 100644 --- a/flash/cli/build.mdx +++ b/flash/cli/build.mdx @@ -52,6 +52,21 @@ Comma-separated list of packages to exclude from the build (e.g., `torch,torchvi 5. **Dependency installation**: Installs Python packages for Linux x86_64. 6. **Packaging**: Bundles everything into `.flash/artifact.tar.gz`. +## Built-in ignore patterns + +Flash automatically excludes certain files and directories from deployment artifacts. These patterns cover common development files that shouldn't be deployed to production. + +| Category | Patterns | +|----------|----------| +| Build artifacts | `.build/`, `.flash/`, `.runpod/`, `*.tar.gz`, `.git/`, `__pycache__/`, `*.pyc`, `*.pyo`, `*.pyd`, `*.egg-info/`, `dist/`, `build/` | +| Virtual environments | `.venv/`, `venv/`, `env/` | +| IDE files | `.vscode/`, `.idea/` | +| Environment files | `.env`, `.env.*` | +| Tests | `tests/`, `test_*.py`, `*_test.py` | +| Documentation | `docs/`, `*.md` (except `README.md`) | + +Flash also respects your `.gitignore` file and excludes any files matching those patterns. + ## Build artifacts After running `flash build`: diff --git a/flash/cli/init.mdx b/flash/cli/init.mdx index 91d17820..edba5dcf 100644 --- a/flash/cli/init.mdx +++ b/flash/cli/init.mdx @@ -48,7 +48,6 @@ The command creates the following project structure: - diff --git a/flash/troubleshooting.mdx b/flash/troubleshooting.mdx index ea3bac4f..79c58a02 100644 --- a/flash/troubleshooting.mdx +++ b/flash/troubleshooting.mdx @@ -227,7 +227,7 @@ Tarball exceeds maximum size. File size: 1.6GB, Max: 1.5GB **Solution:** 1. Check for large files that shouldn't be included (datasets, model weights, logs). -2. Add large files to `.flashignore` to exclude them from the build. +2. Add large files to `.gitignore` to exclude them from the build. 3. Use [network volumes](/flash/configuration/storage) to store large models instead of bundling them. ### Invalid tarball format @@ -246,35 +246,6 @@ rm -rf .flash flash build ``` -### SSL certificate verification failed - -**Error:** -``` -SSL certificate verification failed. This usually means Python cannot find your system's CA certificates. -``` - -**Cause:** Python cannot locate the system's trusted CA certificates, preventing secure connections during deployment. This commonly occurs on fresh Python installations, especially on macOS. - -**Solution:** Try one of these fixes: - -1. **Install certifi and set the certificate bundle path:** - ```bash - pip install certifi - export REQUESTS_CA_BUNDLE=$(python -c "import certifi; print(certifi.where())") - ``` - -2. **macOS only:** Run the certificate installer that comes with Python. Find it in your Python installation folder (typically `/Applications/Python 3.x/`) and run `Install Certificates.command`. - -3. **Add to shell profile for persistence:** - ```bash - echo 'export REQUESTS_CA_BUNDLE=$(python -c "import certifi; print(certifi.where())")' >> ~/.bashrc - source ~/.bashrc - ``` - - -Transient SSL errors (like connection resets) are automatically retried during upload. The certificate verification error requires manual intervention because it indicates a system configuration issue. - - ### Resource provisioning failed **Error:**