Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
b8705fb
feat(runtime): Add generic handler factory for serverless execution
deanq Jan 3, 2026
8c0b62a
feat(cli): Add handler generator, manifest builder, and scanner for b…
deanq Jan 3, 2026
c14ed9f
test(runtime): Add comprehensive tests for generic handler
deanq Jan 3, 2026
8c84c34
test(cli): Add tests for handler generation, manifest building, and s…
deanq Jan 3, 2026
cc77fa5
docs(runtime): Document generic handler factory architecture
deanq Jan 3, 2026
72ff4a1
docs(cli): Add flash build command documentation
deanq Jan 3, 2026
e761d48
docs: Add build process and handler generation section to README
deanq Jan 3, 2026
9af1505
feat(cli): Integrate build utilities into flash build command
deanq Jan 3, 2026
b1968d6
refactor(build): Fix directory structure and add comprehensive error …
deanq Jan 3, 2026
8717dc3
feat(resources): Add LoadBalancerSlsResource for LB endpoints
deanq Jan 4, 2026
3cdb565
fix(test): Fix LoadBalancerSlsResource deployment test mocks
deanq Jan 4, 2026
daa1375
feat(resources): Phase 1 - Core infrastructure for @remote on LB endp…
deanq Jan 4, 2026
d02082b
feat(build): Phase 2.1 - Enhanced scanner for HTTP routing extraction
deanq Jan 4, 2026
e83c4f0
feat(build): Phase 2.2 - Updated manifest schema for HTTP routing
deanq Jan 4, 2026
3b41ca4
feat(cli): Add LB handler generator for FastAPI app creation
deanq Jan 4, 2026
6cc2888
feat(runtime): Implement LB handler factory for FastAPI app creation
deanq Jan 4, 2026
babfe12
feat(cli): Route build command to separate handlers for LB endpoints
deanq Jan 4, 2026
c9a160b
feat(resources): Add LiveLoadBalancer for local LB endpoint testing
deanq Jan 4, 2026
7f1961b
test(stubs): Add comprehensive unit tests for LoadBalancerSlsStub
deanq Jan 4, 2026
bc8f733
fix(test): Correct LB endpoint test decorator to match assertions
deanq Jan 4, 2026
79e8f88
docs: Add comprehensive documentation for @remote with LoadBalancer e…
deanq Jan 4, 2026
47d73f8
security: Remove /execute from deployed LoadBalancer endpoints
deanq Jan 4, 2026
2353c69
feat(build): Phase 4 - Fix LiveLoadBalancer handler generation to inc…
deanq Jan 4, 2026
d86b58c
fix(scanner): Discover LoadBalancer resources in addition to Serverle…
deanq Jan 4, 2026
db28ae0
chore: Format code for line length and remove unused imports
deanq Jan 4, 2026
7304d17
fix: Address PR #131 review feedback
deanq Jan 4, 2026
0218995
style: Format datetime chaining for line length
deanq Jan 4, 2026
483536b
fix: LiveLoadBalancer template not serialized to RunPod GraphQL
deanq Jan 4, 2026
ca8cd7e
fix: LoadBalancer endpoint URL and add CPU support
deanq Jan 4, 2026
17bf287
fix: Export CpuLiveLoadBalancer and CpuLoadBalancerSlsResource from t…
deanq Jan 4, 2026
a5368b7
fix: Add API key authentication to LoadBalancer health check
deanq Jan 4, 2026
8cd129a
fix(lb): Exclude flashboot from CpuLoadBalancerSlsResource GraphQL pa…
deanq Jan 4, 2026
cc73b94
fix(lb): Expand CpuInstanceType.ANY to all CPU flavors in CpuLoadBala…
deanq Jan 4, 2026
8bf1739
refactor(cpu): Move instanceIds validator to CpuEndpointMixin
deanq Jan 4, 2026
8f31e03
test: Update CPU instance test to reflect validator expansion
deanq Jan 4, 2026
5da2441
fix(lb): Increase health check timeout from 5s to 15s
deanq Jan 4, 2026
586286d
fix(lb): Fix CPU load balancer template deployment error
deanq Jan 4, 2026
027965c
fix(drift): Exclude runtime fields from config hash to prevent false …
deanq Jan 4, 2026
1b55718
fix(http): Standardize RunPod HTTP client authentication across codebase
deanq Jan 5, 2026
8b97197
feat(http): Extend HTTP utilities to cover both sync and async authen…
deanq Jan 5, 2026
9f4e19a
fix: Address PR feedback on HTTP utilities implementation
deanq Jan 5, 2026
462654b
Merge branch 'deanq/ae-1102-load-balancer-sls-resource' into deanq/ae…
deanq Jan 5, 2026
b57748f
refactor(drift): Extract runtime field constants and improve maintain…
deanq Jan 5, 2026
915f574
docs: Improve LoadBalancer documentation accuracy and completeness
deanq Jan 5, 2026
1c6d99d
docs: add resource config drift detection documentation
deanq Jan 5, 2026
f719c73
docs: proper name for the file
deanq Jan 5, 2026
2a2a21d
test(build): Add comprehensive test coverage for scanner and handler …
deanq Jan 6, 2026
17d338a
Merge branch 'deanq/ae-1251-handler-mapper' into deanq/ae-1102-load-b…
deanq Jan 6, 2026
5ead8e7
Merge branch 'deanq/ae-1102-load-balancer-sls-resource' into deanq/ae…
deanq Jan 6, 2026
6d3ff3b
test(scanner): Fix resource type assertions to match scanner behavior
deanq Jan 6, 2026
8fe3d67
Merge branch 'deanq/ae-1102-load-balancer-sls-resource' into deanq/ae…
deanq Jan 6, 2026
2640b98
Merge branch 'main' into deanq/ae-1196-absolute-drift-detection
deanq Jan 8, 2026
6431b62
chore: merge correction
deanq Jan 8, 2026
1c31455
fix(drift): Remove manual undeploy/deploy from update() method
deanq Jan 9, 2026
426ba16
docs(drift): Clarify _has_structural_changes detects version-triggeri…
deanq Jan 9, 2026
42382af
feat(drift): Enable environment variable drift detection
deanq Jan 9, 2026
d02d8c8
test(drift): Update tests for environment variable drift detection
deanq Jan 9, 2026
9ea43f2
Merge branch 'main' into deanq/ae-1196-absolute-drift-detection
deanq Jan 9, 2026
c8bab65
fix: Address Copilot review feedback on type hints and documentation
deanq Jan 9, 2026
8464d14
chore: Update Python version compatibility to 3.10-3.14
deanq Jan 11, 2026
27aa3e7
chore: Increase code coverage requirement to 65%
deanq Jan 11, 2026
9b27521
Merge branch 'main' into deanq/ae-1679-python-310-314-compatibility
deanq Jan 12, 2026
a1a5154
Merge branch 'main' into deanq/ae-1679-python-310-314-compatibility
deanq Jan 12, 2026
ceffe7d
Merge branch 'main' into deanq/ae-1679-python-310-314-compatibility
deanq Jan 14, 2026
06f5dc3
Merge remote-tracking branch 'origin/main' into deanq/ae-1679-python-…
deanq Jan 15, 2026
a11419c
perf(tests): make parallel test execution the default
deanq Jan 20, 2026
d88c173
Merge branch 'main' into deanq/ae-1679-python-310-314-compatibility
deanq Jan 20, 2026
d4c6a81
refactor: remove dead code and add serialization tests
deanq Jan 20, 2026
194ef6d
Merge branch 'deanq/ae-1679-python-310-314-compatibility' into deanq/…
deanq Jan 20, 2026
1e3141e
fix: regenerate uv.lock with correct dependency versions
deanq Jan 20, 2026
5755eb6
fix: mark TestLoadBalancerSlsStubRouting as serial
deanq Jan 20, 2026
5ce7e19
fix: simplify parallel test execution - remove unnecessary two-pass a…
deanq Jan 20, 2026
f73ddc3
fix: re-add serial marker for TestLoadBalancerSlsStubRouting
deanq Jan 20, 2026
4e1a64e
fix: implement proper serial test handling with two-pass execution
deanq Jan 20, 2026
05d507a
fix: implement proper serial test handling with two-pass execution
deanq Jan 20, 2026
0cd8de9
chore: consistent coverage failure point
deanq Jan 20, 2026
51354ee
chore: this is about reporting coverage (no need to fail)
deanq Jan 20, 2026
cab4017
chore: don't know why it was 64
deanq Jan 22, 2026
1675d4f
chore: make test commands parallel by default with serial variants
deanq Jan 22, 2026
26067cb
Merge branch 'main' into deanq/ae-1748-run-tests-in-parallel
deanq Jan 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Format code for line length and remove unused imports
- Wrap long lines in manifest.py, lb_handler.py, and load_balancer_sls.py
- Remove unused httpx import in test_load_balancer_sls_stub.py
- Apply consistent formatting across codebase
  • Loading branch information
