Skip to content

Conversation

@pandyamarut
Copy link
Contributor

@pandyamarut pandyamarut commented Oct 9, 2025

flash init, run, and build #104

@pandyamarut pandyamarut requested a review from deanq October 9, 2025 01:17
@pandyamarut pandyamarut marked this pull request as ready for review October 9, 2025 01:17
deanq and others added 10 commits October 9, 2025 15:33
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 added 2 commits October 31, 2025 11:31
…#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
@deanq deanq merged commit 75b2baf into main Oct 31, 2025
6 of 7 checks passed
@deanq deanq deleted the ae-flash-init branch October 31, 2025 18:39
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