Skip to content

Commit d75bcd1

Browse files
committed
Update
1 parent 210a2a7 commit d75bcd1

2 files changed

Lines changed: 0 additions & 46 deletions

File tree

src/fastapi_cloud_cli/commands/deploy.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -393,45 +393,6 @@ def _wait_for_deployment(
393393
last_message_changed_at = time.monotonic() # pragma: no cover
394394

395395

396-
def _setup_environment_variables(toolkit: RichToolkit, app_id: str) -> None:
397-
if not toolkit.confirm("Do you want to setup environment variables?", tag="env"):
398-
return
399-
400-
toolkit.print_line()
401-
402-
env_vars = {}
403-
404-
while True:
405-
key = toolkit.input(
406-
"Enter the environment variable name: [ENTER to skip]", required=False
407-
)
408-
409-
if key.strip() == "":
410-
break
411-
412-
if not validate_environment_variable_name(key):
413-
toolkit.print(
414-
"[error]Invalid environment variable name.",
415-
)
416-
417-
else:
418-
value = toolkit.input(
419-
"Enter the environment variable value:", password=True
420-
)
421-
422-
env_vars[key] = value
423-
424-
toolkit.print_line()
425-
426-
toolkit.print_line()
427-
428-
with toolkit.progress("Setting up environment variables...") as progress:
429-
with handle_http_errors(progress):
430-
_create_environment_variables(app_id, env_vars)
431-
432-
progress.log("Environment variables set up successfully!")
433-
434-
435396
class SignupToWaitingList(BaseModel):
436397
email: EmailStr
437398
name: Optional[str] = None
@@ -599,9 +560,6 @@ def deploy(
599560
logger.debug("No app config found, configuring new app")
600561
app_config = _configure_app(toolkit, path_to_deploy=path_to_deploy)
601562
toolkit.print_line()
602-
603-
_setup_environment_variables(toolkit, app_config.app_id)
604-
toolkit.print_line()
605563
else:
606564
logger.debug("Existing app config found, proceeding with deployment")
607565
toolkit.print("Deploying app...")

tests/test_cli_deploy.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,6 @@ def test_exits_successfully_when_deployment_is_done(
386386
Keys.ENTER,
387387
*"demo",
388388
Keys.ENTER,
389-
Keys.RIGHT_ARROW,
390-
Keys.ENTER,
391389
]
392390

393391
team_data = _get_random_team()
@@ -642,8 +640,6 @@ def _deploy_without_waiting(respx_mock: respx.MockRouter, tmp_path: Path) -> Res
642640
Keys.ENTER,
643641
*"demo",
644642
Keys.ENTER,
645-
Keys.RIGHT_ARROW,
646-
Keys.ENTER,
647643
]
648644

649645
team_data = _get_random_team()

0 commit comments

Comments
 (0)