deanq committed Jan 4, 2026
commit db28ae095b5615241f530c86af9865237bf8b980
5 changes: 4 additions & 1 deletion src/tetra_rp/cli/commands/build_utils/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ def build(self) -> Dict[str, Any]:

# Validate and collect routing for LB endpoints
resource_routes = {}
is_load_balanced = resource_type in ["LoadBalancerSlsResource", "LiveLoadBalancer"]
is_load_balanced = resource_type in [
"LoadBalancerSlsResource",
"LiveLoadBalancer",
]
if is_load_balanced:
for f in functions:
if not f.http_method or not f.http_path:
Expand Down
4 changes: 3 additions & 1 deletion src/tetra_rp/cli/commands/build_utils/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def _extract_resource_configs(self, tree: ast.AST, py_file: Path) -> None:
config_type = self._get_call_type(node.value)

# Include both Serverless and LoadBalancer resources
if config_type and ("Serverless" in config_type or "LoadBalancer" in config_type):
if config_type and (
"Serverless" in config_type or "LoadBalancer" in config_type
):
# Store mapping of variable name to name and type separately
key = f"{module_path}:{config_name}"
self.resource_configs[key] = config_name
Expand Down
4 changes: 3 additions & 1 deletion src/tetra_rp/runtime/lb_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ async def execute_remote_function(request: Request) -> Dict[str, Any]:

