llamactl 0.3.14__py3-none-any.whl → 0.3.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llama_deploy/cli/textual/deployment_form.py +26 -5
- {llamactl-0.3.14.dist-info → llamactl-0.3.15.dist-info}/METADATA +3 -3
- {llamactl-0.3.14.dist-info → llamactl-0.3.15.dist-info}/RECORD +5 -5
- {llamactl-0.3.14.dist-info → llamactl-0.3.15.dist-info}/WHEEL +0 -0
- {llamactl-0.3.14.dist-info → llamactl-0.3.15.dist-info}/entry_points.txt +0 -0
|
@@ -82,6 +82,8 @@ class DeploymentForm:
|
|
|
82
82
|
installed_appserver_version: str | None = None
|
|
83
83
|
existing_llama_deploy_version: str | None = None
|
|
84
84
|
selected_appserver_version: str | None = None
|
|
85
|
+
# required secret names from config
|
|
86
|
+
required_secret_names: list[str] = field(default_factory=list)
|
|
85
87
|
|
|
86
88
|
@classmethod
|
|
87
89
|
def from_deployment(cls, deployment: DeploymentResponse) -> "DeploymentForm":
|
|
@@ -319,6 +321,12 @@ class DeploymentFormWidget(Widget):
|
|
|
319
321
|
|
|
320
322
|
def on_button_pressed(self, event: Button.Pressed) -> None:
|
|
321
323
|
if event.button.id == "save":
|
|
324
|
+
# Ensure latest input values are captured by blurring current focus first
|
|
325
|
+
try:
|
|
326
|
+
if self.screen.focused is not None:
|
|
327
|
+
self.screen.focused.blur()
|
|
328
|
+
except Exception:
|
|
329
|
+
pass
|
|
322
330
|
self._save()
|
|
323
331
|
elif event.button.id == "change_pat":
|
|
324
332
|
updated_form = dataclasses.replace(self.resolve_form_data())
|
|
@@ -343,11 +351,11 @@ class DeploymentFormWidget(Widget):
|
|
|
343
351
|
self.post_message(StartValidationMessage(self.form_data))
|
|
344
352
|
|
|
345
353
|
def _validate_form(self) -> bool:
|
|
346
|
-
"""Validate required fields"""
|
|
354
|
+
"""Validate required fields from the current UI state"""
|
|
347
355
|
name_input = self.query_one("#name", Input)
|
|
348
356
|
repo_url_input = self.query_one("#repo_url", Input)
|
|
349
357
|
|
|
350
|
-
errors = []
|
|
358
|
+
errors: list[str] = []
|
|
351
359
|
|
|
352
360
|
# Clear previous error state
|
|
353
361
|
name_input.remove_class("error")
|
|
@@ -361,12 +369,19 @@ class DeploymentFormWidget(Widget):
|
|
|
361
369
|
repo_url_input.add_class("error")
|
|
362
370
|
errors.append("Repository URL is required")
|
|
363
371
|
|
|
372
|
+
missing_required: list[str] = []
|
|
373
|
+
for secret_name in sorted(self.form_data.required_secret_names):
|
|
374
|
+
value = (self.form_data.secrets.get(secret_name) or "").strip()
|
|
375
|
+
if value == "":
|
|
376
|
+
missing_required.append(secret_name)
|
|
377
|
+
if missing_required:
|
|
378
|
+
errors.append("Missing required secrets: " + ", ".join(missing_required))
|
|
379
|
+
|
|
364
380
|
if errors:
|
|
365
381
|
self._show_error("; ".join(errors))
|
|
366
382
|
return False
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return True
|
|
383
|
+
self._show_error("")
|
|
384
|
+
return True
|
|
370
385
|
|
|
371
386
|
def _show_error(self, message: str) -> None:
|
|
372
387
|
"""Show an error message"""
|
|
@@ -408,6 +423,7 @@ class DeploymentFormWidget(Widget):
|
|
|
408
423
|
installed_appserver_version=self.form_data.installed_appserver_version,
|
|
409
424
|
existing_llama_deploy_version=self.form_data.existing_llama_deploy_version,
|
|
410
425
|
selected_appserver_version=self.form_data.selected_appserver_version,
|
|
426
|
+
required_secret_names=self.form_data.required_secret_names,
|
|
411
427
|
)
|
|
412
428
|
|
|
413
429
|
|
|
@@ -608,11 +624,15 @@ def _initialize_deployment_data() -> DeploymentForm:
|
|
|
608
624
|
warnings: list[str] = []
|
|
609
625
|
has_git = is_git_repo()
|
|
610
626
|
has_no_workflows = False
|
|
627
|
+
required_secret_names: list[str] = []
|
|
611
628
|
try:
|
|
612
629
|
config = read_deployment_config(Path("."), Path("."))
|
|
613
630
|
if config.name != DEFAULT_DEPLOYMENT_NAME:
|
|
614
631
|
name = config.name
|
|
615
632
|
has_no_workflows = config.has_no_workflows()
|
|
633
|
+
# Seed required secret names from config if present
|
|
634
|
+
required_secret_names = config.required_env_vars
|
|
635
|
+
|
|
616
636
|
except Exception:
|
|
617
637
|
warnings.append("Could not parse local deployment config. It may be invalid.")
|
|
618
638
|
if not has_git and has_no_workflows:
|
|
@@ -685,6 +705,7 @@ def _initialize_deployment_data() -> DeploymentForm:
|
|
|
685
705
|
env_info_messages=env_info_message,
|
|
686
706
|
installed_appserver_version=installed,
|
|
687
707
|
selected_appserver_version=installed,
|
|
708
|
+
required_secret_names=required_secret_names,
|
|
688
709
|
)
|
|
689
710
|
return form
|
|
690
711
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: llamactl
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.15
|
|
4
4
|
Summary: A command-line interface for managing LlamaDeploy projects and deployments
|
|
5
5
|
Author: Adrian Lyjak
|
|
6
6
|
Author-email: Adrian Lyjak <adrianlyjak@gmail.com>
|
|
7
7
|
License: MIT
|
|
8
|
-
Requires-Dist: llama-deploy-core[client]>=0.3.
|
|
9
|
-
Requires-Dist: llama-deploy-appserver>=0.3.
|
|
8
|
+
Requires-Dist: llama-deploy-core[client]>=0.3.15,<0.4.0
|
|
9
|
+
Requires-Dist: llama-deploy-appserver>=0.3.15,<0.4.0
|
|
10
10
|
Requires-Dist: vibe-llama-core>=0.1.0
|
|
11
11
|
Requires-Dist: rich>=13.0.0
|
|
12
12
|
Requires-Dist: questionary>=2.0.0
|
|
@@ -23,7 +23,7 @@ llama_deploy/cli/interactive_prompts/utils.py,sha256=594cc2a242cc3405d66d0e26a60
|
|
|
23
23
|
llama_deploy/cli/options.py,sha256=1bddcaf69c0293b07ce8b73fa4ef92d62ea5d8eecd7f66b65e957d4a59381243,2479
|
|
24
24
|
llama_deploy/cli/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
25
25
|
llama_deploy/cli/styles.py,sha256=15901fb567b0d10470f56a06d863819c4ed00a9f90b2a8c46b4bc2fb1dbdf6c3,307
|
|
26
|
-
llama_deploy/cli/textual/deployment_form.py,sha256=
|
|
26
|
+
llama_deploy/cli/textual/deployment_form.py,sha256=92602faca36ba453e7b2c4ab04644e4bf4c12f98ff60d619ebd2697b06a70692,28953
|
|
27
27
|
llama_deploy/cli/textual/deployment_help.py,sha256=991d8cdcc61ae0cf79ddd27715db5452c9902d343ce20775f8651252056eca77,2859
|
|
28
28
|
llama_deploy/cli/textual/deployment_monitor.py,sha256=86b2545eeee9ef4ff9c8bec0ee5c8eefd54373d2200da5906a886fb614e763cd,16723
|
|
29
29
|
llama_deploy/cli/textual/git_validation.py,sha256=94c95b61d0cbc490566a406b4886c9c12e1d1793dc14038a5be37119223c9568,13419
|
|
@@ -34,7 +34,7 @@ llama_deploy/cli/textual/styles.tcss,sha256=2536f52ea1a654ae1f8990a25d45c845cb31
|
|
|
34
34
|
llama_deploy/cli/utils/env_inject.py,sha256=01911758bcc3cf22aad0db0d1ade56aece48d6ad6bdb7186ea213337c67f5a89,688
|
|
35
35
|
llama_deploy/cli/utils/redact.py,sha256=1e768d76b4a6708230c34f7ce8a5a82ab52795bb3d6ab0387071ab4e8d7e7934,863
|
|
36
36
|
llama_deploy/cli/utils/version.py,sha256=bf01a6dda948b868cc08c93701ed44cd36b487402404af8451d4c0996a2edb31,364
|
|
37
|
-
llamactl-0.3.
|
|
38
|
-
llamactl-0.3.
|
|
39
|
-
llamactl-0.3.
|
|
40
|
-
llamactl-0.3.
|
|
37
|
+
llamactl-0.3.15.dist-info/WHEEL,sha256=66530aef82d5020ef5af27ae0123c71abb9261377c5bc519376c671346b12918,79
|
|
38
|
+
llamactl-0.3.15.dist-info/entry_points.txt,sha256=b67e1eb64305058751a651a80f2d2268b5f7046732268421e796f64d4697f83c,52
|
|
39
|
+
llamactl-0.3.15.dist-info/METADATA,sha256=dd24833d724ecdb3610f651089481cd9d6f08baa37606765752e8abae811321d,3218
|
|
40
|
+
llamactl-0.3.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|