Skip to content

Commit d4ecd77

Browse files
committed
fix(review): address copilot review feedback on PR #257
- Use `is not None` instead of truthiness for env checks in serverless.py, serverless_cpu.py, and manifest.py so explicit env={} clears template env - Add RUNPOD_API_KEY injection note to LB architecture doc - Remove Claude-specific directive from plan doc
1 parent c1a98e2 commit d4ecd77

5 files changed

Lines changed: 4 additions & 6 deletions

File tree

docs/LoadBalancer_Runtime_Architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ graph TD
2626
- Entrypoint: Loads manifest and starts FastAPI server on port 8000
2727
- Runpod exposes this via HTTPS endpoint URL
2828
- Health check: Runpod polls `/ping` every 30 seconds
29-
- Environment: `FLASH_MODULE_PATH` injected automatically, plus any explicit `env={}` vars
29+
- Environment: `FLASH_MODULE_PATH` injected automatically, `RUNPOD_API_KEY` injected when `makes_remote_calls=True`, plus any explicit `env={}` vars
3030

3131
### What Gets Deployed
3232

docs/plans/2026-03-05-env-separation-plan.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Env Separation Implementation Plan
22

3-
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4-
53
**Goal:** Stop auto-carrying `.env` file contents to deployed endpoints; make resource `env={}` the sole source of user-declared deploy-time env vars.
64

75
**Architecture:** Remove `EnvironmentVars` class and `get_env_vars()`. Change `ServerlessResource.env` default to `None`. Add deploy-time env preview table with secret masking. Update docs and examples.

src/runpod_flash/cli/commands/build_utils/manifest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def _extract_config_properties(config: Dict[str, Any], resource_config) -> None:
239239
if hasattr(resource_config, "locations") and resource_config.locations:
240240
config["locations"] = resource_config.locations
241241

242-
if hasattr(resource_config, "env") and resource_config.env:
242+
if hasattr(resource_config, "env") and resource_config.env is not None:
243243
config["env"] = dict(resource_config.env)
244244

245245
if (

src/runpod_flash/core/resources/serverless.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def _configure_existing_template(self) -> None:
551551

552552
if self.imageName:
553553
self.template.imageName = self.imageName
554-
if self.env:
554+
if self.env is not None:
555555
self.template.env = KeyValuePair.from_dict(self.env)
556556

557557
async def _sync_graphql_object_with_inputs(

src/runpod_flash/core/resources/serverless_cpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def _configure_existing_template(self) -> None:
177177

178178
if self.imageName:
179179
self.template.imageName = self.imageName
180-
if self.env:
180+
if self.env is not None:
181181
self.template.env = KeyValuePair.from_dict(self.env)
182182

183183
# Apply CPU-specific disk sizing

0 commit comments

Comments
 (0)