# Serialize result
try:
result_b64 = base64.b64encode(cloudpickle.dumps(result)).decode("utf-8")
result_b64 = base64.b64encode(cloudpickle.dumps(result)).decode(
"utf-8"
)
return {"success": True, "result": result_b64}
except Exception as e:
logger.error(f"Failed to serialize result: {e}")
Expand Down
8 changes: 6 additions & 2 deletions src/tetra_rp/stubs/load_balancer_sls.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def _should_use_execute_endpoint(self, func: Callable[..., Any]) -> bool:

# Check if routing metadata is complete
if not routing_config.get("method") or not routing_config.get("path"):
log.debug(f"Incomplete routing config for {func.__name__}, using /execute fallback")
log.debug(
f"Incomplete routing config for {func.__name__}, using /execute fallback"
)
return True

# Use user-defined route for deployed endpoints with complete routing metadata
Expand Down Expand Up @@ -297,7 +299,9 @@ async def _execute_via_user_route(
response = await client.request(method, url, json=body)
response.raise_for_status()
result = response.json()
log.debug(f"User route execution successful (type={type(result).__name__})")
log.debug(
f"User route execution successful (type={type(result).__name__})"
)
return result
except httpx.TimeoutException as e:
raise TimeoutError(
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_lb_remote_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_scanner_discovers_load_balancer_resources(self):
import tempfile

# Create temporary Python file with LoadBalancer resource
code = '''
code = """
from tetra_rp import LiveLoadBalancer, LoadBalancerSlsResource, remote

# Test LiveLoadBalancer discovery
Expand All @@ -277,7 +277,7 @@ async def process_data(x: int):
@remote(deployed, method="GET", path="/api/status")
def get_status():
return {"status": "ok"}
'''
"""

with tempfile.TemporaryDirectory() as tmpdir:
project_dir = Path(tmpdir)
Expand Down
10 changes: 6 additions & 4 deletions tests/unit/test_load_balancer_sls_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ async def test_execute_via_user_route_success(self):
def add(x, y):
return x + y

import httpx

mock_response = MagicMock()
mock_response.json.return_value = {"result": 8}

Expand All @@ -343,7 +341,9 @@ def add(x, y):
assert result == {"result": 8}
# Verify correct HTTP method and URL
mock_client.return_value.__aenter__.return_value.request.assert_called_once()
call_args = mock_client.return_value.__aenter__.return_value.request.call_args
call_args = (
mock_client.return_value.__aenter__.return_value.request.call_args
)
assert call_args[0][0] == "POST"
assert call_args[0][1] == "http://localhost:8000/api/add"
# Verify correct JSON body with mapped parameters
Expand Down Expand Up @@ -374,7 +374,9 @@ def greet(name, greeting="Hello"):

assert result == "Hi, Alice!"
# Verify JSON body has both positional arg and kwargs
call_args = mock_client.return_value.__aenter__.return_value.request.call_args
call_args = (
mock_client.return_value.__aenter__.return_value.request.call_args
)
assert call_args[1]["json"] == {"name": "Alice", "greeting": "Hi"}

@pytest.mark.asyncio
Expand Down
Loading