-
Notifications
You must be signed in to change notification settings - Fork 6
feat: AE-1202 add flash cli cmd init and run #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Adds optional 'local' parameter to @Remote decorator enabling local function/class execution without remote server provisioning. This facilitates testing and development by bypassing remote execution while maintaining the same decorator interface. Also adds detection for RunPod worker mode to return unwrapped functions when already running on the platform.
Add support for CpuInstanceType.ANY which automatically expands to all available CPU instance types, providing flexibility similar to GPU endpoint behavior. Changes: - Add CpuInstanceType.ANY enum value - Add CpuInstanceType.all() classmethod to return all types except ANY - Update CpuServerlessEndpoint default from CPU3G_2_8 to ANY - Add field validator to expand [ANY] to all instance types - Exclude ANY from CPU_INSTANCE_DISK_LIMITS dict Test coverage: - Test ANY enum value and all() method behavior - Test validator expansion and explicit list preservation - Update existing tests for new default behavior - Verify ANY exclusion from disk limits calculation
Changes: - Add editable install to make dev target - Configure setuptools to find packages in src/ directory - Update CLI branding to "Runpod Flash CLI" The flash CLI now works correctly in development mode while maintaining proper packaging for end users. Editable install ensures src/ changes are immediately active without reinstall.
The default for CpuLiveServerless is CpuInstanceType.ANY which expands to all available CPU instance types. Updated test expectations to match actual behavior where ANY expands to all instances with minimum disk size of 10GB.
deanq
approved these changes
Oct 31, 2025
…#104) * feat(cli): add flash build command for AWS Lambda-style packaging Implements tarball-based packaging for Flash applications with automatic dependency management and gitignore-style file filtering. Features: - Package Flash apps into self-contained tarballs - Install pip dependencies as local modules - Respect .flashignore and .gitignore patterns - Extract dependencies from @Remote decorators automatically - Multiple pip command fallback support Command options: - flash build: Build with all dependencies - flash build --no-deps: Skip transitive dependencies - flash build --keep-build: Keep temporary build directory - flash build -o custom.tar.gz: Custom archive name Implementation: - Add build.py command (496 lines) - Add ignore.py utility for pattern matching (140 lines) - Add .flashignore template to project scaffolding - Add pathspec>=0.11.0 dependency for gitignore parsing - Register build command in CLI main Archive structure: - .tetra/archive.tar.gz with app folder at root - All pip packages installed alongside application code - Clean extraction to single app directory * fix: add explicit UTF-8 encoding to file reads Address PR #104 review comments from GitHub Copilot by adding explicit encoding='utf-8' parameter to all read_text() calls in flash build command implementation. Changes: - cli/utils/ignore.py: Add encoding to ignore file parsing - cli/commands/build.py: Add encoding to main.py, requirements.txt, and worker file parsing Ensures consistent cross-platform file reading behavior regardless of system default encoding (Windows cp1252 vs Linux/Mac UTF-8). * fix: more feedback cleanup Address PR #104 review comments from GitHub Copilot: - Modern type hint use - Use only sys.executable -m pip to ensure correct environment - PIP_INSTALL_TIMEOUT_SECONDS constant
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.
flash init, run, and build #104